From fae8fb0fa61ac0335d6a4feece6a092088368b8a Mon Sep 17 00:00:00 2001 From: Dr Alex Meakins Date: Sat, 19 Jul 2025 16:50:18 +0100 Subject: [PATCH 01/21] Implemented a tool to automatically generate meson.build files through the project. --- dev/generate_meson_files.py | 177 ++++++++++++++++++++++++++++++++++++ dev/root-meson.build | 5 + dev/subdir-meson.build | 25 +++++ 3 files changed, 207 insertions(+) create mode 100755 dev/generate_meson_files.py create mode 100644 dev/root-meson.build create mode 100644 dev/subdir-meson.build diff --git a/dev/generate_meson_files.py b/dev/generate_meson_files.py new file mode 100755 index 00000000..932be305 --- /dev/null +++ b/dev/generate_meson_files.py @@ -0,0 +1,177 @@ +#!/bin/env python + +from pathlib import Path + +PACKAGES = ['raysect'] +SUBDIR_EXCLUSION_FILENAME = '.meson-exclude' + + +def generate_meson_files(packages): + """ + Generates the meson.build files for the project from a set of template files. + + A root build.meson will be placed in the project root and meson.build files will be generated for the specified + package folders. This script must be executed from the root folder of the project. + + If substantive changes are needed to the meson.build files throughout the project, it will be easier to modify the + templates and trigger the regeneration process. + + This script will remove any existing meson.build files, so be sure any changes are captured before re-running this + script. There are two template files: + + * root-meson.build + * subdir-meson.build + + The root-meson.build file is used to generate the root meson.build for the project. The subdir-meson.build is used + to generate the meson.build files in the project sub-directory. The templates are read and handled as a python + f-strings. See the script implementation for the variables available to the template. The meson.build files will + consist of the template followed by a set of subdir() entries for each descendant of the current sub-directory + (if not excluded). + + A sub-directory may be excluded from the generation process by placing a file in the subfolder called + ".meson-exclude". If the exclusion file is found, the sub-directory and its descendants will be ignored during + the generation process. + + :param packages: A list of package names. + """ + + root_path = Path('.') + package_paths = [Path(package) for package in packages] + + # Walk the project folder and specified packages to remove all meson.build files. + # Any stale meson.build files found in excluded directories are also removed. + _remove_meson_files(root_path, subdirs=package_paths) + + # Add root meson.build file. + _install_root_meson_file(root_path, subdirs=package_paths) + + # Walk the specified packages and add the sub-directory meson.build files. + for path in package_paths: + _install_subdir_meson_files(path) + + +def _remove_meson_files(path, subdirs=None): + """ + Removes any meson.build files found under the directory tree referenced by path. + + By default, this function recurses through the entire directory tree under the supplied path. If sub-dirs is + provided, then only the specified sub-directories will be explored. + """ + + # validate + if not path.is_dir(): + raise ValueError('The supplied path is not a directory.') + + if subdirs and any([not subdir.is_dir() for subdir in subdirs]): + raise ValueError('The list of sub-directories must only contain paths to valid directories.') + + # remove meson.build in this directory + meson_file = path / 'meson.build' + meson_file.unlink(missing_ok=True) + + # generate a list of subdirectories if none supplied + if not subdirs: + subdirs = [child for child in path.iterdir() if child.is_dir()] + + # recurse into sub-directories + for subdir in subdirs: + _remove_meson_files(subdir) + + +def _install_root_meson_file(path, subdirs): + + # validate + if not path.is_dir(): + raise ValueError('The supplied path is not a directory.') + + if any([not subdir.is_dir() for subdir in subdirs]): + raise ValueError('The list of sub-directories must only contain paths to valid directories.') + + meson_file = path / 'meson.build' + meson_file.write_text(_generate_root_meson_file(subdirs)) + + +def _install_subdir_meson_files(path): + + # validate + if not path.is_dir(): + raise ValueError('The supplied path is not a directory.') + + # generate a list of subdirectories, filtering excluded + # todo: filter pycache files etc.. + subdirs = [child for child in path.iterdir() if child.is_dir() and not (child / SUBDIR_EXCLUSION_FILENAME).exists()] + + # write meson file + meson_file = path / 'meson.build' + meson_file.write_text(_generate_subdir_meson_file(path, subdirs)) + + # recurse into sub-directories + for subdir in subdirs: + _install_subdir_meson_files(subdir) + + +def _generate_root_meson_file(subdirs): + + # read template + template_path = Path(__file__).parent / 'root-meson.build' + contents = template_path.read_text() + + # add subdir entries + contents += '\n' + for subdir in subdirs: + contents += f'subdir(\'{subdir.name}\')\n' + + return contents + + +def _generate_subdir_meson_file(path, subdirs): + + # read template + template_path = Path(__file__).parent / 'subdir-meson.build' + template = template_path.read_text() + + # build file lists + pyx = [] + pxd = [] + py = [] + data = [] + for child in path.iterdir(): + + if child.is_dir(): + continue + + elif child.suffix == '.pyx': + pyx.append(child.name) + + elif child.suffix == '.pxd': + pxd.append(child.name) + + elif child.suffix == '.py': + py.append(child.name) + + else: + data.append(child.name) + + # fill in template entries + contents = template.format( + target=f'\'{str(path)}\'', + pyx_files=str(pyx), + pxd_files=str(pxd), + py_files=str(py), + data_files=str(data) + ) + + # add subdir entries + contents += '\n' + for subdir in subdirs: + contents += f'subdir(\'{subdir.name}\')\n' + + return contents + + +if __name__ == '__main__': + + # get user confirmation + + + generate_meson_files(PACKAGES) \ No newline at end of file diff --git a/dev/root-meson.build b/dev/root-meson.build new file mode 100644 index 00000000..c591477a --- /dev/null +++ b/dev/root-meson.build @@ -0,0 +1,5 @@ +project('raysect', 'cython', default_options: ['python.install-env=auto']) + +py = import('python').find_installation(pure: false) +numpy = dependency('numpy', method: 'config-tool') +fs = import('fs') diff --git a/dev/subdir-meson.build b/dev/subdir-meson.build new file mode 100644 index 00000000..79d3d507 --- /dev/null +++ b/dev/subdir-meson.build @@ -0,0 +1,25 @@ +target_path = {target} + +# source files +py_files = {py_files} +pyx_files = {pyx_files} +pxd_files = {pxd_files} +data_files = {data_files} + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: numpy, + install: true, + subdir: target_path, + cython_args: ['--annotate'] + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) From cee8e97beb322fd709e5eaa8f8a3cc09d10a548c Mon Sep 17 00:00:00 2001 From: Dr Alex Meakins Date: Sat, 19 Jul 2025 16:50:59 +0100 Subject: [PATCH 02/21] Tidy up. --- dev/generate_meson_files.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/dev/generate_meson_files.py b/dev/generate_meson_files.py index 932be305..da8f32a1 100755 --- a/dev/generate_meson_files.py +++ b/dev/generate_meson_files.py @@ -170,8 +170,4 @@ def _generate_subdir_meson_file(path, subdirs): if __name__ == '__main__': - - # get user confirmation - - generate_meson_files(PACKAGES) \ No newline at end of file From efc79fff8a49b68545b1423e35bd1a533c81309c Mon Sep 17 00:00:00 2001 From: Dr Alex Meakins Date: Sat, 19 Jul 2025 17:18:47 +0100 Subject: [PATCH 03/21] Updated build.sh and clean.sh scripts. Added abi.py to obtain the meson-python build folder. Added install_editable.sh to simplify installing the package in editable mode with verbose build information enabled for meson-python. Moved cython configuration to the root meson.build so it is shared across the project. --- dev/abi.py | 50 +++++++++++++++++++++++++++++++++++++++++ dev/build.sh | 7 +++--- dev/clean.sh | 10 ++++----- dev/install_editable.sh | 5 +++++ dev/root-meson.build | 3 +++ dev/subdir-meson.build | 4 ++-- 6 files changed, 69 insertions(+), 10 deletions(-) create mode 100755 dev/abi.py create mode 100755 dev/install_editable.sh diff --git a/dev/abi.py b/dev/abi.py new file mode 100755 index 00000000..ba72d14a --- /dev/null +++ b/dev/abi.py @@ -0,0 +1,50 @@ +#!/bin/env python + +import sys +import sysconfig +from typing import Union + +""" +Derived from the meson-python codebase. Original license terms: + +Copyright © 2022 the meson-python contributors +Copyright © 2021 Quansight Labs and Filipe Laíns + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. +""" + + +def get_cpython_abi() -> str: + version = sys.version_info + debug = pymalloc = '' + if version < (3, 8) and _get_config_var('WITH_PYMALLOC', True): + pymalloc = 'm' + return f'cp{version[0]}{version[1]}{debug}{pymalloc}' + + +def _get_config_var(name: str, default: Union[str, int, None] = None) -> Union[str, int, None]: + value: Union[str, int, None] = sysconfig.get_config_var(name) + if value is None: + return default + return value + + +if __name__ == '__main__': + print(get_cpython_abi()) diff --git a/dev/build.sh b/dev/build.sh index 732ccd5f..0cbd4336 100755 --- a/dev/build.sh +++ b/dev/build.sh @@ -1,6 +1,7 @@ #!/bin/bash +set -e # exit if an error occurs -CORES=`nproc --all` +BUILD_PATH="build/`dev/abi.py`" -echo "Rebuilding Raysect extension modules (in place)..." -python setup.py build_ext -j$CORES --inplace $1 $2 $3 $4 $5 +echo Rebuilding $BUILD_PATH... +meson compile -C $BUILD_PATH diff --git a/dev/clean.sh b/dev/clean.sh index 31ba744a..a6a5ca57 100755 --- a/dev/clean.sh +++ b/dev/clean.sh @@ -1,8 +1,8 @@ #!/bin/bash +set -e # exit if an error occurs -echo Removing all .c, .so and .html files... +BUILD_PATH="build/`dev/abi.py`" + +echo Cleaning $BUILD_PATH... +meson compile -C $BUILD_PATH --clean -find raysect -type f -name '*.c' -exec rm {} + -find raysect -type f -name '*.so' -exec rm {} + -find raysect -type f -name '*.html' -exec rm {} + -rm build -rf diff --git a/dev/install_editable.sh b/dev/install_editable.sh new file mode 100755 index 00000000..15c73653 --- /dev/null +++ b/dev/install_editable.sh @@ -0,0 +1,5 @@ +#!/bin/bash +set -e # exit if an error occurs + +echo Installing package as editable... +python -m pip install --config-settings=editable-verbose=true --no-build-isolation --upgrade --editable . \ No newline at end of file diff --git a/dev/root-meson.build b/dev/root-meson.build index c591477a..526acc1a 100644 --- a/dev/root-meson.build +++ b/dev/root-meson.build @@ -3,3 +3,6 @@ project('raysect', 'cython', default_options: ['python.install-env=auto']) py = import('python').find_installation(pure: false) numpy = dependency('numpy', method: 'config-tool') fs = import('fs') + +cython_args = ['--annotate'] +cython_dependencies = [numpy] diff --git a/dev/subdir-meson.build b/dev/subdir-meson.build index 79d3d507..951e96c0 100644 --- a/dev/subdir-meson.build +++ b/dev/subdir-meson.build @@ -11,10 +11,10 @@ foreach pyx_file: pyx_files py.extension_module( fs.replace_suffix(pyx_file, ''), pyx_file, - dependencies: numpy, + dependencies: cython_dependencies, install: true, subdir: target_path, - cython_args: ['--annotate'] + cython_args: cython_args ) endforeach From 8754c31be0beb6a9847e52df2d9cd62641354b63 Mon Sep 17 00:00:00 2001 From: Dr Alex Meakins Date: Sat, 19 Jul 2025 17:45:01 +0100 Subject: [PATCH 04/21] Updated the changelog. --- CHANGELOG.txt | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 1c23752b..36fe9096 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,6 +1,20 @@ Raysect Changelog ================= +Release 0.9.0 (TBD) +------------------- + +Build changes: +* The legacy setuptools build system has been replaced with meson-python. + - The dev/build.sh and dev/clean.sh scripts have been updated to work with the new build system. + - A meson.build generator script is provided to automate the discovery of pyx, pxd,py and data files. Please see dev/generate_meson_files.py. + - When installed in editable mode, any modified pyx files will automatically trigger a rebuild when python attempts to import from the package. Please be aware that (as with the previous build system) changes to pxd files will require a clean rebuild of the project. + - A dev/install_editable.sh script is provided to simplify the installation of the package in editable mode with verbose build output enabled. + - Meson-python performs the build out of the project folder, so the project source folders will no longer be polluted with build artefacts. + - Cython build annotations are now always enabled, the annotation files can be found in the build folder under the build artefacts folder associated with each so file (*.so.a folder). +* The demos folder is no longer included in the raysect package to reduce its size. Please clone the source repository to obtain the demos. A dedicated raysect-demos package is being investigated for the future. + + Release 0.8.1 (12 Feb 2023) --------------------------- From 1e4f01ab947e451fae8f9e4ee08a3d08e29e053f Mon Sep 17 00:00:00 2001 From: Dr Alex Meakins Date: Sat, 19 Jul 2025 18:03:45 +0100 Subject: [PATCH 05/21] Added .meson-exclude to development scripts folders to prevent their inclusion in the build/built package. --- raysect/core/math/cython/interpolation/helper/.meson-exclude | 0 .../math/function/float/function1d/tests/scripts/.meson-exclude | 0 .../float/function2d/interpolate/tests/scripts/.meson-exclude | 0 .../float/function3d/interpolate/tests/scripts/.meson-exclude | 0 4 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 raysect/core/math/cython/interpolation/helper/.meson-exclude create mode 100644 raysect/core/math/function/float/function1d/tests/scripts/.meson-exclude create mode 100644 raysect/core/math/function/float/function2d/interpolate/tests/scripts/.meson-exclude create mode 100644 raysect/core/math/function/float/function3d/interpolate/tests/scripts/.meson-exclude diff --git a/raysect/core/math/cython/interpolation/helper/.meson-exclude b/raysect/core/math/cython/interpolation/helper/.meson-exclude new file mode 100644 index 00000000..e69de29b diff --git a/raysect/core/math/function/float/function1d/tests/scripts/.meson-exclude b/raysect/core/math/function/float/function1d/tests/scripts/.meson-exclude new file mode 100644 index 00000000..e69de29b diff --git a/raysect/core/math/function/float/function2d/interpolate/tests/scripts/.meson-exclude b/raysect/core/math/function/float/function2d/interpolate/tests/scripts/.meson-exclude new file mode 100644 index 00000000..e69de29b diff --git a/raysect/core/math/function/float/function3d/interpolate/tests/scripts/.meson-exclude b/raysect/core/math/function/float/function3d/interpolate/tests/scripts/.meson-exclude new file mode 100644 index 00000000..e69de29b From 0111aec1c1e51d40a4fa153a7f5e6dc3d3ac187d Mon Sep 17 00:00:00 2001 From: Dr Alex Meakins Date: Sat, 19 Jul 2025 18:04:33 +0100 Subject: [PATCH 06/21] Added meson.build files. --- meson.build | 10 ++++++ raysect/core/acceleration/meson.build | 27 ++++++++++++++++ raysect/core/acceleration/tests/meson.build | 26 ++++++++++++++++ .../math/cython/interpolation/meson.build | 26 ++++++++++++++++ raysect/core/math/cython/meson.build | 28 +++++++++++++++++ raysect/core/math/cython/tests/meson.build | 26 ++++++++++++++++ .../function/float/function1d/meson.build | 27 ++++++++++++++++ .../float/function1d/tests/data/meson.build | 26 ++++++++++++++++ .../float/function1d/tests/meson.build | 27 ++++++++++++++++ .../float/function2d/interpolate/meson.build | 27 ++++++++++++++++ .../interpolate/tests/data/meson.build | 26 ++++++++++++++++ .../function2d/interpolate/tests/meson.build | 27 ++++++++++++++++ .../function/float/function2d/meson.build | 28 +++++++++++++++++ .../float/function2d/tests/meson.build | 26 ++++++++++++++++ .../float/function3d/interpolate/meson.build | 27 ++++++++++++++++ .../interpolate/tests/data/meson.build | 26 ++++++++++++++++ .../function3d/interpolate/tests/meson.build | 27 ++++++++++++++++ .../function/float/function3d/meson.build | 28 +++++++++++++++++ .../float/function3d/tests/meson.build | 26 ++++++++++++++++ raysect/core/math/function/float/meson.build | 29 +++++++++++++++++ raysect/core/math/function/meson.build | 28 +++++++++++++++++ .../function/vector3d/function1d/meson.build | 27 ++++++++++++++++ .../vector3d/function1d/tests/meson.build | 26 ++++++++++++++++ .../function/vector3d/function2d/meson.build | 27 ++++++++++++++++ .../vector3d/function2d/tests/meson.build | 26 ++++++++++++++++ .../function/vector3d/function3d/meson.build | 27 ++++++++++++++++ .../vector3d/function3d/tests/meson.build | 26 ++++++++++++++++ .../core/math/function/vector3d/meson.build | 29 +++++++++++++++++ raysect/core/math/meson.build | 31 +++++++++++++++++++ raysect/core/math/sampler/meson.build | 26 ++++++++++++++++ raysect/core/math/spatial/meson.build | 26 ++++++++++++++++ raysect/core/math/tests/meson.build | 26 ++++++++++++++++ raysect/core/meson.build | 30 ++++++++++++++++++ raysect/core/scenegraph/meson.build | 27 ++++++++++++++++ raysect/core/scenegraph/tests/meson.build | 26 ++++++++++++++++ raysect/core/tests/meson.build | 26 ++++++++++++++++ raysect/meson.build | 30 ++++++++++++++++++ .../optical/library/components/meson.build | 26 ++++++++++++++++ .../optical/library/glass/data/meson.build | 26 ++++++++++++++++ raysect/optical/library/glass/meson.build | 27 ++++++++++++++++ raysect/optical/library/meson.build | 30 ++++++++++++++++++ .../optical/library/metal/data/meson.build | 26 ++++++++++++++++ raysect/optical/library/metal/meson.build | 27 ++++++++++++++++ raysect/optical/library/spectra/meson.build | 26 ++++++++++++++++ raysect/optical/material/emitter/meson.build | 26 ++++++++++++++++ raysect/optical/material/meson.build | 28 +++++++++++++++++ .../optical/material/modifiers/meson.build | 26 ++++++++++++++++ raysect/optical/meson.build | 30 ++++++++++++++++++ raysect/optical/observer/base/meson.build | 26 ++++++++++++++++ raysect/optical/observer/imaging/meson.build | 26 ++++++++++++++++ raysect/optical/observer/meson.build | 30 ++++++++++++++++++ .../optical/observer/nonimaging/meson.build | 26 ++++++++++++++++ raysect/optical/observer/pipeline/meson.build | 28 +++++++++++++++++ .../observer/pipeline/mono/meson.build | 26 ++++++++++++++++ .../observer/pipeline/spectral/meson.build | 26 ++++++++++++++++ raysect/optical/scenegraph/meson.build | 26 ++++++++++++++++ raysect/primitive/lens/meson.build | 27 ++++++++++++++++ raysect/primitive/lens/tests/meson.build | 26 ++++++++++++++++ raysect/primitive/mesh/meson.build | 26 ++++++++++++++++ raysect/primitive/meson.build | 28 +++++++++++++++++ 60 files changed, 1603 insertions(+) create mode 100644 meson.build create mode 100644 raysect/core/acceleration/meson.build create mode 100644 raysect/core/acceleration/tests/meson.build create mode 100644 raysect/core/math/cython/interpolation/meson.build create mode 100644 raysect/core/math/cython/meson.build create mode 100644 raysect/core/math/cython/tests/meson.build create mode 100644 raysect/core/math/function/float/function1d/meson.build create mode 100644 raysect/core/math/function/float/function1d/tests/data/meson.build create mode 100644 raysect/core/math/function/float/function1d/tests/meson.build create mode 100644 raysect/core/math/function/float/function2d/interpolate/meson.build create mode 100644 raysect/core/math/function/float/function2d/interpolate/tests/data/meson.build create mode 100644 raysect/core/math/function/float/function2d/interpolate/tests/meson.build create mode 100644 raysect/core/math/function/float/function2d/meson.build create mode 100644 raysect/core/math/function/float/function2d/tests/meson.build create mode 100644 raysect/core/math/function/float/function3d/interpolate/meson.build create mode 100644 raysect/core/math/function/float/function3d/interpolate/tests/data/meson.build create mode 100644 raysect/core/math/function/float/function3d/interpolate/tests/meson.build create mode 100644 raysect/core/math/function/float/function3d/meson.build create mode 100644 raysect/core/math/function/float/function3d/tests/meson.build create mode 100644 raysect/core/math/function/float/meson.build create mode 100644 raysect/core/math/function/meson.build create mode 100644 raysect/core/math/function/vector3d/function1d/meson.build create mode 100644 raysect/core/math/function/vector3d/function1d/tests/meson.build create mode 100644 raysect/core/math/function/vector3d/function2d/meson.build create mode 100644 raysect/core/math/function/vector3d/function2d/tests/meson.build create mode 100644 raysect/core/math/function/vector3d/function3d/meson.build create mode 100644 raysect/core/math/function/vector3d/function3d/tests/meson.build create mode 100644 raysect/core/math/function/vector3d/meson.build create mode 100644 raysect/core/math/meson.build create mode 100644 raysect/core/math/sampler/meson.build create mode 100644 raysect/core/math/spatial/meson.build create mode 100644 raysect/core/math/tests/meson.build create mode 100644 raysect/core/meson.build create mode 100644 raysect/core/scenegraph/meson.build create mode 100644 raysect/core/scenegraph/tests/meson.build create mode 100644 raysect/core/tests/meson.build create mode 100644 raysect/meson.build create mode 100644 raysect/optical/library/components/meson.build create mode 100644 raysect/optical/library/glass/data/meson.build create mode 100644 raysect/optical/library/glass/meson.build create mode 100644 raysect/optical/library/meson.build create mode 100644 raysect/optical/library/metal/data/meson.build create mode 100644 raysect/optical/library/metal/meson.build create mode 100644 raysect/optical/library/spectra/meson.build create mode 100644 raysect/optical/material/emitter/meson.build create mode 100644 raysect/optical/material/meson.build create mode 100644 raysect/optical/material/modifiers/meson.build create mode 100644 raysect/optical/meson.build create mode 100644 raysect/optical/observer/base/meson.build create mode 100644 raysect/optical/observer/imaging/meson.build create mode 100644 raysect/optical/observer/meson.build create mode 100644 raysect/optical/observer/nonimaging/meson.build create mode 100644 raysect/optical/observer/pipeline/meson.build create mode 100644 raysect/optical/observer/pipeline/mono/meson.build create mode 100644 raysect/optical/observer/pipeline/spectral/meson.build create mode 100644 raysect/optical/scenegraph/meson.build create mode 100644 raysect/primitive/lens/meson.build create mode 100644 raysect/primitive/lens/tests/meson.build create mode 100644 raysect/primitive/mesh/meson.build create mode 100644 raysect/primitive/meson.build diff --git a/meson.build b/meson.build new file mode 100644 index 00000000..688b2a43 --- /dev/null +++ b/meson.build @@ -0,0 +1,10 @@ +project('raysect', 'cython', default_options: ['python.install-env=auto']) + +py = import('python').find_installation(pure: false) +numpy = dependency('numpy', method: 'config-tool') +fs = import('fs') + +cython_args = ['--annotate'] +cython_dependencies = [numpy] + +subdir('raysect') diff --git a/raysect/core/acceleration/meson.build b/raysect/core/acceleration/meson.build new file mode 100644 index 00000000..59e011dc --- /dev/null +++ b/raysect/core/acceleration/meson.build @@ -0,0 +1,27 @@ +target_path = 'raysect/core/acceleration' + +# source files +py_files = ['__init__.py'] +pyx_files = ['boundprimitive.pyx', 'unaccelerated.pyx', 'kdtree.pyx', 'accelerator.pyx'] +pxd_files = ['accelerator.pxd', 'unaccelerated.pxd', 'kdtree.pxd', 'boundprimitive.pxd', '__init__.pxd'] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + +subdir('tests') diff --git a/raysect/core/acceleration/tests/meson.build b/raysect/core/acceleration/tests/meson.build new file mode 100644 index 00000000..b87c1f8d --- /dev/null +++ b/raysect/core/acceleration/tests/meson.build @@ -0,0 +1,26 @@ +target_path = 'raysect/core/acceleration/tests' + +# source files +py_files = ['__init__.py'] +pyx_files = [] +pxd_files = [] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + diff --git a/raysect/core/math/cython/interpolation/meson.build b/raysect/core/math/cython/interpolation/meson.build new file mode 100644 index 00000000..4b6f4b99 --- /dev/null +++ b/raysect/core/math/cython/interpolation/meson.build @@ -0,0 +1,26 @@ +target_path = 'raysect/core/math/cython/interpolation' + +# source files +py_files = [] +pyx_files = ['cubic.pyx', 'linear.pyx'] +pxd_files = ['cubic.pxd', 'linear.pxd', '__init__.pxd'] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + diff --git a/raysect/core/math/cython/meson.build b/raysect/core/math/cython/meson.build new file mode 100644 index 00000000..35b0773c --- /dev/null +++ b/raysect/core/math/cython/meson.build @@ -0,0 +1,28 @@ +target_path = 'raysect/core/math/cython' + +# source files +py_files = ['__init__.py'] +pyx_files = ['triangle.pyx', 'utility.pyx', 'transform.pyx', 'tetrahedra.pyx'] +pxd_files = ['tetrahedra.pxd', 'triangle.pxd', 'utility.pxd', '__init__.pxd', 'transform.pxd'] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + +subdir('tests') +subdir('interpolation') diff --git a/raysect/core/math/cython/tests/meson.build b/raysect/core/math/cython/tests/meson.build new file mode 100644 index 00000000..ac336cf0 --- /dev/null +++ b/raysect/core/math/cython/tests/meson.build @@ -0,0 +1,26 @@ +target_path = 'raysect/core/math/cython/tests' + +# source files +py_files = ['test_utility.py', '__init__.py', 'test_tetrahedra.py', 'test_triangle.py'] +pyx_files = [] +pxd_files = [] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + diff --git a/raysect/core/math/function/float/function1d/meson.build b/raysect/core/math/function/float/function1d/meson.build new file mode 100644 index 00000000..4925b349 --- /dev/null +++ b/raysect/core/math/function/float/function1d/meson.build @@ -0,0 +1,27 @@ +target_path = 'raysect/core/math/function/float/function1d' + +# source files +py_files = ['__init__.py'] +pyx_files = ['arg.pyx', 'autowrap.pyx', 'samplers.pyx', 'base.pyx', 'blend.pyx', 'constant.pyx', 'cmath.pyx', 'interpolate.pyx'] +pxd_files = ['cmath.pxd', 'constant.pxd', 'autowrap.pxd', 'blend.pxd', 'samplers.pxd', 'base.pxd', 'interpolate.pxd', '__init__.pxd', 'arg.pxd'] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + +subdir('tests') diff --git a/raysect/core/math/function/float/function1d/tests/data/meson.build b/raysect/core/math/function/float/function1d/tests/data/meson.build new file mode 100644 index 00000000..69b60a18 --- /dev/null +++ b/raysect/core/math/function/float/function1d/tests/data/meson.build @@ -0,0 +1,26 @@ +target_path = 'raysect/core/math/function/float/function1d/tests/data' + +# source files +py_files = ['interpolator1d_test_data.py'] +pyx_files = [] +pxd_files = [] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + diff --git a/raysect/core/math/function/float/function1d/tests/meson.build b/raysect/core/math/function/float/function1d/tests/meson.build new file mode 100644 index 00000000..6a94862c --- /dev/null +++ b/raysect/core/math/function/float/function1d/tests/meson.build @@ -0,0 +1,27 @@ +target_path = 'raysect/core/math/function/float/function1d/tests' + +# source files +py_files = ['test_autowrap.py', 'test_cmath.py', 'test_arg.py', 'test_samplers.py', 'test_constant.py', 'test_base.py', 'test_interpolator.py', '__init__.py'] +pyx_files = [] +pxd_files = [] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + +subdir('data') diff --git a/raysect/core/math/function/float/function2d/interpolate/meson.build b/raysect/core/math/function/float/function2d/interpolate/meson.build new file mode 100644 index 00000000..eb1572ce --- /dev/null +++ b/raysect/core/math/function/float/function2d/interpolate/meson.build @@ -0,0 +1,27 @@ +target_path = 'raysect/core/math/function/float/function2d/interpolate' + +# source files +py_files = ['__init__.py'] +pyx_files = ['interpolator2darray.pyx', 'common.pyx', 'interpolator2dmesh.pyx', 'discrete2dmesh.pyx'] +pxd_files = ['interpolator2darray.pxd', 'interpolator2dmesh.pxd', 'common.pxd', 'discrete2dmesh.pxd', '__init__.pxd'] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + +subdir('tests') diff --git a/raysect/core/math/function/float/function2d/interpolate/tests/data/meson.build b/raysect/core/math/function/float/function2d/interpolate/tests/data/meson.build new file mode 100644 index 00000000..373d39b9 --- /dev/null +++ b/raysect/core/math/function/float/function2d/interpolate/tests/data/meson.build @@ -0,0 +1,26 @@ +target_path = 'raysect/core/math/function/float/function2d/interpolate/tests/data' + +# source files +py_files = ['interpolator2d_test_data.py'] +pyx_files = [] +pxd_files = [] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + diff --git a/raysect/core/math/function/float/function2d/interpolate/tests/meson.build b/raysect/core/math/function/float/function2d/interpolate/tests/meson.build new file mode 100644 index 00000000..0f9e6c7c --- /dev/null +++ b/raysect/core/math/function/float/function2d/interpolate/tests/meson.build @@ -0,0 +1,27 @@ +target_path = 'raysect/core/math/function/float/function2d/interpolate/tests' + +# source files +py_files = ['test_interpolator_2d.py', '__init__.py'] +pyx_files = [] +pxd_files = [] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + +subdir('data') diff --git a/raysect/core/math/function/float/function2d/meson.build b/raysect/core/math/function/float/function2d/meson.build new file mode 100644 index 00000000..2d18b795 --- /dev/null +++ b/raysect/core/math/function/float/function2d/meson.build @@ -0,0 +1,28 @@ +target_path = 'raysect/core/math/function/float/function2d' + +# source files +py_files = ['__init__.py'] +pyx_files = ['arg.pyx', 'autowrap.pyx', 'base.pyx', 'blend.pyx', 'constant.pyx', 'cmath.pyx'] +pxd_files = ['cmath.pxd', 'constant.pxd', 'autowrap.pxd', 'blend.pxd', 'base.pxd', '__init__.pxd', 'arg.pxd'] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + +subdir('tests') +subdir('interpolate') diff --git a/raysect/core/math/function/float/function2d/tests/meson.build b/raysect/core/math/function/float/function2d/tests/meson.build new file mode 100644 index 00000000..595ff898 --- /dev/null +++ b/raysect/core/math/function/float/function2d/tests/meson.build @@ -0,0 +1,26 @@ +target_path = 'raysect/core/math/function/float/function2d/tests' + +# source files +py_files = ['test_autowrap.py', 'test_cmath.py', 'test_arg.py', 'test_constant.py', 'test_base.py', '__init__.py'] +pyx_files = [] +pxd_files = [] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + diff --git a/raysect/core/math/function/float/function3d/interpolate/meson.build b/raysect/core/math/function/float/function3d/interpolate/meson.build new file mode 100644 index 00000000..648afc02 --- /dev/null +++ b/raysect/core/math/function/float/function3d/interpolate/meson.build @@ -0,0 +1,27 @@ +target_path = 'raysect/core/math/function/float/function3d/interpolate' + +# source files +py_files = ['__init__.py'] +pyx_files = ['common.pyx', 'discrete3dmesh.pyx', 'interpolator3darray.pyx'] +pxd_files = ['interpolator3darray.pxd', 'discrete3dmesh.pxd', 'common.pxd', '__init__.pxd'] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + +subdir('tests') diff --git a/raysect/core/math/function/float/function3d/interpolate/tests/data/meson.build b/raysect/core/math/function/float/function3d/interpolate/tests/data/meson.build new file mode 100644 index 00000000..7e2c9a69 --- /dev/null +++ b/raysect/core/math/function/float/function3d/interpolate/tests/data/meson.build @@ -0,0 +1,26 @@ +target_path = 'raysect/core/math/function/float/function3d/interpolate/tests/data' + +# source files +py_files = ['interpolator3d_test_data.py'] +pyx_files = [] +pxd_files = [] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + diff --git a/raysect/core/math/function/float/function3d/interpolate/tests/meson.build b/raysect/core/math/function/float/function3d/interpolate/tests/meson.build new file mode 100644 index 00000000..e48168a9 --- /dev/null +++ b/raysect/core/math/function/float/function3d/interpolate/tests/meson.build @@ -0,0 +1,27 @@ +target_path = 'raysect/core/math/function/float/function3d/interpolate/tests' + +# source files +py_files = ['test_interpolator_3d.py', '__init__.py'] +pyx_files = [] +pxd_files = [] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + +subdir('data') diff --git a/raysect/core/math/function/float/function3d/meson.build b/raysect/core/math/function/float/function3d/meson.build new file mode 100644 index 00000000..07700699 --- /dev/null +++ b/raysect/core/math/function/float/function3d/meson.build @@ -0,0 +1,28 @@ +target_path = 'raysect/core/math/function/float/function3d' + +# source files +py_files = ['__init__.py'] +pyx_files = ['arg.pyx', 'autowrap.pyx', 'base.pyx', 'blend.pyx', 'constant.pyx', 'cmath.pyx'] +pxd_files = ['cmath.pxd', 'constant.pxd', 'autowrap.pxd', 'blend.pxd', 'base.pxd', '__init__.pxd', 'arg.pxd'] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + +subdir('tests') +subdir('interpolate') diff --git a/raysect/core/math/function/float/function3d/tests/meson.build b/raysect/core/math/function/float/function3d/tests/meson.build new file mode 100644 index 00000000..e1ea771c --- /dev/null +++ b/raysect/core/math/function/float/function3d/tests/meson.build @@ -0,0 +1,26 @@ +target_path = 'raysect/core/math/function/float/function3d/tests' + +# source files +py_files = ['test_autowrap.py', 'test_cmath.py', 'test_arg.py', 'test_constant.py', 'test_base.py', '__init__.py'] +pyx_files = [] +pxd_files = [] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + diff --git a/raysect/core/math/function/float/meson.build b/raysect/core/math/function/float/meson.build new file mode 100644 index 00000000..3e9852c0 --- /dev/null +++ b/raysect/core/math/function/float/meson.build @@ -0,0 +1,29 @@ +target_path = 'raysect/core/math/function/float' + +# source files +py_files = ['__init__.py'] +pyx_files = ['base.pyx'] +pxd_files = ['base.pxd', '__init__.pxd'] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + +subdir('function1d') +subdir('function3d') +subdir('function2d') diff --git a/raysect/core/math/function/meson.build b/raysect/core/math/function/meson.build new file mode 100644 index 00000000..e88dc437 --- /dev/null +++ b/raysect/core/math/function/meson.build @@ -0,0 +1,28 @@ +target_path = 'raysect/core/math/function' + +# source files +py_files = ['__init__.py'] +pyx_files = ['base.pyx'] +pxd_files = ['base.pxd', '__init__.pxd'] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + +subdir('float') +subdir('vector3d') diff --git a/raysect/core/math/function/vector3d/function1d/meson.build b/raysect/core/math/function/vector3d/function1d/meson.build new file mode 100644 index 00000000..95868f10 --- /dev/null +++ b/raysect/core/math/function/vector3d/function1d/meson.build @@ -0,0 +1,27 @@ +target_path = 'raysect/core/math/function/vector3d/function1d' + +# source files +py_files = ['__init__.py'] +pyx_files = ['autowrap.pyx', 'base.pyx', 'utility.pyx', 'blend.pyx', 'constant.pyx'] +pxd_files = ['constant.pxd', 'autowrap.pxd', 'utility.pxd', 'blend.pxd', 'base.pxd', '__init__.pxd'] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + +subdir('tests') diff --git a/raysect/core/math/function/vector3d/function1d/tests/meson.build b/raysect/core/math/function/vector3d/function1d/tests/meson.build new file mode 100644 index 00000000..4ac3218f --- /dev/null +++ b/raysect/core/math/function/vector3d/function1d/tests/meson.build @@ -0,0 +1,26 @@ +target_path = 'raysect/core/math/function/vector3d/function1d/tests' + +# source files +py_files = ['test_autowrap.py', 'test_float_to_vector3d.py', 'test_constant.py', 'test_base.py', '__init__.py'] +pyx_files = [] +pxd_files = [] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + diff --git a/raysect/core/math/function/vector3d/function2d/meson.build b/raysect/core/math/function/vector3d/function2d/meson.build new file mode 100644 index 00000000..2493844a --- /dev/null +++ b/raysect/core/math/function/vector3d/function2d/meson.build @@ -0,0 +1,27 @@ +target_path = 'raysect/core/math/function/vector3d/function2d' + +# source files +py_files = ['__init__.py'] +pyx_files = ['autowrap.pyx', 'base.pyx', 'utility.pyx', 'blend.pyx', 'constant.pyx'] +pxd_files = ['constant.pxd', 'autowrap.pxd', 'utility.pxd', 'blend.pxd', 'base.pxd', '__init__.pxd'] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + +subdir('tests') diff --git a/raysect/core/math/function/vector3d/function2d/tests/meson.build b/raysect/core/math/function/vector3d/function2d/tests/meson.build new file mode 100644 index 00000000..0d06ac65 --- /dev/null +++ b/raysect/core/math/function/vector3d/function2d/tests/meson.build @@ -0,0 +1,26 @@ +target_path = 'raysect/core/math/function/vector3d/function2d/tests' + +# source files +py_files = ['test_autowrap.py', 'test_float_to_vector3d.py', 'test_constant.py', 'test_base.py', '__init__.py'] +pyx_files = [] +pxd_files = [] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + diff --git a/raysect/core/math/function/vector3d/function3d/meson.build b/raysect/core/math/function/vector3d/function3d/meson.build new file mode 100644 index 00000000..6e117736 --- /dev/null +++ b/raysect/core/math/function/vector3d/function3d/meson.build @@ -0,0 +1,27 @@ +target_path = 'raysect/core/math/function/vector3d/function3d' + +# source files +py_files = ['__init__.py'] +pyx_files = ['autowrap.pyx', 'base.pyx', 'utility.pyx', 'blend.pyx', 'constant.pyx'] +pxd_files = ['constant.pxd', 'autowrap.pxd', 'utility.pxd', 'blend.pxd', 'base.pxd', '__init__.pxd'] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + +subdir('tests') diff --git a/raysect/core/math/function/vector3d/function3d/tests/meson.build b/raysect/core/math/function/vector3d/function3d/tests/meson.build new file mode 100644 index 00000000..41a6e631 --- /dev/null +++ b/raysect/core/math/function/vector3d/function3d/tests/meson.build @@ -0,0 +1,26 @@ +target_path = 'raysect/core/math/function/vector3d/function3d/tests' + +# source files +py_files = ['test_autowrap.py', 'test_float_to_vector3d.py', 'test_constant.py', 'test_base.py', '__init__.py'] +pyx_files = [] +pxd_files = [] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + diff --git a/raysect/core/math/function/vector3d/meson.build b/raysect/core/math/function/vector3d/meson.build new file mode 100644 index 00000000..b3275de3 --- /dev/null +++ b/raysect/core/math/function/vector3d/meson.build @@ -0,0 +1,29 @@ +target_path = 'raysect/core/math/function/vector3d' + +# source files +py_files = ['__init__.py'] +pyx_files = ['base.pyx'] +pxd_files = ['base.pxd', '__init__.pxd'] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + +subdir('function1d') +subdir('function3d') +subdir('function2d') diff --git a/raysect/core/math/meson.build b/raysect/core/math/meson.build new file mode 100644 index 00000000..e1945434 --- /dev/null +++ b/raysect/core/math/meson.build @@ -0,0 +1,31 @@ +target_path = 'raysect/core/math' + +# source files +py_files = ['__init__.py'] +pyx_files = ['units.pyx', 'normal.pyx', 'point.pyx', 'polygon.pyx', 'quaternion.pyx', 'vector.pyx', '_mat4.pyx', 'random.pyx', '_vec3.pyx', 'transform.pyx', 'statsarray.pyx', 'affinematrix.pyx'] +pxd_files = ['units.pxd', 'random.pxd', 'point.pxd', '_vec3.pxd', 'normal.pxd', 'polygon.pxd', 'vector.pxd', 'statsarray.pxd', 'quaternion.pxd', 'affinematrix.pxd', '_mat4.pxd', '__init__.pxd', 'transform.pxd'] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + +subdir('function') +subdir('tests') +subdir('cython') +subdir('spatial') +subdir('sampler') diff --git a/raysect/core/math/sampler/meson.build b/raysect/core/math/sampler/meson.build new file mode 100644 index 00000000..63faac49 --- /dev/null +++ b/raysect/core/math/sampler/meson.build @@ -0,0 +1,26 @@ +target_path = 'raysect/core/math/sampler' + +# source files +py_files = ['__init__.py'] +pyx_files = ['solidangle.pyx', 'targetted.pyx', 'surface3d.pyx'] +pxd_files = ['targetted.pxd', 'surface3d.pxd', 'solidangle.pxd', '__init__.pxd'] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + diff --git a/raysect/core/math/spatial/meson.build b/raysect/core/math/spatial/meson.build new file mode 100644 index 00000000..e1fee40b --- /dev/null +++ b/raysect/core/math/spatial/meson.build @@ -0,0 +1,26 @@ +target_path = 'raysect/core/math/spatial' + +# source files +py_files = ['__init__.py'] +pyx_files = ['kdtree2d.pyx', 'kdtree3d.pyx'] +pxd_files = ['kdtree3d.pxd', 'kdtree2d.pxd', '__init__.pxd'] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + diff --git a/raysect/core/math/tests/meson.build b/raysect/core/math/tests/meson.build new file mode 100644 index 00000000..144922bb --- /dev/null +++ b/raysect/core/math/tests/meson.build @@ -0,0 +1,26 @@ +target_path = 'raysect/core/math/tests' + +# source files +py_files = ['test_transform.py', 'test_random.py', 'test_normal3d.py', 'test_point3d.py', 'test_interaction3d.py', 'test_vector3d.py', 'test_affinematrix3d.py', 'test_quaternion.py', 'test_point2d.py', '__init__.py', 'test_vector2d.py'] +pyx_files = [] +pxd_files = [] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + diff --git a/raysect/core/meson.build b/raysect/core/meson.build new file mode 100644 index 00000000..7c8bf71e --- /dev/null +++ b/raysect/core/meson.build @@ -0,0 +1,30 @@ +target_path = 'raysect/core' + +# source files +py_files = ['workflow.py', '__init__.py', 'constants.py'] +pyx_files = ['boundingsphere.pyx', 'material.pyx', 'containers.pyx', 'intersection.pyx', 'boundingbox.pyx', 'ray.pyx'] +pxd_files = ['material.pxd', 'containers.pxd', 'intersection.pxd', 'ray.pxd', 'boundingsphere.pxd', 'boundingbox.pxd', '__init__.pxd'] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + +subdir('tests') +subdir('scenegraph') +subdir('math') +subdir('acceleration') diff --git a/raysect/core/scenegraph/meson.build b/raysect/core/scenegraph/meson.build new file mode 100644 index 00000000..a3d36f69 --- /dev/null +++ b/raysect/core/scenegraph/meson.build @@ -0,0 +1,27 @@ +target_path = 'raysect/core/scenegraph' + +# source files +py_files = ['__init__.py'] +pyx_files = ['_nodebase.pyx', 'world.pyx', 'node.pyx', 'primitive.pyx', 'observer.pyx', 'utility.pyx', 'signal.pyx'] +pxd_files = ['_nodebase.pxd', 'observer.pxd', 'utility.pxd', 'world.pxd', 'primitive.pxd', 'signal.pxd', 'node.pxd', '__init__.pxd'] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + +subdir('tests') diff --git a/raysect/core/scenegraph/tests/meson.build b/raysect/core/scenegraph/tests/meson.build new file mode 100644 index 00000000..c193f6d8 --- /dev/null +++ b/raysect/core/scenegraph/tests/meson.build @@ -0,0 +1,26 @@ +target_path = 'raysect/core/scenegraph/tests' + +# source files +py_files = ['test_node.py', 'test_world.py', 'test_observer.py', '__init__.py', 'test_primitive.py'] +pyx_files = [] +pxd_files = [] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + diff --git a/raysect/core/tests/meson.build b/raysect/core/tests/meson.build new file mode 100644 index 00000000..176dfeda --- /dev/null +++ b/raysect/core/tests/meson.build @@ -0,0 +1,26 @@ +target_path = 'raysect/core/tests' + +# source files +py_files = ['__init__.py'] +pyx_files = [] +pxd_files = [] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + diff --git a/raysect/meson.build b/raysect/meson.build new file mode 100644 index 00000000..54f8f755 --- /dev/null +++ b/raysect/meson.build @@ -0,0 +1,30 @@ +target_path = 'raysect' + +# source files +py_files = ['__init__.py'] +pyx_files = [] +pxd_files = [] +data_files = ['VERSION'] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + +subdir('primitive') +subdir('__pycache__') +subdir('optical') +subdir('core') diff --git a/raysect/optical/library/components/meson.build b/raysect/optical/library/components/meson.build new file mode 100644 index 00000000..63029bf9 --- /dev/null +++ b/raysect/optical/library/components/meson.build @@ -0,0 +1,26 @@ +target_path = 'raysect/optical/library/components' + +# source files +py_files = ['__init__.py'] +pyx_files = [] +pxd_files = [] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + diff --git a/raysect/optical/library/glass/data/meson.build b/raysect/optical/library/glass/data/meson.build new file mode 100644 index 00000000..5e8865b9 --- /dev/null +++ b/raysect/optical/library/glass/data/meson.build @@ -0,0 +1,26 @@ +target_path = 'raysect/optical/library/glass/data' + +# source files +py_files = [] +pyx_files = [] +pxd_files = [] +data_files = ['schott_catalog_2000.csv', 'schott_catalog_2000_full.csv'] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + diff --git a/raysect/optical/library/glass/meson.build b/raysect/optical/library/glass/meson.build new file mode 100644 index 00000000..a65ac3ae --- /dev/null +++ b/raysect/optical/library/glass/meson.build @@ -0,0 +1,27 @@ +target_path = 'raysect/optical/library/glass' + +# source files +py_files = ['schott.py', '__init__.py'] +pyx_files = [] +pxd_files = [] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + +subdir('data') diff --git a/raysect/optical/library/meson.build b/raysect/optical/library/meson.build new file mode 100644 index 00000000..cde26f61 --- /dev/null +++ b/raysect/optical/library/meson.build @@ -0,0 +1,30 @@ +target_path = 'raysect/optical/library' + +# source files +py_files = ['__init__.py'] +pyx_files = [] +pxd_files = [] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + +subdir('spectra') +subdir('components') +subdir('glass') +subdir('metal') diff --git a/raysect/optical/library/metal/data/meson.build b/raysect/optical/library/metal/data/meson.build new file mode 100644 index 00000000..2d2a137c --- /dev/null +++ b/raysect/optical/library/metal/data/meson.build @@ -0,0 +1,26 @@ +target_path = 'raysect/optical/library/metal/data' + +# source files +py_files = ['convert_data.py'] +pyx_files = [] +pxd_files = [] +data_files = ['cobolt.json', 'tungsten.json', 'magnesium.json', 'sodium.json', 'silver.json', 'silicon.json', 'iron.json', 'palladium.json', 'gold.json', 'beryllium.json', 'lithium.json', 'copper.json', 'platinum.json', 'mercury.json', 'manganese.json', 'aluminium.json', 'titanium.json', 'nickel.json'] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + diff --git a/raysect/optical/library/metal/meson.build b/raysect/optical/library/metal/meson.build new file mode 100644 index 00000000..47bd36db --- /dev/null +++ b/raysect/optical/library/metal/meson.build @@ -0,0 +1,27 @@ +target_path = 'raysect/optical/library/metal' + +# source files +py_files = ['metal.py', '__init__.py', 'roughmetal.py'] +pyx_files = [] +pxd_files = [] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + +subdir('data') diff --git a/raysect/optical/library/spectra/meson.build b/raysect/optical/library/spectra/meson.build new file mode 100644 index 00000000..81f4ea5f --- /dev/null +++ b/raysect/optical/library/spectra/meson.build @@ -0,0 +1,26 @@ +target_path = 'raysect/optical/library/spectra' + +# source files +py_files = ['__init__.py', 'colours.py'] +pyx_files = ['blackbody.pyx'] +pxd_files = [] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + diff --git a/raysect/optical/material/emitter/meson.build b/raysect/optical/material/emitter/meson.build new file mode 100644 index 00000000..931aaede --- /dev/null +++ b/raysect/optical/material/emitter/meson.build @@ -0,0 +1,26 @@ +target_path = 'raysect/optical/material/emitter' + +# source files +py_files = ['__init__.py'] +pyx_files = ['checkerboard.pyx', 'uniform.pyx', 'anisotropic.pyx', 'unity.pyx', 'inhomogeneous.pyx', 'homogeneous.pyx'] +pxd_files = ['uniform.pxd', 'checkerboard.pxd', 'inhomogeneous.pxd', 'anisotropic.pxd', 'homogeneous.pxd', 'unity.pxd', '__init__.pxd'] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + diff --git a/raysect/optical/material/meson.build b/raysect/optical/material/meson.build new file mode 100644 index 00000000..d9bab581 --- /dev/null +++ b/raysect/optical/material/meson.build @@ -0,0 +1,28 @@ +target_path = 'raysect/optical/material' + +# source files +py_files = ['__init__.py'] +pyx_files = ['material.pyx', 'conductor.pyx', 'absorber.pyx', 'lambert.pyx', 'dielectric.pyx', 'debug.pyx'] +pxd_files = ['material.pxd', 'absorber.pxd', 'conductor.pxd', 'dielectric.pxd', 'debug.pxd', '__init__.pxd'] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + +subdir('emitter') +subdir('modifiers') diff --git a/raysect/optical/material/modifiers/meson.build b/raysect/optical/material/modifiers/meson.build new file mode 100644 index 00000000..b436e879 --- /dev/null +++ b/raysect/optical/material/modifiers/meson.build @@ -0,0 +1,26 @@ +target_path = 'raysect/optical/material/modifiers' + +# source files +py_files = ['__init__.py'] +pyx_files = ['roughen.pyx', 'add.pyx', 'blend.pyx', 'transform.pyx'] +pxd_files = [] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + diff --git a/raysect/optical/meson.build b/raysect/optical/meson.build new file mode 100644 index 00000000..427d3ac4 --- /dev/null +++ b/raysect/optical/meson.build @@ -0,0 +1,30 @@ +target_path = 'raysect/optical' + +# source files +py_files = ['__init__.py'] +pyx_files = ['loggingray.pyx', 'spectralfunction.pyx', 'colour.pyx', 'spectrum.pyx', 'ray.pyx'] +pxd_files = ['colour.pxd', 'ray.pxd', 'spectralfunction.pxd', 'spectrum.pxd', '__init__.pxd'] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + +subdir('material') +subdir('scenegraph') +subdir('observer') +subdir('library') diff --git a/raysect/optical/observer/base/meson.build b/raysect/optical/observer/base/meson.build new file mode 100644 index 00000000..8630abae --- /dev/null +++ b/raysect/optical/observer/base/meson.build @@ -0,0 +1,26 @@ +target_path = 'raysect/optical/observer/base' + +# source files +py_files = ['__init__.py'] +pyx_files = ['processor.pyx', 'slice.pyx', 'observer.pyx', 'sampler.pyx', 'pipeline.pyx'] +pxd_files = ['pipeline.pxd', 'observer.pxd', 'slice.pxd', 'processor.pxd', '__init__.pxd', 'sampler.pxd'] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + diff --git a/raysect/optical/observer/imaging/meson.build b/raysect/optical/observer/imaging/meson.build new file mode 100644 index 00000000..a4b89f75 --- /dev/null +++ b/raysect/optical/observer/imaging/meson.build @@ -0,0 +1,26 @@ +target_path = 'raysect/optical/observer/imaging' + +# source files +py_files = ['__init__.py'] +pyx_files = ['targetted_ccd.pyx', 'ccd.pyx', 'vector.pyx', 'pinhole.pyx', 'opencv.pyx', 'orthographic.pyx'] +pxd_files = ['targetted_ccd.pxd', 'ccd.pxd', 'orthographic.pxd', 'vector.pxd', 'pinhole.pxd', 'opencv.pxd', '__init__.pxd'] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + diff --git a/raysect/optical/observer/meson.build b/raysect/optical/observer/meson.build new file mode 100644 index 00000000..631e3f78 --- /dev/null +++ b/raysect/optical/observer/meson.build @@ -0,0 +1,30 @@ +target_path = 'raysect/optical/observer' + +# source files +py_files = ['__init__.py'] +pyx_files = ['sampler1d.pyx', 'sampler2d.pyx'] +pxd_files = ['__init__.pxd'] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + +subdir('base') +subdir('imaging') +subdir('nonimaging') +subdir('pipeline') diff --git a/raysect/optical/observer/nonimaging/meson.build b/raysect/optical/observer/nonimaging/meson.build new file mode 100644 index 00000000..29344683 --- /dev/null +++ b/raysect/optical/observer/nonimaging/meson.build @@ -0,0 +1,26 @@ +target_path = 'raysect/optical/observer/nonimaging' + +# source files +py_files = ['__init__.py'] +pyx_files = ['pixel.pyx', 'mesh_camera.pyx', 'fibreoptic.pyx', 'mesh_pixel.pyx', 'sightline.pyx', 'targetted_pixel.pyx'] +pxd_files = ['pixel.pxd', 'mesh_camera.pxd', 'sightline.pxd', 'mesh_pixel.pxd', 'fibreoptic.pxd', '__init__.pxd', 'targetted_pixel.pxd'] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + diff --git a/raysect/optical/observer/pipeline/meson.build b/raysect/optical/observer/pipeline/meson.build new file mode 100644 index 00000000..7719d89f --- /dev/null +++ b/raysect/optical/observer/pipeline/meson.build @@ -0,0 +1,28 @@ +target_path = 'raysect/optical/observer/pipeline' + +# source files +py_files = ['colormaps.py', '__init__.py'] +pyx_files = ['rgb.pyx', 'bayer.pyx'] +pxd_files = ['bayer.pxd', 'rgb.pxd', '__init__.pxd'] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + +subdir('mono') +subdir('spectral') diff --git a/raysect/optical/observer/pipeline/mono/meson.build b/raysect/optical/observer/pipeline/mono/meson.build new file mode 100644 index 00000000..be8e64db --- /dev/null +++ b/raysect/optical/observer/pipeline/mono/meson.build @@ -0,0 +1,26 @@ +target_path = 'raysect/optical/observer/pipeline/mono' + +# source files +py_files = ['__init__.py'] +pyx_files = ['radiance.pyx', 'power.pyx'] +pxd_files = ['power.pxd', 'radiance.pxd', '__init__.pxd'] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + diff --git a/raysect/optical/observer/pipeline/spectral/meson.build b/raysect/optical/observer/pipeline/spectral/meson.build new file mode 100644 index 00000000..a2f0b27e --- /dev/null +++ b/raysect/optical/observer/pipeline/spectral/meson.build @@ -0,0 +1,26 @@ +target_path = 'raysect/optical/observer/pipeline/spectral' + +# source files +py_files = ['__init__.py'] +pyx_files = ['radiance.pyx', 'power.pyx'] +pxd_files = ['power.pxd', 'radiance.pxd', '__init__.pxd'] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + diff --git a/raysect/optical/scenegraph/meson.build b/raysect/optical/scenegraph/meson.build new file mode 100644 index 00000000..3b0a3415 --- /dev/null +++ b/raysect/optical/scenegraph/meson.build @@ -0,0 +1,26 @@ +target_path = 'raysect/optical/scenegraph' + +# source files +py_files = ['__init__.py'] +pyx_files = ['world.pyx'] +pxd_files = ['world.pxd', '__init__.pxd'] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + diff --git a/raysect/primitive/lens/meson.build b/raysect/primitive/lens/meson.build new file mode 100644 index 00000000..6fa8cc2c --- /dev/null +++ b/raysect/primitive/lens/meson.build @@ -0,0 +1,27 @@ +target_path = 'raysect/primitive/lens' + +# source files +py_files = ['__init__.py'] +pyx_files = ['spherical.pyx'] +pxd_files = [] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + +subdir('tests') diff --git a/raysect/primitive/lens/tests/meson.build b/raysect/primitive/lens/tests/meson.build new file mode 100644 index 00000000..1889e9fc --- /dev/null +++ b/raysect/primitive/lens/tests/meson.build @@ -0,0 +1,26 @@ +target_path = 'raysect/primitive/lens/tests' + +# source files +py_files = ['test_spherical.py', '__init__.py'] +pyx_files = [] +pxd_files = [] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + diff --git a/raysect/primitive/mesh/meson.build b/raysect/primitive/mesh/meson.build new file mode 100644 index 00000000..431b3409 --- /dev/null +++ b/raysect/primitive/mesh/meson.build @@ -0,0 +1,26 @@ +target_path = 'raysect/primitive/mesh' + +# source files +py_files = ['vtk.py', 'ply.py', 'obj.py', '__init__.py', 'stl.py'] +pyx_files = ['mesh.pyx'] +pxd_files = ['mesh.pxd', '__init__.pxd'] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + diff --git a/raysect/primitive/meson.build b/raysect/primitive/meson.build new file mode 100644 index 00000000..9e4d80c9 --- /dev/null +++ b/raysect/primitive/meson.build @@ -0,0 +1,28 @@ +target_path = 'raysect/primitive' + +# source files +py_files = ['__init__.py'] +pyx_files = ['sphere.pyx', 'csg.pyx', 'box.pyx', 'cylinder.pyx', 'cone.pyx', 'utility.pyx', 'parabola.pyx'] +pxd_files = ['parabola.pxd', 'cone.pxd', 'csg.pxd', 'box.pxd', 'utility.pxd', 'sphere.pxd', '__init__.pxd', 'cylinder.pxd'] +data_files = [] + +# compile cython +foreach pyx_file: pyx_files + py.extension_module( + fs.replace_suffix(pyx_file, ''), + pyx_file, + dependencies: cython_dependencies, + install: true, + subdir: target_path, + cython_args: cython_args + ) +endforeach + +# add python, pxd and data files to the build +py.install_sources( + py_files + pxd_files + data_files, + subdir: target_path +) + +subdir('lens') +subdir('mesh') From 0e03c3a27f5343cd534da795b352f49b5e4d393d Mon Sep 17 00:00:00 2001 From: Dr Alex Meakins Date: Sat, 19 Jul 2025 18:37:07 +0100 Subject: [PATCH 07/21] Initial draft of pyproject.toml. --- pyproject.toml | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 17d821e2..b5644a88 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,25 @@ +[project] +name = 'raysect' +version = '0.9.0' +#url='http://www.raysect.org' +#author='Dr Alex Meakins et al.' +#author_email='developers@raysect.org' +#description='A Ray-tracing Framework for Science and Engineering' +#license='BSD-3-Clause' +#license-files = ["LICENSE.txt"] +#classifiers=[ +# 'Development Status :: 5 - Production/Stable', +# 'Intended Audience :: Science/Research', +# 'Intended Audience :: Education', +# 'Intended Audience :: Developers', +# 'Natural Language :: English', +# 'Operating System :: POSIX :: Linux', +# 'Programming Language :: Cython', +# 'Programming Language :: Python :: 3', +# 'Topic :: Multimedia :: Graphics :: 3D Rendering', +# 'Topic :: Scientific/Engineering :: Physics' +#] + [build-system] -requires = ["setuptools>=42.0", "wheel", "oldest-supported-numpy", "cython>=0.28,<3.0"] -build-backend = "setuptools.build_meta" +requires = ['meson-python', 'wheel', 'oldest-supported-numpy', 'cython<3.0'] +build-backend = 'mesonpy' From e700c7b96c70be59091d6e76929fb3357c7f06dc Mon Sep 17 00:00:00 2001 From: Dr Alex Meakins Date: Sat, 19 Jul 2025 18:49:48 +0100 Subject: [PATCH 08/21] Added directory filter to exclude __pycache__ folders (and autogenerated directories we discover in the future). --- dev/generate_meson_files.py | 11 ++++++++--- raysect/meson.build | 1 - 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/dev/generate_meson_files.py b/dev/generate_meson_files.py index da8f32a1..aa19d61c 100755 --- a/dev/generate_meson_files.py +++ b/dev/generate_meson_files.py @@ -3,7 +3,8 @@ from pathlib import Path PACKAGES = ['raysect'] -SUBDIR_EXCLUSION_FILENAME = '.meson-exclude' +EXCLUDE_DIR_FILE = '.meson-exclude' +EXCLUDED_DIRS = ['__pycache__'] def generate_meson_files(packages): @@ -98,8 +99,7 @@ def _install_subdir_meson_files(path): raise ValueError('The supplied path is not a directory.') # generate a list of subdirectories, filtering excluded - # todo: filter pycache files etc.. - subdirs = [child for child in path.iterdir() if child.is_dir() and not (child / SUBDIR_EXCLUSION_FILENAME).exists()] + subdirs = [child for child in path.iterdir() if child.is_dir() and not _excluded_dir(child)] # write meson file meson_file = path / 'meson.build' @@ -110,6 +110,11 @@ def _install_subdir_meson_files(path): _install_subdir_meson_files(subdir) +def _excluded_dir(path): + foo = (path / EXCLUDE_DIR_FILE).exists() or path.name in EXCLUDED_DIRS + return foo + + def _generate_root_meson_file(subdirs): # read template diff --git a/raysect/meson.build b/raysect/meson.build index 54f8f755..6a12bcff 100644 --- a/raysect/meson.build +++ b/raysect/meson.build @@ -25,6 +25,5 @@ py.install_sources( ) subdir('primitive') -subdir('__pycache__') subdir('optical') subdir('core') From 14209f0cd3b8dc11b6f6428c91fa620828c21a84 Mon Sep 17 00:00:00 2001 From: Dr Alex Meakins Date: Sat, 19 Jul 2025 18:50:06 +0100 Subject: [PATCH 09/21] Deleted setup.py. --- setup.py | 122 ------------------------------------------------------- 1 file changed, 122 deletions(-) delete mode 100644 setup.py diff --git a/setup.py b/setup.py deleted file mode 100644 index a02a8973..00000000 --- a/setup.py +++ /dev/null @@ -1,122 +0,0 @@ -from setuptools import setup, find_packages, Extension -from setuptools.command.build_ext import build_ext as _build_ext -import sys -import numpy -import os -import os.path as path -import multiprocessing - -multiprocessing.set_start_method('fork') - -use_cython = True -force = False -profile = False -line_profile = False -annotate = False - -if "--skip-cython" in sys.argv: - use_cython = False - del sys.argv[sys.argv.index("--skip-cython")] - -if "--force" in sys.argv: - force = True - del sys.argv[sys.argv.index("--force")] - -if "--profile" in sys.argv: - profile = True - del sys.argv[sys.argv.index("--profile")] - -if "--line-profile" in sys.argv: - line_profile = True - del sys.argv[sys.argv.index("--line-profile")] - -if "--annotate" in sys.argv: - annotate = True - sys.argv.remove("--annotate") - -source_paths = ['raysect', 'demos'] -compilation_includes = [".", numpy.get_include()] -compilation_args = ['-O3'] -cython_directives = { - # 'auto_pickle': True, - 'language_level': 3 -} -setup_path = path.dirname(path.abspath(__file__)) - -if line_profile: - compilation_args.append("-DCYTHON_TRACE=1") - compilation_args.append("-DCYTHON_TRACE_NOGIL=1") - cython_directives["linetrace"] = True - -if use_cython: - - from Cython.Build import cythonize - - # build .pyx extension list - extensions = [] - for package in source_paths: - for root, dirs, files in os.walk(path.join(setup_path, package)): - for file in files: - if path.splitext(file)[1] == ".pyx": - pyx_file = path.relpath(path.join(root, file), setup_path) - module = path.splitext(pyx_file)[0].replace("/", ".") - extensions.append(Extension(module, [pyx_file], include_dirs=compilation_includes, extra_compile_args=compilation_args),) - - if profile: - cython_directives["profile"] = True - - # generate .c files from .pyx - extensions = cythonize(extensions, nthreads=multiprocessing.cpu_count(), force=force, compiler_directives=cython_directives, annotate=annotate) - -else: - - # build .c extension list - extensions = [] - for package in source_paths: - for root, dirs, files in os.walk(path.join(setup_path, package)): - for file in files: - if path.splitext(file)[1] == ".c": - c_file = path.relpath(path.join(root, file), setup_path) - module = path.splitext(c_file)[0].replace("/", ".") - extensions.append(Extension(module, [c_file], include_dirs=compilation_includes, extra_compile_args=compilation_args),) - -# parse the package version number -with open(path.join(path.dirname(__file__), 'raysect/VERSION')) as version_file: - version = version_file.read().strip() - -# Use multiple processes by default for building extensions -class build_ext(_build_ext): - def finalize_options(self): - super().finalize_options() - if self.parallel is None: - nproc = int(os.getenv("RAYSECT_BUILD_JOBS", str(multiprocessing.cpu_count()))) - self.parallel = nproc - -setup( - name="raysect", - version=version, - url="http://www.raysect.org", - author="Dr Alex Meakins et al.", - author_email="developers@raysect.org", - description='A Ray-tracing Framework for Science and Engineering', - license="BSD", - classifiers=[ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Science/Research", - "Intended Audience :: Education", - "Intended Audience :: Developers", - "License :: OSI Approved :: BSD License", - "Natural Language :: English", - "Operating System :: POSIX :: Linux", - "Programming Language :: Cython", - "Programming Language :: Python :: 3", - "Topic :: Multimedia :: Graphics :: 3D Rendering", - "Topic :: Scientific/Engineering :: Physics" - ], - install_requires=['numpy', 'matplotlib'], - packages=find_packages(), - include_package_data=True, - zip_safe= False, - ext_modules=extensions, - cmdclass={"build_ext": build_ext}, -) From 8bbcf0454741a82624919ccb471850eef70a75f6 Mon Sep 17 00:00:00 2001 From: Dr Alex Meakins Date: Sat, 19 Jul 2025 19:02:53 +0100 Subject: [PATCH 10/21] Updated pyproject.toml. --- pyproject.toml | 50 ++++++++++++++++++++++++++++---------------------- 1 file changed, 28 insertions(+), 22 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index b5644a88..20fd13b5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,25 +1,31 @@ [project] -name = 'raysect' -version = '0.9.0' -#url='http://www.raysect.org' -#author='Dr Alex Meakins et al.' -#author_email='developers@raysect.org' -#description='A Ray-tracing Framework for Science and Engineering' -#license='BSD-3-Clause' -#license-files = ["LICENSE.txt"] -#classifiers=[ -# 'Development Status :: 5 - Production/Stable', -# 'Intended Audience :: Science/Research', -# 'Intended Audience :: Education', -# 'Intended Audience :: Developers', -# 'Natural Language :: English', -# 'Operating System :: POSIX :: Linux', -# 'Programming Language :: Cython', -# 'Programming Language :: Python :: 3', -# 'Topic :: Multimedia :: Graphics :: 3D Rendering', -# 'Topic :: Scientific/Engineering :: Physics' -#] +name = "raysect" +version = "0.9.0" +requires-python = ">=3.8" +authors = [{name = "Dr Alex Meakins et al.", email = "developers@raysect.org"}] +description = "A Ray-tracing Framework for Science and Engineering" +readme = "README.txt" +license = "BSD-3-Clause" +license-files = ["LICENSE.txt"] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Science/Research", + "Intended Audience :: Education", + "Intended Audience :: Developers", + "Natural Language :: English", + "Operating System :: POSIX :: Linux", + "Programming Language :: Cython", + "Programming Language :: Python :: 3", + "Topic :: Multimedia :: Graphics :: 3D Rendering", + "Topic :: Scientific/Engineering :: Physics" +] + +[project.urls] +Homepage = "https://www.raysect.org" +Repository = "https://github.com/raysect/source" +Issues = "https://github.com/raysect/source/issues" +Changelog = "https://github.com/raysect/source/blob/master/CHANGELOG.txt" [build-system] -requires = ['meson-python', 'wheel', 'oldest-supported-numpy', 'cython<3.0'] -build-backend = 'mesonpy' +requires = ["meson-python", "setuptools", "wheel", "oldest-supported-numpy", "cython<3.0"] +build-backend = "mesonpy" From 92190877776fcac6c9f656438fe0d68c8e5ebeb6 Mon Sep 17 00:00:00 2001 From: Dr Alex Meakins Date: Sat, 19 Jul 2025 19:06:08 +0100 Subject: [PATCH 11/21] Fixed readme definition in pyproject.toml. --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 20fd13b5..0f14f6bd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ version = "0.9.0" requires-python = ">=3.8" authors = [{name = "Dr Alex Meakins et al.", email = "developers@raysect.org"}] description = "A Ray-tracing Framework for Science and Engineering" -readme = "README.txt" +readme = {file = "README.md", content-type = "text/markdown"} license = "BSD-3-Clause" license-files = ["LICENSE.txt"] classifiers = [ From c7d5336af632c9782145cca96629bb12a6c15464 Mon Sep 17 00:00:00 2001 From: Dr Alex Meakins Date: Sat, 19 Jul 2025 19:06:43 +0100 Subject: [PATCH 12/21] Removed manifest file. --- MANIFEST.in | 6 ------ 1 file changed, 6 deletions(-) delete mode 100644 MANIFEST.in diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 858ec3f7..00000000 --- a/MANIFEST.in +++ /dev/null @@ -1,6 +0,0 @@ -include README.md CHANGELOG.txt LICENSE.txt CONTRIBUTING.txt AUTHORS.txt MANIFEST.in setup.py .gitignore -include raysect/VERSION -global-exclude *.c -recursive-include raysect *.py *.pyx *.pxd *.csv *.json -recursive-include demos *.py *.pyx *.pxd *.csv *.obj *.rsm -recursive-include docs * From 04a61bcd205eb176f9db950dc8a7b8413d013323 Mon Sep 17 00:00:00 2001 From: Dr Alex Meakins Date: Sat, 19 Jul 2025 19:10:52 +0100 Subject: [PATCH 13/21] Investigating issue with wheel build and numpy. --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 0f14f6bd..cc2ca5b8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,5 +27,5 @@ Issues = "https://github.com/raysect/source/issues" Changelog = "https://github.com/raysect/source/blob/master/CHANGELOG.txt" [build-system] -requires = ["meson-python", "setuptools", "wheel", "oldest-supported-numpy", "cython<3.0"] +requires = ["meson-python", "setuptools", "wheel", "numpy", "cython<3.0"] build-backend = "mesonpy" From 36d32d951b90864d0170f0e5051419ce7f556506 Mon Sep 17 00:00:00 2001 From: Dr Alex Meakins Date: Sat, 19 Jul 2025 19:19:15 +0100 Subject: [PATCH 14/21] Quick hack to see if we can get the CI functioning. --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4f7081a2..15d3e52f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: fail-fast: false matrix: numpy-version: ["oldest-supported-numpy", "numpy"] - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - name: Checkout code uses: actions/checkout@v4 @@ -21,8 +21,8 @@ jobs: with: python-version: ${{ matrix.python-version }} - name: Install Python dependencies - run: python -m pip install --prefer-binary setuptools "cython>=0.28,<3.0" "matplotlib>=3,<4" ${{ matrix.numpy-version }} + run: python -m pip install --prefer-binary meson-python meson ninja setuptools "cython>=0.28,<3.0" "matplotlib>=3,<4" ${{ matrix.numpy-version }} - name: Build and install Raysect - run: dev/build.sh + run: dev/install_editable.sh - name: Run tests run: dev/test.sh From 40dc2d78b217e24432855a37c078cd1e227ec840 Mon Sep 17 00:00:00 2001 From: Dr Alex Meakins Date: Sat, 19 Jul 2025 19:26:39 +0100 Subject: [PATCH 15/21] Remove support for python 3.8. Removed oldest support numpy for now (until I can resolve why the build is having issues with it). --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 15d3e52f..bbeae168 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,8 +11,8 @@ jobs: strategy: fail-fast: false matrix: - numpy-version: ["oldest-supported-numpy", "numpy"] - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + numpy-version: ["numpy"] + python-version: ["3.9", "3.10", "3.11", "3.12"] steps: - name: Checkout code uses: actions/checkout@v4 From 6d29384a9e708b3c3f5c2cdf1c0f808a379c6f11 Mon Sep 17 00:00:00 2001 From: Dr Alex Meakins Date: Sat, 19 Jul 2025 20:21:06 +0100 Subject: [PATCH 16/21] Changed plan regarding demos folder. The sdist will essentially be the repository. --- CHANGELOG.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 36fe9096..d08d082d 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -12,7 +12,6 @@ Build changes: - A dev/install_editable.sh script is provided to simplify the installation of the package in editable mode with verbose build output enabled. - Meson-python performs the build out of the project folder, so the project source folders will no longer be polluted with build artefacts. - Cython build annotations are now always enabled, the annotation files can be found in the build folder under the build artefacts folder associated with each so file (*.so.a folder). -* The demos folder is no longer included in the raysect package to reduce its size. Please clone the source repository to obtain the demos. A dedicated raysect-demos package is being investigated for the future. Release 0.8.1 (12 Feb 2023) From 9c4b8444fa09e77a99056ebce116eeb1f1477eb3 Mon Sep 17 00:00:00 2001 From: Dr Alex Meakins Date: Sat, 19 Jul 2025 20:22:04 +0100 Subject: [PATCH 17/21] Updated version number. --- raysect/VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/raysect/VERSION b/raysect/VERSION index 53a48a1e..899f24fc 100644 --- a/raysect/VERSION +++ b/raysect/VERSION @@ -1 +1 @@ -0.8.2 \ No newline at end of file +0.9.0 \ No newline at end of file From e41c1c395ae4a406adfa2cdfb3461678ddac7b2f Mon Sep 17 00:00:00 2001 From: Dr Alex Meakins Date: Sat, 19 Jul 2025 20:27:05 +0100 Subject: [PATCH 18/21] Fixed typo in changelog.txt --- CHANGELOG.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index d08d082d..7dd3faf6 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -11,7 +11,7 @@ Build changes: - When installed in editable mode, any modified pyx files will automatically trigger a rebuild when python attempts to import from the package. Please be aware that (as with the previous build system) changes to pxd files will require a clean rebuild of the project. - A dev/install_editable.sh script is provided to simplify the installation of the package in editable mode with verbose build output enabled. - Meson-python performs the build out of the project folder, so the project source folders will no longer be polluted with build artefacts. - - Cython build annotations are now always enabled, the annotation files can be found in the build folder under the build artefacts folder associated with each so file (*.so.a folder). + - Cython build annotations are now always enabled, the annotation files can be found in the build folder under the build artefacts folder associated with each so file (*.so.p folder). Release 0.8.1 (12 Feb 2023) From 3976cafa75a59fa3f0becfffafbefb665fd94d04 Mon Sep 17 00:00:00 2001 From: Dr Alex Meakins Date: Sat, 19 Jul 2025 21:25:45 +0100 Subject: [PATCH 19/21] Minimum supported version of python now 3.9. --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index cc2ca5b8..a66e34b9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "raysect" version = "0.9.0" -requires-python = ">=3.8" +requires-python = ">=3.9" authors = [{name = "Dr Alex Meakins et al.", email = "developers@raysect.org"}] description = "A Ray-tracing Framework for Science and Engineering" readme = {file = "README.md", content-type = "text/markdown"} From 7a52d81934f1052064e83ad157e3a15840b2199f Mon Sep 17 00:00:00 2001 From: Dr Alex Meakins Date: Sat, 19 Jul 2025 22:36:06 +0100 Subject: [PATCH 20/21] Added a developer warning to the autogenerated meson.build files. Added the ability to protect customised meson.build files from modification by the generator script. Added venv/ to .gitignore. --- .gitignore | 3 +- dev/generate_meson_files.py | 82 ++++++++++++++++--- meson.build | 3 + raysect/core/acceleration/meson.build | 3 + raysect/core/acceleration/tests/meson.build | 3 + .../math/cython/interpolation/meson.build | 3 + raysect/core/math/cython/meson.build | 3 + raysect/core/math/cython/tests/meson.build | 3 + .../function/float/function1d/meson.build | 3 + .../float/function1d/tests/data/meson.build | 3 + .../float/function1d/tests/meson.build | 3 + .../float/function2d/interpolate/meson.build | 3 + .../interpolate/tests/data/meson.build | 3 + .../function2d/interpolate/tests/meson.build | 3 + .../function/float/function2d/meson.build | 3 + .../float/function2d/tests/meson.build | 3 + .../float/function3d/interpolate/meson.build | 3 + .../interpolate/tests/data/meson.build | 3 + .../function3d/interpolate/tests/meson.build | 3 + .../function/float/function3d/meson.build | 3 + .../float/function3d/tests/meson.build | 3 + raysect/core/math/function/float/meson.build | 3 + raysect/core/math/function/meson.build | 3 + .../function/vector3d/function1d/meson.build | 3 + .../vector3d/function1d/tests/meson.build | 3 + .../function/vector3d/function2d/meson.build | 3 + .../vector3d/function2d/tests/meson.build | 3 + .../function/vector3d/function3d/meson.build | 3 + .../vector3d/function3d/tests/meson.build | 3 + .../core/math/function/vector3d/meson.build | 3 + raysect/core/math/meson.build | 3 + raysect/core/math/sampler/meson.build | 3 + raysect/core/math/spatial/meson.build | 3 + raysect/core/math/tests/meson.build | 3 + raysect/core/meson.build | 3 + raysect/core/scenegraph/meson.build | 3 + raysect/core/scenegraph/tests/meson.build | 3 + raysect/core/tests/meson.build | 3 + raysect/meson.build | 3 + .../optical/library/components/meson.build | 3 + .../optical/library/glass/data/meson.build | 3 + raysect/optical/library/glass/meson.build | 3 + raysect/optical/library/meson.build | 3 + .../optical/library/metal/data/meson.build | 3 + raysect/optical/library/metal/meson.build | 3 + raysect/optical/library/spectra/meson.build | 3 + raysect/optical/material/emitter/meson.build | 3 + raysect/optical/material/meson.build | 3 + .../optical/material/modifiers/meson.build | 3 + raysect/optical/meson.build | 3 + raysect/optical/observer/base/meson.build | 3 + raysect/optical/observer/imaging/meson.build | 3 + raysect/optical/observer/meson.build | 3 + .../optical/observer/nonimaging/meson.build | 3 + raysect/optical/observer/pipeline/meson.build | 3 + .../observer/pipeline/mono/meson.build | 3 + .../observer/pipeline/spectral/meson.build | 3 + raysect/optical/scenegraph/meson.build | 3 + raysect/primitive/lens/meson.build | 3 + raysect/primitive/lens/tests/meson.build | 3 + raysect/primitive/mesh/meson.build | 3 + raysect/primitive/meson.build | 3 + 62 files changed, 253 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 2e0ea683..c38bf609 100644 --- a/.gitignore +++ b/.gitignore @@ -4,11 +4,12 @@ __pycache__/ *$py.class # C extensions -*.so +*.son option to enable profiling *.c # Distribution / packaging .Python env/ +venv/ build/ develop-eggs/ dist/ diff --git a/dev/generate_meson_files.py b/dev/generate_meson_files.py index aa19d61c..ee4b4569 100755 --- a/dev/generate_meson_files.py +++ b/dev/generate_meson_files.py @@ -1,9 +1,40 @@ #!/bin/env python +# Copyright (c) 2014-2025, Dr Alex Meakins, Raysect Project +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# 1. Redistributions of source code must retain the above copyright notice, +# this list of conditions and the following disclaimer. +# +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# 3. Neither the name of the Raysect Project nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + from pathlib import Path PACKAGES = ['raysect'] + EXCLUDE_DIR_FILE = '.meson-exclude' +CUSTOM_MESON_BUILD = '.meson-custom' EXCLUDED_DIRS = ['__pycache__'] @@ -33,13 +64,17 @@ def generate_meson_files(packages): ".meson-exclude". If the exclusion file is found, the sub-directory and its descendants will be ignored during the generation process. + Occasionally a meson.build file may need to be customised in the source tree. Placing a file called ".meson-custom" + in the same directory as the meson.build file will protect the customised file from deletion or replacement by this + script. + :param packages: A list of package names. """ root_path = Path('.') package_paths = [Path(package) for package in packages] - # Walk the project folder and specified packages to remove all meson.build files. + # Walk the project folder and specified packages to remove all (non-custom) meson.build files. # Any stale meson.build files found in excluded directories are also removed. _remove_meson_files(root_path, subdirs=package_paths) @@ -66,9 +101,10 @@ def _remove_meson_files(path, subdirs=None): if subdirs and any([not subdir.is_dir() for subdir in subdirs]): raise ValueError('The list of sub-directories must only contain paths to valid directories.') - # remove meson.build in this directory - meson_file = path / 'meson.build' - meson_file.unlink(missing_ok=True) + # remove meson.build in this directory if it is not flagged as customised + if not _custom_meson_file(path): + meson_file = path / 'meson.build' + meson_file.unlink(missing_ok=True) # generate a list of subdirectories if none supplied if not subdirs: @@ -88,8 +124,8 @@ def _install_root_meson_file(path, subdirs): if any([not subdir.is_dir() for subdir in subdirs]): raise ValueError('The list of sub-directories must only contain paths to valid directories.') - meson_file = path / 'meson.build' - meson_file.write_text(_generate_root_meson_file(subdirs)) + # write meson file + _write_meson_file(path, _generate_root_meson_file(subdirs)) def _install_subdir_meson_files(path): @@ -102,14 +138,23 @@ def _install_subdir_meson_files(path): subdirs = [child for child in path.iterdir() if child.is_dir() and not _excluded_dir(child)] # write meson file - meson_file = path / 'meson.build' - meson_file.write_text(_generate_subdir_meson_file(path, subdirs)) + _write_meson_file(path, _generate_subdir_meson_file(path, subdirs)) # recurse into sub-directories for subdir in subdirs: _install_subdir_meson_files(subdir) +def _write_meson_file(path, contents): + if not _custom_meson_file(path): + meson_file = path / 'meson.build' + meson_file.write_text(contents) + + +def _custom_meson_file(path): + return (path / CUSTOM_MESON_BUILD).exists() + + def _excluded_dir(path): foo = (path / EXCLUDE_DIR_FILE).exists() or path.name in EXCLUDED_DIRS return foo @@ -119,7 +164,16 @@ def _generate_root_meson_file(subdirs): # read template template_path = Path(__file__).parent / 'root-meson.build' - contents = template_path.read_text() + template = template_path.read_text() + + # start contents with a warning + contents = ( + "# WARNING: This file is automatically generated by dev/generate_meson_files.py.\n" + "# The template file used to generate this file is dev/root-meson.build.\n\n" + ) + + # add template + contents += template # add subdir entries contents += '\n' @@ -157,8 +211,14 @@ def _generate_subdir_meson_file(path, subdirs): else: data.append(child.name) - # fill in template entries - contents = template.format( + # start contents with a warning + contents = ( + "# WARNING: This file is automatically generated by dev/generate_meson_files.py.\n" + "# The template file used to generate this file is dev/subdir-meson.build.\n\n" + ) + + # add template, filling in the variables + contents += template.format( target=f'\'{str(path)}\'', pyx_files=str(pyx), pxd_files=str(pxd), diff --git a/meson.build b/meson.build index 688b2a43..072eed68 100644 --- a/meson.build +++ b/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/root-meson.build. + project('raysect', 'cython', default_options: ['python.install-env=auto']) py = import('python').find_installation(pure: false) diff --git a/raysect/core/acceleration/meson.build b/raysect/core/acceleration/meson.build index 59e011dc..4b45982b 100644 --- a/raysect/core/acceleration/meson.build +++ b/raysect/core/acceleration/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/core/acceleration' # source files diff --git a/raysect/core/acceleration/tests/meson.build b/raysect/core/acceleration/tests/meson.build index b87c1f8d..53eb7130 100644 --- a/raysect/core/acceleration/tests/meson.build +++ b/raysect/core/acceleration/tests/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/core/acceleration/tests' # source files diff --git a/raysect/core/math/cython/interpolation/meson.build b/raysect/core/math/cython/interpolation/meson.build index 4b6f4b99..473a025d 100644 --- a/raysect/core/math/cython/interpolation/meson.build +++ b/raysect/core/math/cython/interpolation/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/core/math/cython/interpolation' # source files diff --git a/raysect/core/math/cython/meson.build b/raysect/core/math/cython/meson.build index 35b0773c..aac5c9dc 100644 --- a/raysect/core/math/cython/meson.build +++ b/raysect/core/math/cython/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/core/math/cython' # source files diff --git a/raysect/core/math/cython/tests/meson.build b/raysect/core/math/cython/tests/meson.build index ac336cf0..e462f440 100644 --- a/raysect/core/math/cython/tests/meson.build +++ b/raysect/core/math/cython/tests/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/core/math/cython/tests' # source files diff --git a/raysect/core/math/function/float/function1d/meson.build b/raysect/core/math/function/float/function1d/meson.build index 4925b349..1ab0aad8 100644 --- a/raysect/core/math/function/float/function1d/meson.build +++ b/raysect/core/math/function/float/function1d/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/core/math/function/float/function1d' # source files diff --git a/raysect/core/math/function/float/function1d/tests/data/meson.build b/raysect/core/math/function/float/function1d/tests/data/meson.build index 69b60a18..54664e7b 100644 --- a/raysect/core/math/function/float/function1d/tests/data/meson.build +++ b/raysect/core/math/function/float/function1d/tests/data/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/core/math/function/float/function1d/tests/data' # source files diff --git a/raysect/core/math/function/float/function1d/tests/meson.build b/raysect/core/math/function/float/function1d/tests/meson.build index 6a94862c..5e2f0eba 100644 --- a/raysect/core/math/function/float/function1d/tests/meson.build +++ b/raysect/core/math/function/float/function1d/tests/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/core/math/function/float/function1d/tests' # source files diff --git a/raysect/core/math/function/float/function2d/interpolate/meson.build b/raysect/core/math/function/float/function2d/interpolate/meson.build index eb1572ce..595a8598 100644 --- a/raysect/core/math/function/float/function2d/interpolate/meson.build +++ b/raysect/core/math/function/float/function2d/interpolate/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/core/math/function/float/function2d/interpolate' # source files diff --git a/raysect/core/math/function/float/function2d/interpolate/tests/data/meson.build b/raysect/core/math/function/float/function2d/interpolate/tests/data/meson.build index 373d39b9..c2c7b3c2 100644 --- a/raysect/core/math/function/float/function2d/interpolate/tests/data/meson.build +++ b/raysect/core/math/function/float/function2d/interpolate/tests/data/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/core/math/function/float/function2d/interpolate/tests/data' # source files diff --git a/raysect/core/math/function/float/function2d/interpolate/tests/meson.build b/raysect/core/math/function/float/function2d/interpolate/tests/meson.build index 0f9e6c7c..930888be 100644 --- a/raysect/core/math/function/float/function2d/interpolate/tests/meson.build +++ b/raysect/core/math/function/float/function2d/interpolate/tests/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/core/math/function/float/function2d/interpolate/tests' # source files diff --git a/raysect/core/math/function/float/function2d/meson.build b/raysect/core/math/function/float/function2d/meson.build index 2d18b795..291e2a1b 100644 --- a/raysect/core/math/function/float/function2d/meson.build +++ b/raysect/core/math/function/float/function2d/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/core/math/function/float/function2d' # source files diff --git a/raysect/core/math/function/float/function2d/tests/meson.build b/raysect/core/math/function/float/function2d/tests/meson.build index 595ff898..883f6155 100644 --- a/raysect/core/math/function/float/function2d/tests/meson.build +++ b/raysect/core/math/function/float/function2d/tests/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/core/math/function/float/function2d/tests' # source files diff --git a/raysect/core/math/function/float/function3d/interpolate/meson.build b/raysect/core/math/function/float/function3d/interpolate/meson.build index 648afc02..55828ab8 100644 --- a/raysect/core/math/function/float/function3d/interpolate/meson.build +++ b/raysect/core/math/function/float/function3d/interpolate/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/core/math/function/float/function3d/interpolate' # source files diff --git a/raysect/core/math/function/float/function3d/interpolate/tests/data/meson.build b/raysect/core/math/function/float/function3d/interpolate/tests/data/meson.build index 7e2c9a69..430429d5 100644 --- a/raysect/core/math/function/float/function3d/interpolate/tests/data/meson.build +++ b/raysect/core/math/function/float/function3d/interpolate/tests/data/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/core/math/function/float/function3d/interpolate/tests/data' # source files diff --git a/raysect/core/math/function/float/function3d/interpolate/tests/meson.build b/raysect/core/math/function/float/function3d/interpolate/tests/meson.build index e48168a9..b8244427 100644 --- a/raysect/core/math/function/float/function3d/interpolate/tests/meson.build +++ b/raysect/core/math/function/float/function3d/interpolate/tests/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/core/math/function/float/function3d/interpolate/tests' # source files diff --git a/raysect/core/math/function/float/function3d/meson.build b/raysect/core/math/function/float/function3d/meson.build index 07700699..e4610299 100644 --- a/raysect/core/math/function/float/function3d/meson.build +++ b/raysect/core/math/function/float/function3d/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/core/math/function/float/function3d' # source files diff --git a/raysect/core/math/function/float/function3d/tests/meson.build b/raysect/core/math/function/float/function3d/tests/meson.build index e1ea771c..1e5ef2c8 100644 --- a/raysect/core/math/function/float/function3d/tests/meson.build +++ b/raysect/core/math/function/float/function3d/tests/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/core/math/function/float/function3d/tests' # source files diff --git a/raysect/core/math/function/float/meson.build b/raysect/core/math/function/float/meson.build index 3e9852c0..94fc7e45 100644 --- a/raysect/core/math/function/float/meson.build +++ b/raysect/core/math/function/float/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/core/math/function/float' # source files diff --git a/raysect/core/math/function/meson.build b/raysect/core/math/function/meson.build index e88dc437..fbd96960 100644 --- a/raysect/core/math/function/meson.build +++ b/raysect/core/math/function/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/core/math/function' # source files diff --git a/raysect/core/math/function/vector3d/function1d/meson.build b/raysect/core/math/function/vector3d/function1d/meson.build index 95868f10..8e4b1432 100644 --- a/raysect/core/math/function/vector3d/function1d/meson.build +++ b/raysect/core/math/function/vector3d/function1d/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/core/math/function/vector3d/function1d' # source files diff --git a/raysect/core/math/function/vector3d/function1d/tests/meson.build b/raysect/core/math/function/vector3d/function1d/tests/meson.build index 4ac3218f..aed59801 100644 --- a/raysect/core/math/function/vector3d/function1d/tests/meson.build +++ b/raysect/core/math/function/vector3d/function1d/tests/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/core/math/function/vector3d/function1d/tests' # source files diff --git a/raysect/core/math/function/vector3d/function2d/meson.build b/raysect/core/math/function/vector3d/function2d/meson.build index 2493844a..90c77b9f 100644 --- a/raysect/core/math/function/vector3d/function2d/meson.build +++ b/raysect/core/math/function/vector3d/function2d/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/core/math/function/vector3d/function2d' # source files diff --git a/raysect/core/math/function/vector3d/function2d/tests/meson.build b/raysect/core/math/function/vector3d/function2d/tests/meson.build index 0d06ac65..552f3c87 100644 --- a/raysect/core/math/function/vector3d/function2d/tests/meson.build +++ b/raysect/core/math/function/vector3d/function2d/tests/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/core/math/function/vector3d/function2d/tests' # source files diff --git a/raysect/core/math/function/vector3d/function3d/meson.build b/raysect/core/math/function/vector3d/function3d/meson.build index 6e117736..9de64727 100644 --- a/raysect/core/math/function/vector3d/function3d/meson.build +++ b/raysect/core/math/function/vector3d/function3d/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/core/math/function/vector3d/function3d' # source files diff --git a/raysect/core/math/function/vector3d/function3d/tests/meson.build b/raysect/core/math/function/vector3d/function3d/tests/meson.build index 41a6e631..05026568 100644 --- a/raysect/core/math/function/vector3d/function3d/tests/meson.build +++ b/raysect/core/math/function/vector3d/function3d/tests/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/core/math/function/vector3d/function3d/tests' # source files diff --git a/raysect/core/math/function/vector3d/meson.build b/raysect/core/math/function/vector3d/meson.build index b3275de3..e52a738e 100644 --- a/raysect/core/math/function/vector3d/meson.build +++ b/raysect/core/math/function/vector3d/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/core/math/function/vector3d' # source files diff --git a/raysect/core/math/meson.build b/raysect/core/math/meson.build index e1945434..c9a62c88 100644 --- a/raysect/core/math/meson.build +++ b/raysect/core/math/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/core/math' # source files diff --git a/raysect/core/math/sampler/meson.build b/raysect/core/math/sampler/meson.build index 63faac49..06378d7f 100644 --- a/raysect/core/math/sampler/meson.build +++ b/raysect/core/math/sampler/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/core/math/sampler' # source files diff --git a/raysect/core/math/spatial/meson.build b/raysect/core/math/spatial/meson.build index e1fee40b..853ca0c1 100644 --- a/raysect/core/math/spatial/meson.build +++ b/raysect/core/math/spatial/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/core/math/spatial' # source files diff --git a/raysect/core/math/tests/meson.build b/raysect/core/math/tests/meson.build index 144922bb..672ce76e 100644 --- a/raysect/core/math/tests/meson.build +++ b/raysect/core/math/tests/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/core/math/tests' # source files diff --git a/raysect/core/meson.build b/raysect/core/meson.build index 7c8bf71e..cecc18d2 100644 --- a/raysect/core/meson.build +++ b/raysect/core/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/core' # source files diff --git a/raysect/core/scenegraph/meson.build b/raysect/core/scenegraph/meson.build index a3d36f69..178ba563 100644 --- a/raysect/core/scenegraph/meson.build +++ b/raysect/core/scenegraph/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/core/scenegraph' # source files diff --git a/raysect/core/scenegraph/tests/meson.build b/raysect/core/scenegraph/tests/meson.build index c193f6d8..01753d53 100644 --- a/raysect/core/scenegraph/tests/meson.build +++ b/raysect/core/scenegraph/tests/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/core/scenegraph/tests' # source files diff --git a/raysect/core/tests/meson.build b/raysect/core/tests/meson.build index 176dfeda..088244d9 100644 --- a/raysect/core/tests/meson.build +++ b/raysect/core/tests/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/core/tests' # source files diff --git a/raysect/meson.build b/raysect/meson.build index 6a12bcff..d9802a7d 100644 --- a/raysect/meson.build +++ b/raysect/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect' # source files diff --git a/raysect/optical/library/components/meson.build b/raysect/optical/library/components/meson.build index 63029bf9..a18e3e4b 100644 --- a/raysect/optical/library/components/meson.build +++ b/raysect/optical/library/components/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/optical/library/components' # source files diff --git a/raysect/optical/library/glass/data/meson.build b/raysect/optical/library/glass/data/meson.build index 5e8865b9..86466f27 100644 --- a/raysect/optical/library/glass/data/meson.build +++ b/raysect/optical/library/glass/data/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/optical/library/glass/data' # source files diff --git a/raysect/optical/library/glass/meson.build b/raysect/optical/library/glass/meson.build index a65ac3ae..358c6dad 100644 --- a/raysect/optical/library/glass/meson.build +++ b/raysect/optical/library/glass/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/optical/library/glass' # source files diff --git a/raysect/optical/library/meson.build b/raysect/optical/library/meson.build index cde26f61..7b9112b7 100644 --- a/raysect/optical/library/meson.build +++ b/raysect/optical/library/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/optical/library' # source files diff --git a/raysect/optical/library/metal/data/meson.build b/raysect/optical/library/metal/data/meson.build index 2d2a137c..47237562 100644 --- a/raysect/optical/library/metal/data/meson.build +++ b/raysect/optical/library/metal/data/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/optical/library/metal/data' # source files diff --git a/raysect/optical/library/metal/meson.build b/raysect/optical/library/metal/meson.build index 47bd36db..f483ab87 100644 --- a/raysect/optical/library/metal/meson.build +++ b/raysect/optical/library/metal/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/optical/library/metal' # source files diff --git a/raysect/optical/library/spectra/meson.build b/raysect/optical/library/spectra/meson.build index 81f4ea5f..b1580737 100644 --- a/raysect/optical/library/spectra/meson.build +++ b/raysect/optical/library/spectra/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/optical/library/spectra' # source files diff --git a/raysect/optical/material/emitter/meson.build b/raysect/optical/material/emitter/meson.build index 931aaede..d168f854 100644 --- a/raysect/optical/material/emitter/meson.build +++ b/raysect/optical/material/emitter/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/optical/material/emitter' # source files diff --git a/raysect/optical/material/meson.build b/raysect/optical/material/meson.build index d9bab581..014874d6 100644 --- a/raysect/optical/material/meson.build +++ b/raysect/optical/material/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/optical/material' # source files diff --git a/raysect/optical/material/modifiers/meson.build b/raysect/optical/material/modifiers/meson.build index b436e879..74223ce0 100644 --- a/raysect/optical/material/modifiers/meson.build +++ b/raysect/optical/material/modifiers/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/optical/material/modifiers' # source files diff --git a/raysect/optical/meson.build b/raysect/optical/meson.build index 427d3ac4..e756f95f 100644 --- a/raysect/optical/meson.build +++ b/raysect/optical/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/optical' # source files diff --git a/raysect/optical/observer/base/meson.build b/raysect/optical/observer/base/meson.build index 8630abae..78700e06 100644 --- a/raysect/optical/observer/base/meson.build +++ b/raysect/optical/observer/base/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/optical/observer/base' # source files diff --git a/raysect/optical/observer/imaging/meson.build b/raysect/optical/observer/imaging/meson.build index a4b89f75..200bb394 100644 --- a/raysect/optical/observer/imaging/meson.build +++ b/raysect/optical/observer/imaging/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/optical/observer/imaging' # source files diff --git a/raysect/optical/observer/meson.build b/raysect/optical/observer/meson.build index 631e3f78..a4ad306a 100644 --- a/raysect/optical/observer/meson.build +++ b/raysect/optical/observer/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/optical/observer' # source files diff --git a/raysect/optical/observer/nonimaging/meson.build b/raysect/optical/observer/nonimaging/meson.build index 29344683..6cea95cf 100644 --- a/raysect/optical/observer/nonimaging/meson.build +++ b/raysect/optical/observer/nonimaging/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/optical/observer/nonimaging' # source files diff --git a/raysect/optical/observer/pipeline/meson.build b/raysect/optical/observer/pipeline/meson.build index 7719d89f..86060081 100644 --- a/raysect/optical/observer/pipeline/meson.build +++ b/raysect/optical/observer/pipeline/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/optical/observer/pipeline' # source files diff --git a/raysect/optical/observer/pipeline/mono/meson.build b/raysect/optical/observer/pipeline/mono/meson.build index be8e64db..857d71e5 100644 --- a/raysect/optical/observer/pipeline/mono/meson.build +++ b/raysect/optical/observer/pipeline/mono/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/optical/observer/pipeline/mono' # source files diff --git a/raysect/optical/observer/pipeline/spectral/meson.build b/raysect/optical/observer/pipeline/spectral/meson.build index a2f0b27e..4bdb09f2 100644 --- a/raysect/optical/observer/pipeline/spectral/meson.build +++ b/raysect/optical/observer/pipeline/spectral/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/optical/observer/pipeline/spectral' # source files diff --git a/raysect/optical/scenegraph/meson.build b/raysect/optical/scenegraph/meson.build index 3b0a3415..fb505ffc 100644 --- a/raysect/optical/scenegraph/meson.build +++ b/raysect/optical/scenegraph/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/optical/scenegraph' # source files diff --git a/raysect/primitive/lens/meson.build b/raysect/primitive/lens/meson.build index 6fa8cc2c..a53c2994 100644 --- a/raysect/primitive/lens/meson.build +++ b/raysect/primitive/lens/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/primitive/lens' # source files diff --git a/raysect/primitive/lens/tests/meson.build b/raysect/primitive/lens/tests/meson.build index 1889e9fc..e6b0cea8 100644 --- a/raysect/primitive/lens/tests/meson.build +++ b/raysect/primitive/lens/tests/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/primitive/lens/tests' # source files diff --git a/raysect/primitive/mesh/meson.build b/raysect/primitive/mesh/meson.build index 431b3409..59d33f4c 100644 --- a/raysect/primitive/mesh/meson.build +++ b/raysect/primitive/mesh/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/primitive/mesh' # source files diff --git a/raysect/primitive/meson.build b/raysect/primitive/meson.build index 9e4d80c9..44b24be2 100644 --- a/raysect/primitive/meson.build +++ b/raysect/primitive/meson.build @@ -1,3 +1,6 @@ +# WARNING: This file is automatically generated by dev/generate_meson_files.py. +# The template file used to generate this file is dev/subdir-meson.build. + target_path = 'raysect/primitive' # source files From 30a764e64759e633c46a8379750f2be09cfea481 Mon Sep 17 00:00:00 2001 From: Dr Alex Meakins Date: Sun, 20 Jul 2025 02:19:39 +0100 Subject: [PATCH 21/21] Update .gitignore to remove randomly added string. --- .gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index c38bf609..590e1871 100644 --- a/.gitignore +++ b/.gitignore @@ -4,7 +4,7 @@ __pycache__/ *$py.class # C extensions -*.son option to enable profiling +*.so *.c # Distribution / packaging .Python