diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4f7081a2..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.7", "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 @@ -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 diff --git a/.gitignore b/.gitignore index 2e0ea683..590e1871 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ __pycache__/ # Distribution / packaging .Python env/ +venv/ build/ develop-eggs/ dist/ diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 1c23752b..7dd3faf6 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,6 +1,19 @@ 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.p folder). + + Release 0.8.1 (12 Feb 2023) --------------------------- 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 * 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/generate_meson_files.py b/dev/generate_meson_files.py new file mode 100755 index 00000000..ee4b4569 --- /dev/null +++ b/dev/generate_meson_files.py @@ -0,0 +1,238 @@ +#!/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__'] + + +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. + + 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 (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) + + # 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 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: + 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.') + + # write meson file + _write_meson_file(path, _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 + subdirs = [child for child in path.iterdir() if child.is_dir() and not _excluded_dir(child)] + + # write meson file + _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 + + +def _generate_root_meson_file(subdirs): + + # read template + template_path = Path(__file__).parent / 'root-meson.build' + 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' + 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) + + # 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), + 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__': + generate_meson_files(PACKAGES) \ No newline at end of file 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 new file mode 100644 index 00000000..526acc1a --- /dev/null +++ b/dev/root-meson.build @@ -0,0 +1,8 @@ +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 new file mode 100644 index 00000000..951e96c0 --- /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: 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/meson.build b/meson.build new file mode 100644 index 00000000..072eed68 --- /dev/null +++ b/meson.build @@ -0,0 +1,13 @@ +# 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) +numpy = dependency('numpy', method: 'config-tool') +fs = import('fs') + +cython_args = ['--annotate'] +cython_dependencies = [numpy] + +subdir('raysect') diff --git a/pyproject.toml b/pyproject.toml index 17d821e2..a66e34b9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,31 @@ +[project] +name = "raysect" +version = "0.9.0" +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"} +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 = ["setuptools>=42.0", "wheel", "oldest-supported-numpy", "cython>=0.28,<3.0"] -build-backend = "setuptools.build_meta" +requires = ["meson-python", "setuptools", "wheel", "numpy", "cython<3.0"] +build-backend = "mesonpy" 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 diff --git a/raysect/core/acceleration/meson.build b/raysect/core/acceleration/meson.build new file mode 100644 index 00000000..4b45982b --- /dev/null +++ b/raysect/core/acceleration/meson.build @@ -0,0 +1,30 @@ +# 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 +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..53eb7130 --- /dev/null +++ b/raysect/core/acceleration/tests/meson.build @@ -0,0 +1,29 @@ +# 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 +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/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/cython/interpolation/meson.build b/raysect/core/math/cython/interpolation/meson.build new file mode 100644 index 00000000..473a025d --- /dev/null +++ b/raysect/core/math/cython/interpolation/meson.build @@ -0,0 +1,29 @@ +# 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 +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..aac5c9dc --- /dev/null +++ b/raysect/core/math/cython/meson.build @@ -0,0 +1,31 @@ +# 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 +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..e462f440 --- /dev/null +++ b/raysect/core/math/cython/tests/meson.build @@ -0,0 +1,29 @@ +# 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 +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..1ab0aad8 --- /dev/null +++ b/raysect/core/math/function/float/function1d/meson.build @@ -0,0 +1,30 @@ +# 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 +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..54664e7b --- /dev/null +++ b/raysect/core/math/function/float/function1d/tests/data/meson.build @@ -0,0 +1,29 @@ +# 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 +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..5e2f0eba --- /dev/null +++ b/raysect/core/math/function/float/function1d/tests/meson.build @@ -0,0 +1,30 @@ +# 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 +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/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/meson.build b/raysect/core/math/function/float/function2d/interpolate/meson.build new file mode 100644 index 00000000..595a8598 --- /dev/null +++ b/raysect/core/math/function/float/function2d/interpolate/meson.build @@ -0,0 +1,30 @@ +# 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 +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..c2c7b3c2 --- /dev/null +++ b/raysect/core/math/function/float/function2d/interpolate/tests/data/meson.build @@ -0,0 +1,29 @@ +# 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 +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..930888be --- /dev/null +++ b/raysect/core/math/function/float/function2d/interpolate/tests/meson.build @@ -0,0 +1,30 @@ +# 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 +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/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/function2d/meson.build b/raysect/core/math/function/float/function2d/meson.build new file mode 100644 index 00000000..291e2a1b --- /dev/null +++ b/raysect/core/math/function/float/function2d/meson.build @@ -0,0 +1,31 @@ +# 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 +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..883f6155 --- /dev/null +++ b/raysect/core/math/function/float/function2d/tests/meson.build @@ -0,0 +1,29 @@ +# 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 +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..55828ab8 --- /dev/null +++ b/raysect/core/math/function/float/function3d/interpolate/meson.build @@ -0,0 +1,30 @@ +# 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 +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..430429d5 --- /dev/null +++ b/raysect/core/math/function/float/function3d/interpolate/tests/data/meson.build @@ -0,0 +1,29 @@ +# 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 +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..b8244427 --- /dev/null +++ b/raysect/core/math/function/float/function3d/interpolate/tests/meson.build @@ -0,0 +1,30 @@ +# 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 +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/interpolate/tests/scripts/.meson-exclude b/raysect/core/math/function/float/function3d/interpolate/tests/scripts/.meson-exclude new file mode 100644 index 00000000..e69de29b 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..e4610299 --- /dev/null +++ b/raysect/core/math/function/float/function3d/meson.build @@ -0,0 +1,31 @@ +# 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 +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..1e5ef2c8 --- /dev/null +++ b/raysect/core/math/function/float/function3d/tests/meson.build @@ -0,0 +1,29 @@ +# 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 +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..94fc7e45 --- /dev/null +++ b/raysect/core/math/function/float/meson.build @@ -0,0 +1,32 @@ +# 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 +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..fbd96960 --- /dev/null +++ b/raysect/core/math/function/meson.build @@ -0,0 +1,31 @@ +# 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 +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..8e4b1432 --- /dev/null +++ b/raysect/core/math/function/vector3d/function1d/meson.build @@ -0,0 +1,30 @@ +# 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 +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..aed59801 --- /dev/null +++ b/raysect/core/math/function/vector3d/function1d/tests/meson.build @@ -0,0 +1,29 @@ +# 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 +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..90c77b9f --- /dev/null +++ b/raysect/core/math/function/vector3d/function2d/meson.build @@ -0,0 +1,30 @@ +# 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 +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..552f3c87 --- /dev/null +++ b/raysect/core/math/function/vector3d/function2d/tests/meson.build @@ -0,0 +1,29 @@ +# 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 +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..9de64727 --- /dev/null +++ b/raysect/core/math/function/vector3d/function3d/meson.build @@ -0,0 +1,30 @@ +# 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 +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..05026568 --- /dev/null +++ b/raysect/core/math/function/vector3d/function3d/tests/meson.build @@ -0,0 +1,29 @@ +# 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 +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..e52a738e --- /dev/null +++ b/raysect/core/math/function/vector3d/meson.build @@ -0,0 +1,32 @@ +# 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 +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..c9a62c88 --- /dev/null +++ b/raysect/core/math/meson.build @@ -0,0 +1,34 @@ +# 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 +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..06378d7f --- /dev/null +++ b/raysect/core/math/sampler/meson.build @@ -0,0 +1,29 @@ +# 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 +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..853ca0c1 --- /dev/null +++ b/raysect/core/math/spatial/meson.build @@ -0,0 +1,29 @@ +# 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 +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..672ce76e --- /dev/null +++ b/raysect/core/math/tests/meson.build @@ -0,0 +1,29 @@ +# 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 +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..cecc18d2 --- /dev/null +++ b/raysect/core/meson.build @@ -0,0 +1,33 @@ +# 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 +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..178ba563 --- /dev/null +++ b/raysect/core/scenegraph/meson.build @@ -0,0 +1,30 @@ +# 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 +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..01753d53 --- /dev/null +++ b/raysect/core/scenegraph/tests/meson.build @@ -0,0 +1,29 @@ +# 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 +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..088244d9 --- /dev/null +++ b/raysect/core/tests/meson.build @@ -0,0 +1,29 @@ +# 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 +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..d9802a7d --- /dev/null +++ b/raysect/meson.build @@ -0,0 +1,32 @@ +# 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 +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('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..a18e3e4b --- /dev/null +++ b/raysect/optical/library/components/meson.build @@ -0,0 +1,29 @@ +# 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 +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..86466f27 --- /dev/null +++ b/raysect/optical/library/glass/data/meson.build @@ -0,0 +1,29 @@ +# 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 +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..358c6dad --- /dev/null +++ b/raysect/optical/library/glass/meson.build @@ -0,0 +1,30 @@ +# 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 +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..7b9112b7 --- /dev/null +++ b/raysect/optical/library/meson.build @@ -0,0 +1,33 @@ +# 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 +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..47237562 --- /dev/null +++ b/raysect/optical/library/metal/data/meson.build @@ -0,0 +1,29 @@ +# 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 +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..f483ab87 --- /dev/null +++ b/raysect/optical/library/metal/meson.build @@ -0,0 +1,30 @@ +# 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 +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..b1580737 --- /dev/null +++ b/raysect/optical/library/spectra/meson.build @@ -0,0 +1,29 @@ +# 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 +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..d168f854 --- /dev/null +++ b/raysect/optical/material/emitter/meson.build @@ -0,0 +1,29 @@ +# 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 +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..014874d6 --- /dev/null +++ b/raysect/optical/material/meson.build @@ -0,0 +1,31 @@ +# 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 +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..74223ce0 --- /dev/null +++ b/raysect/optical/material/modifiers/meson.build @@ -0,0 +1,29 @@ +# 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 +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..e756f95f --- /dev/null +++ b/raysect/optical/meson.build @@ -0,0 +1,33 @@ +# 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 +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..78700e06 --- /dev/null +++ b/raysect/optical/observer/base/meson.build @@ -0,0 +1,29 @@ +# 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 +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..200bb394 --- /dev/null +++ b/raysect/optical/observer/imaging/meson.build @@ -0,0 +1,29 @@ +# 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 +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..a4ad306a --- /dev/null +++ b/raysect/optical/observer/meson.build @@ -0,0 +1,33 @@ +# 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 +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..6cea95cf --- /dev/null +++ b/raysect/optical/observer/nonimaging/meson.build @@ -0,0 +1,29 @@ +# 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 +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..86060081 --- /dev/null +++ b/raysect/optical/observer/pipeline/meson.build @@ -0,0 +1,31 @@ +# 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 +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..857d71e5 --- /dev/null +++ b/raysect/optical/observer/pipeline/mono/meson.build @@ -0,0 +1,29 @@ +# 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 +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..4bdb09f2 --- /dev/null +++ b/raysect/optical/observer/pipeline/spectral/meson.build @@ -0,0 +1,29 @@ +# 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 +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..fb505ffc --- /dev/null +++ b/raysect/optical/scenegraph/meson.build @@ -0,0 +1,29 @@ +# 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 +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..a53c2994 --- /dev/null +++ b/raysect/primitive/lens/meson.build @@ -0,0 +1,30 @@ +# 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 +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..e6b0cea8 --- /dev/null +++ b/raysect/primitive/lens/tests/meson.build @@ -0,0 +1,29 @@ +# 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 +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..59d33f4c --- /dev/null +++ b/raysect/primitive/mesh/meson.build @@ -0,0 +1,29 @@ +# 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 +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..44b24be2 --- /dev/null +++ b/raysect/primitive/meson.build @@ -0,0 +1,31 @@ +# 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 +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') 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}, -)