Initial import (fedora#2172053).

This commit is contained in:
Tomáš Hrnčiar 2023-02-21 18:55:36 +01:00
parent e4523d2bb3
commit be7759a5e8
4 changed files with 171 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/trove-classifiers-2023.2.20.tar.gz

View File

@ -0,0 +1,108 @@
From 8a055314b9d43ccf135b5daaa9dba95d6b4698ab Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hrn=C4=8Diar?= <thrnciar@redhat.com>
Date: Tue, 21 Feb 2023 18:22:42 +0100
Subject: [PATCH] Move to PEP 621 declarative metadata
---
pyproject.toml | 35 +++++++++++++++++++++++++++++++-
setup.py | 33 ------------------------------
src/trove_classifiers/version.py | 1 +
3 files changed, 35 insertions(+), 34 deletions(-)
delete mode 100644 setup.py
create mode 100644 src/trove_classifiers/version.py
diff --git a/pyproject.toml b/pyproject.toml
index 672fc13..23542a4 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,7 +1,40 @@
[build-system]
-requires = ["setuptools", "calver"]
+requires = ["setuptools >= 61.0"]
build-backend = "setuptools.build_meta"
+[project]
+name = "trove-classifiers"
+readme = "README.md"
+description = "Canonical source for classifiers on PyPI (pypi.org)."
+authors = [{name = "The PyPI Admins", email = "admin@pypi.org"}]
+classifiers = [
+ "Development Status :: 5 - Production/Stable",
+ "Intended Audience :: Developers",
+ "License :: OSI Approved :: Apache Software License",
+ "Programming Language :: Python :: 3",
+ "Typing :: Typed",
+]
+keywords = ["classifiers"]
+dynamic = ["version"]
+
+[project.urls]
+Homepage = "https://github.com/pypa/trove-classifiers"
+
+[tool.setuptools]
+package-dir = {"" = "src"}
+include-package-data = false
+
+[tool.setuptools.packages.find]
+where = ["src"]
+namespaces = false
+
+[tool.setuptools.package-data]
+"*" = ["py.typed"]
+
+[tool.setuptools.dynamic.version]
+attr = "trove_classifiers.version.__version__"
+
+
[mypy]
strict = true
warn_unreachable = true
diff --git a/setup.py b/setup.py
deleted file mode 100644
index 826eac7..0000000
--- a/setup.py
+++ /dev/null
@@ -1,33 +0,0 @@
-from io import open
-from os import path
-
-from setuptools import setup, find_packages
-
-here = path.abspath(path.dirname(__file__))
-
-# Get the long description from the README file
-with open(path.join(here, "README.md"), encoding="utf-8") as f:
- long_description = f.read()
-
-setup(
- name="trove-classifiers",
- description="Canonical source for classifiers on PyPI (pypi.org).",
- long_description=long_description,
- long_description_content_type="text/markdown",
- url="https://github.com/pypa/trove-classifiers",
- author="The PyPI Admins",
- author_email="admin@pypi.org",
- classifiers=[
- "Development Status :: 5 - Production/Stable",
- "Intended Audience :: Developers",
- "License :: OSI Approved :: Apache Software License",
- "Programming Language :: Python :: 3",
- "Typing :: Typed",
- ],
- keywords="classifiers",
- package_dir={"": "src"},
- packages=find_packages(where="src"),
- package_data={"": ["py.typed"]},
- use_calver=True,
- 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

View File

@ -0,0 +1,61 @@
Name: python-trove-classifiers
Version: 2023.2.20
Release: 1%{?dist}
Summary: Canonical source for classifiers on PyPI (pypi.org)
License: Apache-2.0
URL: https://github.com/pypa/trove-classifiers
Source: %{pypi_source trove-classifiers}
# Drop dependency on calver which is not packaged in Fedora.
# This patch is rebased version of upstream PR:
# https://github.com/pypa/trove-classifiers/pull/126/commits/809156bb35852bcaa1c753e0165f1814f2bcedf6
Patch: Move-to-PEP-621-declarative-metadata.patch
BuildArch: noarch
BuildRequires: python3-devel
BuildRequires: python3-pytest
%global _description %{expand:
Canonical source for classifiers on PyPI.
Classifiers categorize projects per PEP 301. Use this package to validate
classifiers in packages for PyPI upload or download.
}
%description %_description
%package -n python3-trove-classifiers
Summary: %{summary}
%description -n python3-trove-classifiers %_description
%prep
%autosetup -p1 -n trove-classifiers-%{version}
%generate_buildrequires
%pyproject_buildrequires
%build
%pyproject_wheel
%install
%pyproject_install
%pyproject_save_files trove_classifiers
%check
%pytest
%files -n python3-trove-classifiers -f %{pyproject_files}
%doc README.*
%changelog
* Tue Feb 21 2023 Tomáš Hrnčiar <thrnciar@redhat.com> - 2023.2.20-1
Initial package

1
sources Normal file
View File

@ -0,0 +1 @@
SHA512 (trove-classifiers-2023.2.20.tar.gz) = 1df108c328ac3281b599d55cfd579dba05545573e84699a32b0c2b65604f86d1713000dae7d25185085a6ce915ca0e37e070ba95ea10b3cdcddf981a41badf29