From e978a2c0345cc5d1efdeeecdf11dfa97f5be1bf5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Budai?= Date: Wed, 26 Jun 2024 17:44:57 +0200 Subject: [PATCH] Drop unneeded build dependencies --- ...vcs-and-hatch-fancy-pypi-readme-deps.patch | 98 +++++++++++++++++++ python-attrs.spec | 8 +- 2 files changed, 105 insertions(+), 1 deletion(-) create mode 100644 0001-Remove-hatch-vcs-and-hatch-fancy-pypi-readme-deps.patch diff --git a/0001-Remove-hatch-vcs-and-hatch-fancy-pypi-readme-deps.patch b/0001-Remove-hatch-vcs-and-hatch-fancy-pypi-readme-deps.patch new file mode 100644 index 0000000..c1cf11c --- /dev/null +++ b/0001-Remove-hatch-vcs-and-hatch-fancy-pypi-readme-deps.patch @@ -0,0 +1,98 @@ +From dea54349ce9d0bc12f5ea27d9ba1f1821cd06faa Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ond=C5=99ej=20Budai?= +Date: Wed, 26 Jun 2024 17:04:38 +0200 +Subject: [PATCH] Remove hatch-vcs and hatch-fancy-pypi-readme deps + + These apparently have no effect on the built RPM (I checked manually), + so let's drop them from pyproject.toml, so we can remove them from RHEL. +--- + pyproject.toml | 51 +++----------------------------------------------- + 1 file changed, 3 insertions(+), 48 deletions(-) + +diff --git a/pyproject.toml b/pyproject.toml +index 1c72fc2..d61be73 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -1,12 +1,13 @@ + # SPDX-License-Identifier: MIT + + [build-system] +-requires = ["hatchling", "hatch-vcs", "hatch-fancy-pypi-readme>=23.2.0"] ++requires = ["hatchling"] + build-backend = "hatchling.build" + + + [project] + name = "attrs" ++version = "23.2.0" + authors = [{ name = "Hynek Schlawack", email = "hs@ox.cx" }] + license = "MIT" + requires-python = ">=3.7" +@@ -26,7 +27,7 @@ classifiers = [ + "Typing :: Typed", + ] + dependencies = ["importlib_metadata;python_version<'3.8'"] +-dynamic = ["version", "readme"] ++dynamic = ["readme"] + + [project.optional-dependencies] + tests-mypy = [ +@@ -69,55 +70,9 @@ GitHub = "https://github.com/python-attrs/attrs" + Funding = "https://github.com/sponsors/hynek" + Tidelift = "https://tidelift.com/subscription/pkg/pypi-attrs?utm_source=pypi-attrs&utm_medium=pypi" + +- +-[tool.hatch.version] +-source = "vcs" +-raw-options = { local_scheme = "no-local-version" } +- + [tool.hatch.build.targets.wheel] + packages = ["src/attr", "src/attrs"] + +-[tool.hatch.metadata.hooks.fancy-pypi-readme] +-content-type = "text/markdown" +- +-# PyPI doesn't support the tag. +-[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]] +-text = """

+- +- attrs +- +-

+-""" +- +-[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]] +-path = "README.md" +-start-after = "" +- +-[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]] +-text = """ +- +-## Release Information +- +-""" +- +-[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]] +-path = "CHANGELOG.md" +-pattern = "\n(###.+?\n)## " +- +-[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]] +-text = """ +- +---- +- +-[Full changelog](https://www.attrs.org/en/stable/changelog.html) +-""" +- +-# Point sponsor image URLs to versions. +-[[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]] +-pattern = '\/latest\/_static/sponsors' +-replacement = '/$HFPR_VERSION/_static/sponsors' +- +- + [tool.pytest.ini_options] + addopts = ["-ra", "--strict-markers", "--strict-config"] + xfail_strict = true +-- +2.45.2 + diff --git a/python-attrs.spec b/python-attrs.spec index d616ed2..e223456 100644 --- a/python-attrs.spec +++ b/python-attrs.spec @@ -10,7 +10,7 @@ Name: python-attrs Version: 23.2.0 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Python attributes without boilerplate # SPDX @@ -18,6 +18,7 @@ License: MIT URL: http://www.attrs.org/ BuildArch: noarch Source0: https://github.com/python-attrs/%{modname}/archive/%{version}/%{modname}-%{version}.tar.gz +Patch0: 0001-Remove-hatch-vcs-and-hatch-fancy-pypi-readme-deps.patch BuildRequires: python%{python3_pkgversion}-devel @@ -37,6 +38,8 @@ object protocols. %prep %setup -q -n %{modname}-%{version} +%patch -P 0 -p1 + # Remove undesired/optional test dependency on pympler sed -i '/"pympler",/d' pyproject.toml @@ -64,6 +67,9 @@ sed -i "/attrs\[tests-mypy\]/d" pyproject.toml %doc README.md %changelog +* Wed Jun 26 2024 Ondřej Budai - 23.2.0-6 +- Drop unneeded build dependencies + * Mon Jun 24 2024 Troy Dawson - 23.2.0-5 - Bump release for June 2024 mass rebuild