diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000..173ac171 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,47 @@ +[build-system] +requires = [ + "setuptools>=60", + "setuptools-scm>=8.0"] + +[project] +name = "pylops" +authors = [ + {name = "Matteo Ravasi", email = "matteoravasi@gmail.com"}, +] +description = "Python library implementing linear operators to allow solving large-scale optimization problems without requiring to explicitly create a dense (or sparse) matrix." +readme = "README.md" +requires-python = ">=3.7" +keywords = ["algebra", "inverse problems", "large-scale optimization"] +license.file = "LICENSE.md" +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "Intended Audience :: Science/Research", + "License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)", + "Natural Language :: English", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Topic :: Scientific/Engineering :: Mathematics", + ] +dynamic = ["version", ] +dependencies = [ + "numpy >= 1.21.0", + "scipy >= 1.4.0", + "pylops >= 1.17.0", + "setuptools >= 61.2.0", + ] +[project.optional-dependencies] +advanced = ["llvmlite", + "numba", + "pyfftw", + "PyWavelets", + "scikit-fmm", + "spgl1", +] + +[tool.setuptools.packages.find] +where = ["pylops"] +namespaces = false + +[tool.setuptools_scm] +version_file = "pylops/version.py" diff --git a/requirements-dev.txt b/requirements-dev.txt index 59bce051..8eabb62c 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -12,7 +12,7 @@ matplotlib ipython pytest pytest-runner -setuptools_scm<8.0.0 +setuptools_scm docutils<0.18 Sphinx pydata-sphinx-theme diff --git a/setup.py b/setup.py deleted file mode 100755 index 8b82afa2..00000000 --- a/setup.py +++ /dev/null @@ -1,54 +0,0 @@ -import os - -from setuptools import find_packages, setup - - -def src(pth): - return os.path.join(os.path.dirname(__file__), pth) - - -# Project description -descr = ( - "Python library implementing linear operators to allow solving large-scale optimization " - "problems without requiring to explicitly create a dense (or sparse) matrix." -) - -# Setup -setup( - name="pylops", - description=descr, - long_description=open(src("README.md")).read(), - long_description_content_type="text/markdown", - keywords=["algebra", "inverse problems", "large-scale optimization"], - classifiers=[ - "Development Status :: 5 - Production/Stable", - "Intended Audience :: Developers", - "Intended Audience :: Science/Research", - "License :: OSI Approved :: GNU Lesser General Public License v2 or later (LGPLv2+)", - "Natural Language :: English", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", - "Topic :: Scientific/Engineering :: Mathematics", - ], - author="mrava", - author_email="matteoravasi@gmail.com", - install_requires=["numpy >= 1.21.0", "scipy >= 1.4.0"], - extras_require={ - "advanced": [ - "llvmlite", - "numba", - "pyfftw", - "PyWavelets", - "scikit-fmm", - "spgl1", - ] - }, - packages=find_packages(exclude=["pytests"]), - use_scm_version=dict( - root=".", relative_to=__file__, write_to=src("pylops/version.py") - ), - setup_requires=["pytest-runner", "setuptools_scm"], - test_suite="pytests", - tests_require=["pytest"], - zip_safe=True, -)