Skip to content

Commit 5acb76c

Browse files
committed
Update use of setuptools_scm
1 parent 36339e2 commit 5acb76c

File tree

4 files changed

+10
-12
lines changed

4 files changed

+10
-12
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ api/
1515
build/
1616
docs/_build
1717
htmlcov/
18+
muse_psfr/version.py

muse_psfr/__init__.py

+1-8
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,5 @@ def _setup_logging():
1313

1414
_setup_logging()
1515

16-
from pkg_resources import DistributionNotFound, get_distribution # noqa
17-
1816
from .psfrec import * # noqa
19-
20-
try:
21-
__version__ = get_distribution(__name__).version
22-
except DistributionNotFound: # pragma: no cover
23-
# package is not installed
24-
pass
17+
from .version import version as __version__ # noqa

pyproject.toml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[build-system]
2+
requires = ["setuptools>=45", "setuptools_scm[toml]>=6.2", "wheel"]
3+
4+
[tool.setuptools_scm]
5+
write_to = "muse_psfr/version.py"

setup.cfg

+3-4
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@ classifiers =
1313
License :: OSI Approved :: MIT License
1414
Operating System :: OS Independent
1515
Programming Language :: Python :: 3
16-
Programming Language :: Python :: 3.6
1716
Programming Language :: Python :: 3.7
1817
Programming Language :: Python :: 3.8
18+
Programming Language :: Python :: 3.9
19+
Programming Language :: Python :: 3.10
1920
Programming Language :: Python :: Implementation :: CPython
2021
Topic :: Scientific/Engineering :: Astronomy
2122
Topic :: Scientific/Engineering :: Physics
@@ -24,9 +25,7 @@ classifiers =
2425
zip_safe = False
2526
include_package_data = True
2627
packages = find:
27-
python_requires = >=3.6
28-
setup_requires =
29-
setuptools_scm
28+
python_requires = >=3.7
3029
install_requires =
3130
mpdaf
3231
astropy

0 commit comments

Comments
 (0)