Skip to content

Commit

Permalink
Fix compatibility with setuptools-scm v8.x
Browse files Browse the repository at this point in the history
  • Loading branch information
avalentino committed Sep 22, 2023
1 parent b5f2e18 commit c9dd87a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions erfa/_dev/scm_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,16 @@
from warnings import warn

try:
from setuptools_scm import git, get_version as _get_version
from setuptools_scm import git, Configuration, get_version as _get_version
from setuptools_scm.version import guess_next_version

def _guess_next_dev(version, liberfadir=None):
if liberfadir is None:
liberfadir = pathlib.Path(
__file__).parent.parent.parent / 'liberfa' / 'erfa'

erfa_version = git.parse(liberfadir)
config = Configuration(root=liberfadir)
erfa_version = git.parse(liberfadir, config=config)
if not erfa_version.exact:
warn(f'liberfa/erfa not at a tagged release, but at {erfa_version}')

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[build-system]
requires = [
"setuptools",
"setuptools_scm>=6.2,<8",
"setuptools_scm>=6.2",
"jinja2>=2.10.3",
"numpy>=1.25,<2"
]
Expand Down

0 comments on commit c9dd87a

Please sign in to comment.