Skip to content

Commit 809156b

Browse files
committed
Move to PEP 621 declarative metadata
1 parent 9a90c33 commit 809156b

File tree

4 files changed

+37
-35
lines changed

4 files changed

+37
-35
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ jobs:
3232
password: ${{ secrets.pypi_password }}
3333
- name: Version
3434
id: version
35-
run: echo "::set-output name=version::$(python setup.py --version 2>/dev/null)"
35+
run: |
36+
echo version=$(python -c "from trove_classifiers import version; print(version.__version__)" 2>/dev/null) >> $GITHUB_OUTPUT
3637
- name: Tag
3738
uses: actions/create-release@v1
3839
env:

pyproject.toml

Lines changed: 34 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,40 @@
11
[build-system]
2-
requires = ["setuptools", "calver"]
2+
requires = ["setuptools >= 61.0"]
33
build-backend = "setuptools.build_meta"
44

5+
[project]
6+
name = "trove-classifiers"
7+
readme = "README.md"
8+
description = "Canonical source for classifiers on PyPI (pypi.org)."
9+
authors = [{name = "The PyPI Admins", email = "[email protected]"}]
10+
classifiers = [
11+
"Development Status :: 5 - Production/Stable",
12+
"Intended Audience :: Developers",
13+
"License :: OSI Approved :: Apache Software License",
14+
"Programming Language :: Python :: 3",
15+
"Typing :: Typed",
16+
]
17+
keywords = ["classifiers"]
18+
dynamic = ["version"]
19+
20+
[project.urls]
21+
Homepage = "https://github.com/pypa/trove-classifiers"
22+
23+
[tool.setuptools]
24+
package-dir = {"" = "src"}
25+
include-package-data = false
26+
27+
[tool.setuptools.packages.find]
28+
where = ["src"]
29+
namespaces = false
30+
31+
[tool.setuptools.package-data]
32+
"*" = ["py.typed"]
33+
34+
[tool.setuptools.dynamic.version]
35+
attr = "trove_classifiers.version.__version__"
36+
37+
538
[mypy]
639
strict = true
740
warn_unreachable = true

setup.py

Lines changed: 0 additions & 33 deletions
This file was deleted.

src/trove_classifiers/version.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__version__ = "2022.12.22"

0 commit comments

Comments
 (0)