diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..d4b66d3 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,43 @@ +[build-system] +requires = ["setuptools>=61.0", "wheel"] +build-backend = "setuptools.build_meta" + +[project] +name = "chumpy" +dynamic = ["version"] +description = "chumpy" +authors = [ + {name = "Matthew Loper", email = "matt.loper@gmail.com"} +] +license = {text = "MIT"} +readme = "README.md" +requires-python = ">=3.7" +dependencies = [ + "numpy>=1.8.1", + "scipy>=0.13.0", + "six>=1.11.0" +] +classifiers = [ + "Development Status :: 4 - Beta", + "Intended Audience :: Science/Research", + "Topic :: Scientific/Engineering :: Mathematics", + "License :: OSI Approved :: MIT License", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Operating System :: MacOS :: MacOS X", + "Operating System :: POSIX :: Linux" +] + +[project.urls] +Homepage = "https://github.com/mattloper/chumpy" + +[tool.setuptools] +packages = ["chumpy"] + +[tool.setuptools.dynamic] +version = {attr = "chumpy.version.version"} \ No newline at end of file diff --git a/setup.py b/setup.py index 89ded38..e32d79e 100644 --- a/setup.py +++ b/setup.py @@ -4,56 +4,7 @@ See LICENCE.txt for licensing and contact information. """ -from distutils.core import setup -try: # for pip >= 10 - from pip._internal.req import parse_requirements -except ImportError: # for pip <= 9.0.3 - from pip.req import parse_requirements -from runpy import run_path +from setuptools import setup -install_reqs = parse_requirements('requirements.txt', session=False) -try: # for pip < 20.1 - install_requires = [str(ir.req) for ir in install_reqs] -except AttributeError: # for pip >= 20.1 - install_requires = [str(ir.requirement) for ir in install_reqs] - -def get_version(): - namespace = run_path('chumpy/version.py') - return namespace['version'] - -setup(name='chumpy', - version=get_version(), - packages = ['chumpy'], - author='Matthew Loper', - author_email='matt.loper@gmail.com', - url='https://github.com/mattloper/chumpy', - description='chumpy', - license='MIT', - install_requires=install_requires, - - # See https://pypi.python.org/pypi?%3Aaction=list_classifiers - classifiers=[ - # How mature is this project? Common values are - # 3 - Alpha - # 4 - Beta - # 5 - Production/Stable - 'Development Status :: 4 - Beta', - - # Indicate who your project is intended for - 'Intended Audience :: Science/Research', - 'Topic :: Scientific/Engineering :: Mathematics', - - # Pick your license as you wish (should match "license" above) - 'License :: OSI Approved :: MIT License', - - # Specify the Python versions you support here. In particular, ensure - # that you indicate whether you support Python 2, Python 3 or both. - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', - 'Programming Language :: Python :: 3', - - 'Operating System :: MacOS :: MacOS X', - 'Operating System :: POSIX :: Linux' - ], -) +setup()