diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 63b4a4e3..abf7ff7e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -12,17 +12,22 @@ jobs: runs-on: ${{ matrix.platform }} steps: - uses: actions/checkout@v3 + - name: Get history and tags for SCM versioning to work + run: | + git fetch --prune --unshallow + git fetch --depth=1 origin +refs/tags/*:refs/tags/* - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Install dependencies run: | - python -m pip install --upgrade pip + python -m pip install --upgrade pip setuptools pip install flake8 pytest if [ -f requirements.txt ]; then pip install -r requirements-dev.txt; fi - name: Install pylops run: | + python -m setuptools_scm pip install . - name: Test with pytest run: | diff --git a/pyproject.toml b/pyproject.toml index 8fd8d67e..4deee5a6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,3 +1,52 @@ [build-system] -requires = ["setuptools", "setuptools-scm"] +requires = [ + "setuptools >= 65", + "setuptools_scm[toml]", + "wheel", +] build-backend = "setuptools.build_meta" + +[project] +name = "pylops" +description = "Python library implementing linear operators to allow solving large-scale optimization problems" +readme = "README.md" +authors = [ + {name = "Matteo Ravasi", email = "matteoravasi@gmail.com"}, +] +license = {file = "LICENSE.md"} +keywords = ["algebra", "inverse problems", "large-scale optimization"] +classifiers = [ + "Development Status :: 5 - Production/Stable", + "Intended Audience :: Developers", + "Intended Audience :: Science/Research", + "Intended Audience :: Education", + "License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)", + "Natural Language :: English", + "Operating System :: OS Independent", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Topic :: Scientific/Engineering : Mathematics", +] +dependencies = [ + "numpy >= 1.21.0", + "scipy >= 1.4.0", +] +dynamic = ["version"] + +[project.optional-dependencies] +advanced = [ + "llvmlite", + "numba", + "pyfftw", + "PyWavelets", + "scikit-fmm", + "spgl1", +] + +[tool.setuptools.packages.find] +exclude = ["pytests"] + +[tool.setuptools_scm] +version_file = "pylops/version.py" diff --git a/setup.cfg b/setup.cfg index 67636c69..4c13f09c 100755 --- a/setup.cfg +++ b/setup.cfg @@ -1,56 +1,3 @@ -[metadata] -name = pylops -fullname = PyLops -description = Python library implementing linear operators to allow solving large-scale optimization problems -long_description = file: README.md -long_description_content_type = text/markdown -author = The PyLops Development Team -author_email = matteoravasi@gmail.com -maintainer = "Matteo Ravasi" -maintainer_email = matteoravasi@gmail.com -license = LGPL-3.0 License -license_file = LICENSE.md -platform = any -keywords = algebra, inverse problems, large-scale optimization -classifiers = - Development Status :: 5 - Production/Stable - Intended Audience :: Developers - Intended Audience :: Science/Research - Intended Audience :: Education - License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3), - Natural Language :: English - Operating System :: OS Independent - Programming Language :: Python :: 3 :: Only - Programming Language :: Python :: 3.8 - Programming Language :: Python :: 3.9 - Programming Language :: Python :: 3.10 - Topic :: Scientific/Engineering : Mathematics -url = https://github.com/pylops/pylops - -project_urls = - Documentation = https://pylops.readthedocs.io/ - Release Notes = https://github.com/pylops/pylops/releases - Bug Tracker = https://github.com/pylops/pylops/issues - Source Code = https://github.com/pylops/pylops - -[options] -zip_safe = True -include_package_data = True -packages = find: -python_requires = >=3.8 -install_requires = - numpy >= 1.21.0 - scipy >= 1.4.0 - -[options.extras_require] -advanced = - llvmlite - numba - pyfftw - PyWavelets - scikit-fmm - spgl1 - [aliases] test=pytest