Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #918: use packaging from setuptools for self-build #923

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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