Skip to content

Commit 54bc6ba

Browse files
authored
build: fixed setup to allow correct versioning (#139)
1 parent f7922db commit 54bc6ba

File tree

3 files changed

+56
-55
lines changed

3 files changed

+56
-55
lines changed

.github/workflows/build.yaml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,18 +11,23 @@ jobs:
1111

1212
runs-on: ${{ matrix.platform }}
1313
steps:
14-
- uses: actions/checkout@v2
14+
- uses: actions/checkout@v3
15+
- name: Get history and tags for SCM versioning to work
16+
run: |
17+
git fetch --prune --unshallow
18+
git fetch --depth=1 origin +refs/tags/*:refs/tags/*
1519
- name: Set up Python ${{ matrix.python-version }}
16-
uses: actions/setup-python@v2
20+
uses: actions/setup-python@v4
1721
with:
1822
python-version: ${{ matrix.python-version }}
1923
- name: Install dependencies
2024
run: |
21-
python -m pip install --upgrade pip
25+
python -m pip install --upgrade pip setuptools
2226
pip install flake8 pytest
2327
if [ -f requirements.txt ]; then pip install -r requirements-dev.txt; fi
2428
- name: Install pyproximal
2529
run: |
30+
python -m setuptools_scm
2631
pip install .
2732
- name: Test with pytest
2833
run: |

pyproject.toml

Lines changed: 48 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,49 @@
11
[build-system]
2-
requires = ["setuptools", "setuptools-scm"]
3-
build-backend = "setuptools.build_meta"
2+
requires = [
3+
"setuptools >= 65",
4+
"setuptools_scm[toml]",
5+
"wheel",
6+
]
7+
build-backend = "setuptools.build_meta"
8+
9+
[project]
10+
name = "pyproximal"
11+
description = "Python library implementing proximal operators to solve non-smooth, constrained convex problems with proximal algorithms"
12+
readme = "README.md"
13+
authors = [
14+
{name = "Matteo Ravasi", email = "[email protected]"},
15+
]
16+
license = {file = "LICENSE.md"}
17+
keywords = ["algebra", "inverse problems", "proximal", "convex optimization", "large-scale optimization"]
18+
classifiers = [
19+
"Development Status :: 5 - Production/Stable",
20+
"Intended Audience :: Developers",
21+
"Intended Audience :: Science/Research",
22+
"Intended Audience :: Education",
23+
"License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3)",
24+
"Natural Language :: English",
25+
"Operating System :: OS Independent",
26+
"Programming Language :: Python :: 3 :: Only",
27+
"Programming Language :: Python :: 3.8",
28+
"Programming Language :: Python :: 3.9",
29+
"Programming Language :: Python :: 3.10",
30+
"Topic :: Scientific/Engineering : Mathematics",
31+
]
32+
dependencies = [
33+
"numpy >= 1.15.0",
34+
"scipy >= 1.8.0",
35+
"pylops >= 2.0.0",
36+
]
37+
dynamic = ["version"]
38+
39+
[project.optional-dependencies]
40+
advanced = [
41+
"llvmlite",
42+
"numba",
43+
]
44+
45+
[tool.setuptools.packages.find]
46+
exclude = ["pytests"]
47+
48+
[tool.setuptools_scm]
49+
version_file = "pyproximal/version.py"

setup.cfg

Lines changed: 0 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,3 @@
1-
[metadata]
2-
name = pyproximal
3-
fullname = PyProximal
4-
description = Python library implementing proximal operators to solve non-smooth, constrained convex problems with proximal algorithms
5-
long_description = file: README.md
6-
long_description_content_type = text/markdown
7-
author = The PyLops Development Team
8-
author_email = [email protected]
9-
maintainer = "Matteo Ravasi"
10-
maintainer_email = [email protected]
11-
license = LGPL-3.0 License
12-
license_file = LICENSE.md
13-
platform = any
14-
keywords = algebra, inverse problems, proximal, convex optimization, large-scale optimization
15-
classifiers =
16-
Development Status :: 5 - Production/Stable
17-
Intended Audience :: Developers
18-
Intended Audience :: Science/Research
19-
Intended Audience :: Education
20-
License :: OSI Approved :: GNU Lesser General Public License v3 (LGPLv3),
21-
Natural Language :: English
22-
Operating System :: OS Independent
23-
Programming Language :: Python :: 3 :: Only
24-
Programming Language :: Python :: 3.8
25-
Programming Language :: Python :: 3.9
26-
Programming Language :: Python :: 3.10
27-
Topic :: Scientific/Engineering : Mathematics
28-
url = https://github.com/pylops/pyproximal
29-
30-
project_urls =
31-
Documentation = https://pyproximal.readthedocs.io/
32-
Release Notes = https://github.com/pylops/pyproximal/releases
33-
Bug Tracker = https://github.com/pylops/pyproximal/issues
34-
Source Code = https://github.com/pylops/pyproximal
35-
36-
[options]
37-
zip_safe = True
38-
include_package_data = True
39-
packages = find:
40-
python_requires = >=3.8
41-
install_requires =
42-
numpy >= 1.15.0
43-
scipy >= 1.8.0
44-
pylops >= 2.0.0
45-
46-
[options.extras_require]
47-
advanced =
48-
llvmlite
49-
numba
50-
511
[aliases]
522
test=pytest
533

0 commit comments

Comments
 (0)