Skip to content

Commit

Permalink
fix #918: use packaging from setuptools for self-build
Browse files Browse the repository at this point in the history
  • Loading branch information
RonnyPfannschmidt committed Sep 21, 2023
1 parent 4bc06ac commit 52d6e1f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ v8.0.2

bugfix
------
* fix #918: use packaging from setuptools for self-build
* fix #914: ignore the deprecated git archival plugin as its integrated now
* fix #912: ensure mypy safety of the version template + regression test
* fix #913: use 240s timeout instead of 20 for git unshallow
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
build-backend = "_own_version_helper"
requires = [
'importlib-metadata>=4.6; python_version < "3.10"',
"packaging>=20",
"rich",
"setuptools>=61",
'tomli; python_version < "3.11"',
Expand Down
8 changes: 6 additions & 2 deletions src/setuptools_scm/_version_cls.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,12 @@
from typing import Type
from typing import Union

from packaging.version import InvalidVersion
from packaging.version import Version as Version
try:
from packaging.version import InvalidVersion
from packaging.version import Version as Version
except ImportError:
from setuptools.extern.packaging.version import InvalidVersion # type: ignore
from setuptools.extern.packaging.version import Version as Version # type: ignore


class NonNormalizedVersion(Version):
Expand Down

0 comments on commit 52d6e1f

Please sign in to comment.