Refactor Move-to-PEP-621-declarative-metadata.patch
This rebases the patch and changes it to use the %version from the
specfile to prevent the versions from getting un-synced like they did in
f450b112a2
.
This commit is contained in:
parent
2380c1aa09
commit
4fcd3c944b
@ -1,21 +1,19 @@
|
|||||||
From 8a055314b9d43ccf135b5daaa9dba95d6b4698ab Mon Sep 17 00:00:00 2001
|
From 49510fec2cddeb796ab4078be4577eee624833f0 Mon Sep 17 00:00:00 2001
|
||||||
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= <thrnciar@redhat.com>
|
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= <thrnciar@redhat.com>
|
||||||
Date: Tue, 21 Feb 2023 18:22:42 +0100
|
Date: Tue, 21 Feb 2023 18:22:42 +0100
|
||||||
Subject: [PATCH] Move to PEP 621 declarative metadata
|
Subject: [PATCH] Move to PEP 621 declarative metadata
|
||||||
|
|
||||||
---
|
---
|
||||||
pyproject.toml | 35 +++++++++++++++++++++++++++++++-
|
pyproject.toml | 31 ++++++++++++++++++++++++++++++-
|
||||||
setup.py | 33 ------------------------------
|
setup.py | 33 ---------------------------------
|
||||||
src/trove_classifiers/version.py | 1 +
|
2 files changed, 30 insertions(+), 34 deletions(-)
|
||||||
3 files changed, 35 insertions(+), 34 deletions(-)
|
|
||||||
delete mode 100644 setup.py
|
delete mode 100644 setup.py
|
||||||
create mode 100644 src/trove_classifiers/version.py
|
|
||||||
|
|
||||||
diff --git a/pyproject.toml b/pyproject.toml
|
diff --git a/pyproject.toml b/pyproject.toml
|
||||||
index 672fc13..23542a4 100644
|
index 05374a2..1134247 100644
|
||||||
--- a/pyproject.toml
|
--- a/pyproject.toml
|
||||||
+++ b/pyproject.toml
|
+++ b/pyproject.toml
|
||||||
@@ -1,7 +1,40 @@
|
@@ -1,7 +1,36 @@
|
||||||
[build-system]
|
[build-system]
|
||||||
-requires = ["setuptools", "calver"]
|
-requires = ["setuptools", "calver"]
|
||||||
+requires = ["setuptools >= 61.0"]
|
+requires = ["setuptools >= 61.0"]
|
||||||
@ -23,6 +21,7 @@ index 672fc13..23542a4 100644
|
|||||||
|
|
||||||
+[project]
|
+[project]
|
||||||
+name = "trove-classifiers"
|
+name = "trove-classifiers"
|
||||||
|
+version = "@@VERSION@@"
|
||||||
+readme = "README.md"
|
+readme = "README.md"
|
||||||
+description = "Canonical source for classifiers on PyPI (pypi.org)."
|
+description = "Canonical source for classifiers on PyPI (pypi.org)."
|
||||||
+authors = [{name = "The PyPI Admins", email = "admin@pypi.org"}]
|
+authors = [{name = "The PyPI Admins", email = "admin@pypi.org"}]
|
||||||
@ -34,7 +33,6 @@ index 672fc13..23542a4 100644
|
|||||||
+ "Typing :: Typed",
|
+ "Typing :: Typed",
|
||||||
+]
|
+]
|
||||||
+keywords = ["classifiers"]
|
+keywords = ["classifiers"]
|
||||||
+dynamic = ["version"]
|
|
||||||
+
|
+
|
||||||
+[project.urls]
|
+[project.urls]
|
||||||
+Homepage = "https://github.com/pypa/trove-classifiers"
|
+Homepage = "https://github.com/pypa/trove-classifiers"
|
||||||
@ -50,11 +48,7 @@ index 672fc13..23542a4 100644
|
|||||||
+[tool.setuptools.package-data]
|
+[tool.setuptools.package-data]
|
||||||
+"*" = ["py.typed"]
|
+"*" = ["py.typed"]
|
||||||
+
|
+
|
||||||
+[tool.setuptools.dynamic.version]
|
[tool.mypy]
|
||||||
+attr = "trove_classifiers.version.__version__"
|
|
||||||
+
|
|
||||||
+
|
|
||||||
[mypy]
|
|
||||||
strict = true
|
strict = true
|
||||||
warn_unreachable = true
|
warn_unreachable = true
|
||||||
diff --git a/setup.py b/setup.py
|
diff --git a/setup.py b/setup.py
|
||||||
@ -96,13 +90,6 @@ index 826eac7..0000000
|
|||||||
- use_calver=True,
|
- use_calver=True,
|
||||||
- setup_requires=["calver"],
|
- setup_requires=["calver"],
|
||||||
-)
|
-)
|
||||||
diff --git a/src/trove_classifiers/version.py b/src/trove_classifiers/version.py
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..49cb855
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/src/trove_classifiers/version.py
|
|
||||||
@@ -0,0 +1 @@
|
|
||||||
+__version__ = "2023.2.20"
|
|
||||||
--
|
--
|
||||||
2.38.1
|
2.40.1
|
||||||
|
|
||||||
|
@ -32,6 +32,8 @@ Summary: %{summary}
|
|||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -p1 -n trove-classifiers-%{version}
|
%autosetup -p1 -n trove-classifiers-%{version}
|
||||||
|
# Replace @@VERSION@@ with %%version
|
||||||
|
%writevars -f pyproject.toml version
|
||||||
|
|
||||||
|
|
||||||
%generate_buildrequires
|
%generate_buildrequires
|
||||||
|
Loading…
Reference in New Issue
Block a user