Skip to content

Commit 50e8809

Browse files
committedFeb 3, 2025·
BLD: use pyproject.toml not setup.py
While at it, remove versioneer and use setuptools_scm for computing the version dynamically. This change is mainly because I did not manage to make versioneer work with pyproject.toml, while setuptools_scm "just worked" (well, nearly).
1 parent 590a2de commit 50e8809

File tree

7 files changed

+42
-3004
lines changed

7 files changed

+42
-3004
lines changed
 

‎.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ share/python-wheels/
2626
*.egg
2727
MANIFEST
2828

29+
*_version.py
30+
31+
2932
# PyInstaller
3033
# Usually these files are written by a python script from a template
3134
# before PyInstaller builds the exe, so as to inject date/other infos into it.

‎array_api_strict/__init__.py

+6-3
Original file line numberDiff line numberDiff line change
@@ -327,9 +327,12 @@
327327

328328
__all__ += ['set_array_api_strict_flags', 'get_array_api_strict_flags', 'reset_array_api_strict_flags', 'ArrayAPIStrictFlags']
329329

330-
from . import _version
331-
__version__ = _version.get_versions()['version']
332-
del _version
330+
try:
331+
from . import _version
332+
__version__ = _version.__version__
333+
del _version
334+
except ImportError:
335+
__version__ = "unknown"
333336

334337

335338
# Extensions can be enabled or disabled dynamically. In order to make

0 commit comments

Comments
 (0)
Please sign in to comment.