diff --git a/pyproject.toml b/pyproject.toml index f142ac30..303cbde6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,56 @@ [build-system] build-backend = "setuptools.build_meta" -requires = ["setuptools","numpy>=1.20.3","swig>=4.0.0","cmake>=0.29.24", "ninja"] +requires = [ + "setuptools", + "numpy<2.0", # as per petsc + "swig>=4.0.0", + "cmake>=0.29.24", + "ninja" +] + +[project] +name = "underworld" +version = "2.16.0" +authors = [ + {name = "Louis Moresi", email="louis.moresi@anu.edu.au"}, + {name = "Julian Giordani", email="julian.giordnai@sydney.edu.au"}, + {name = "John Mansour", email="john.mansour@gmail.com"}, + {name = "Romain Beaucher", email="romain.beucher@anu.edu.au"}, +] +maintainers = [ + {name = "Underworld Team", email="help@underworldcode.org"}, +] +dependencies = [ + "numpy>=1.20.3", + "mpi4py>=1.2.2", + "h5py", + "pint", + "scipy", +] +description = "Underworld2 is a python-friendly, parallel, scalable, easy-to-use toolkit for solving problems in solid and fluid mechanics." +readme = "README.md" +license = {file = "./LICENSE.md"} +keywords = ["Underworld", "MPI", "Geodynamics"] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "Intended Audience :: Science/Research", + "Operating System :: POSIX", + "Programming Language :: C", + "Programming Language :: C++", + "Programming Language :: Python", + "Topic :: Scientific/Engineering", + "Topic :: Software Development :: Libraries", +] +[project.optional-dependencies] +full = [ + "badlands", + "lavavu", + "matplotlib", + "nbmake", +] + +[project.urls] +homepage = "https://www.underworldcode.org" +repository = "https://github.com/underworldcode/underworld2" +documentation = "https://underworld2.readthedocs.io/en/latest/" diff --git a/setup.py b/setup.py index f57de720..14edc1cf 100755 --- a/setup.py +++ b/setup.py @@ -44,7 +44,7 @@ from typing import List from pathlib import Path -from setuptools import setup, Extension, find_packages +from setuptools import setup, Extension, find_namespace_packages from setuptools.command.build_ext import build_ext @@ -259,23 +259,12 @@ def extend_cmake_prefix_path(path: str) -> None: metadata = { 'provides': ['underworld'], 'zip_safe': False, - 'install_requires': ['numpy>=1.20.3', 'mpi4py>=1.2.2', 'h5py', 'pint', 'scipy'], - 'extras_require': { - 'full': ["badlands","lavavu","matplotlib","nbmake"], # for all 3rd party packages - }, +# 'install_requires': ['numpy>=1.20.3', 'mpi4py>=1.2.2', 'h5py', 'pint', 'scipy'], +# 'extras_require': { +# 'full': ["badlands","lavavu","matplotlib","nbmake"], # for all 3rd party packages +# }, } -classifiers = """ -Development Status :: 5 - Production/Stable -Intended Audience :: Developers -Intended Audience :: Science/Research -Operating System :: POSIX -Programming Language :: C -Programming Language :: C++ -Programming Language :: Python -Topic :: Scientific/Engineering -Topic :: Software Development :: Libraries -""" version = {} with open("src/underworld/_version.py") as fp: @@ -298,31 +287,26 @@ def extend_cmake_prefix_path(path: str) -> None: functionality of the code running in a parallel HPC environment.", long_description=long_description, long_description_content_type="text/markdown", - classifiers=classifiers.split('\n')[1:-1], - keywords=['Underworld', 'MPI', 'Geodynamics'], platforms=['POSIX'], license='LGPL-3', - url='https://github.com/underworldcode/underworld2', download_url="", - - author='Underworld Team', - author_email='help@underworldcode.org', - maintainer='Underworld Team', maintainer_email='help@underworldcode.org', include_package_data=True, # use the file './MANIFEST.in' for package data files package_dir={"":"src"}, # directory containing underworld package - packages=find_packages( + packages=find_namespace_packages( where='src', - include = ['underworld', 'UWGeodynamics'],), + include = ['underworld*', 'UWGeodynamics*'],), ext_modules=[ CMakeExtension(name='libUnderworld', install_prefix="underworld", source_dir=str(Path("src/underworld/libUnderworld").absolute()), cmake_configure_options=[ f"-DPython3_ROOT_DIR={Path(sys.prefix)}", - "-DCALL_FROM_SETUP_PY:BOOL=ON"] - #, cmake_build_type="Debug" ## Uncomment for debug + "-DCALL_FROM_SETUP_PY:BOOL=ON", + "--fresh", # force no cache, important for python isolation builds as build tools will change location + #"cmake_build_type="Debug" ## Uncomment for debug + ], ), ], cmdclass=dict(build_ext=BuildExtension),