From 2d2ab437742f8f88e2d48a49f7dbb30cfca876e6 Mon Sep 17 00:00:00 2001 From: eabdullin Date: Mon, 25 Sep 2023 15:15:48 +0000 Subject: [PATCH] import CS python-tomli-2.0.1-5.el9 --- .gitignore | 1 + .python-tomli.metadata | 1 + SOURCES/tomli-setup.py | 37 +++++++++++++++++++++ SPECS/python-tomli.spec | 72 +++++++++++++++++++++++++++++++++++++++++ 4 files changed, 111 insertions(+) create mode 100644 .gitignore create mode 100644 .python-tomli.metadata create mode 100644 SOURCES/tomli-setup.py create mode 100644 SPECS/python-tomli.spec diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0f0404d --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/python-tomli-2.0.1.tar.gz diff --git a/.python-tomli.metadata b/.python-tomli.metadata new file mode 100644 index 0000000..a68f1db --- /dev/null +++ b/.python-tomli.metadata @@ -0,0 +1 @@ +234c9caf7ba15e7892a0ae3ed1f0381d9fb5e61c SOURCES/python-tomli-2.0.1.tar.gz diff --git a/SOURCES/tomli-setup.py b/SOURCES/tomli-setup.py new file mode 100644 index 0000000..5dd3968 --- /dev/null +++ b/SOURCES/tomli-setup.py @@ -0,0 +1,37 @@ +import pathlib +from setuptools import setup + +setup( + name="tomli", + version="@@VERSION@@", + description="A lil' TOML parser", + long_description=pathlib.Path("README.md").read_text(), + long_description_content_type="text/markdown", + packages=["tomli"], + package_dir={"": "src"}, + package_data={"tomli": ["py.typed"]}, + python_requires=">=3.7", + author="Taneli Hukkinen", + author_email="hukkin@users.noreply.github.com", + license="MIT", + classifiers=[ + "License :: OSI Approved :: MIT License", + "Operating System :: MacOS", + "Operating System :: Microsoft :: Windows", + "Operating System :: POSIX :: Linux", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: Implementation :: CPython", + "Programming Language :: Python :: Implementation :: PyPy", + "Topic :: Software Development :: Libraries :: Python Modules", + "Typing :: Typed", + ], + keywords=["toml"], + project_urls={ + "Homepage": "https://github.com/hukkin/tomli", + "Changelog": "https://github.com/hukkin/tomli/blob/master/CHANGELOG.md", + }, +) diff --git a/SPECS/python-tomli.spec b/SPECS/python-tomli.spec new file mode 100644 index 0000000..d5248b3 --- /dev/null +++ b/SPECS/python-tomli.spec @@ -0,0 +1,72 @@ +Name: python-tomli +Version: 2.0.1 +Release: 5%{?dist} +Summary: A little TOML parser for Python + +License: MIT +URL: https://pypi.org/project/tomli/ +Source0: https://github.com/hukkin/tomli/archive/%{version}/%{name}-%{version}.tar.gz + +# Upstream tomli uses flit, but we want to use setuptools on RHEL 9. +# This a downstream-only setup.py manually created from pyproject.toml metadata. +# It contains a @@VERSION@@ placeholder. +Source1: tomli-setup.py + +BuildArch: noarch +BuildRequires: python3-devel + +# The test suite uses the stdlib's unittest framework, but we use %%pytest +# as the test runner. +BuildRequires: python3-pytest + +%global _description %{expand: +Tomli is a Python library for parsing TOML. +Tomli is fully compatible with TOML v1.0.0.} + + +%description %_description + +%package -n python3-tomli +Summary: %{summary} + +%description -n python3-tomli %_description + + +%prep +%autosetup -p1 -n tomli-%{version} +sed 's/@@VERSION@@/%{version}/' %{SOURCE1} > setup.py +rm pyproject.toml # force the PEP 517 fallback build backend (setuptools) + + +%generate_buildrequires +%pyproject_buildrequires -r + + +%build +%pyproject_wheel + + +%install +%pyproject_install +%pyproject_save_files tomli + + +%check +%py3_check_import tomli +%pytest + + +%files -n python3-tomli -f %{pyproject_files} +%doc README.md +%doc CHANGELOG.md + + +%changelog +* Wed Mar 08 2023 Miro Hrončok - 2.0.1-5 +- Initial package for RHEL 9 +- Resolves: rhbz#2175213 +- Fedora+EPEL contributions by: + Maxwell G + Michel Alexandre Salim + Miro Hrončok + Petr Viktorin