diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..4f6bf30 --- /dev/null +++ b/meson.build @@ -0,0 +1,33 @@ +project( + 'pixell', + 'c', 'cpp', 'fortran', + meson_version: '>= 1.1.0', + default_options: [ + 'c_std=c99', + ], +) + +c_compiler = meson.get_compiler('c') +cpp_compiler = meson.get_compiler('cpp') +add_languages('fortran', native: false) +f_compiler = meson.get_compiler('fortran') +system_os = host_machine.system() + +# Check compiler is recent enough (see "Toolchain Roadmap" for details) +if system_os == 'windows' + error('Pixell does not support Windows') +endif + +add_project_arguments(['-fopenmp', '-Wno-strict-aliasing', '-g', '-Ofast', '-fPIC'], language: ['c', 'cpp']) +add_project_link_arguments(['-fopenmp', '-g', '-fPIC', '-fno-lto'], language: ['c', 'cpp']) +add_project_arguments(['-O3', '-fPIC'], language: 'fortran') + + +# https://mesonbuild.com/Python-module.html +py_mod = import('python') +# NOTE: with Meson >=0.64.0 we can add `pure: false` here and remove that line +# everywhere else, see https://github.com/mesonbuild/meson/pull/10783. +py3 = py_mod.find_installation() +py3_dep = py3.dependency() + +subdir('pixell') \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..1af782a --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,83 @@ +[build-system] +requires = [ + "cython >= 3.0.2", + "meson >= 1.1.0", + "meson-python >= 0.14.0", + "versioneer[toml]" +] +build-backend = "mesonpy" + +[project] +name = "pixell" +dynamic = ["version"] +description = "pixell" +readme = "README.rst" +license = "BSD license" +maintainers = [ + { name = "Simons Observatory Collaboration Analysis Library Task Force", email = "mathewsyriac@gmail.com" }, +] +requires-python = ">=3.7,<3.12" +dependencies = ["numpy>=1.20.0", + "astropy>=2.0", + "setuptools>=39", + "h5py>=2.7", + "scipy>=1.0", + "python_dateutil>=2.7", + "cython<3.0.4", + "healpy>=1.13", + "matplotlib>=2.0", + "pyyaml>=5.0", + "Pillow>=5.3.0", + "pytest-cov>=2.6", + "coveralls>=1.5", + "pytest>=4.6", + "ducc0>=0.33.0", + "numba>=0.54.0"] +classifiers = [ + 'Development Status :: 2 - Pre-Alpha', + 'Intended Audience :: Developers', + 'License :: OSI Approved :: BSD License', + 'Natural Language :: English', + "Programming Language :: Python :: 2", + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', +] + +[project.optional-dependencies] +test = ["pip>=9.0", + "bumpversion>=0.5", + "wheel>=0.30", + "watchdog>=0.8", + "flake8>=3.5", + "coverage>=4.5", + "Sphinx>=1.7", + "twine>=1.10", + "numpy>=1.20", + "astropy>=2.0", + "setuptools>=39.2", + "h5py>=2.7,<=2.10", + "scipy>=1.0", + "python_dateutil>=2.7", + "cython<3.0.4", + "matplotlib>=2.0", + "pyyaml>=5.0", + "pytest-cov>=2.6", + "coveralls>=1.5", + "pytest>=4.6" +] + +[project.urls] +"Documentation" = "https://pixell.readthedocs.io/en/latest/" +"Source" = "https://github.com/simonsobs/pixell/" +"Issue Tracker" = "https://github.com/simonsobs/pixell/issues" + +[tool.versioneer] +VCS = "git" +style = "pep440" +versionfile_source = "pixell/_version.py" +versionfile_build = "pixell/_version.py" +tag_prefix = "v" +parentdir_prefix = "pixell-" \ No newline at end of file