diff --git a/.python-daemon.metadata b/.python-daemon.metadata new file mode 100644 index 0000000..fd125f7 --- /dev/null +++ b/.python-daemon.metadata @@ -0,0 +1 @@ +fc257247c526815a375cb273fb24879ad5f683bf SOURCES/python_daemon-3.1.0.tar.gz diff --git a/SOURCES/drop-dependencies-and-fix-dynamic-version.patch b/SOURCES/drop-dependencies-and-fix-dynamic-version.patch new file mode 100644 index 0000000..27e8d7b --- /dev/null +++ b/SOURCES/drop-dependencies-and-fix-dynamic-version.patch @@ -0,0 +1,128 @@ +From 7ded5073e8bff541ed0ee09b0c3a66fd495a2d58 Mon Sep 17 00:00:00 2001 +From: Lumir Balhar +Date: Thu, 31 Oct 2024 10:05:52 +0100 +Subject: [PATCH] drop dependencies and fix dynamic version + +--- + pyproject.toml | 32 ++------------------------------ + util/metadata.py | 16 ---------------- + 2 files changed, 2 insertions(+), 46 deletions(-) + +diff --git a/pyproject.toml b/pyproject.toml +index 66f018e..a45637b 100644 +--- a/pyproject.toml ++++ b/pyproject.toml +@@ -9,6 +9,8 @@ + + # Name of the Python distribution to build. + name = "python-daemon" ++version = "VERSION_PLACEHOLDER" ++description = "Library to implement a well-behaved Unix daemon process." + + # Keywords to categorise this project. + keywords = ["daemon", "fork", "unix"] +@@ -30,10 +32,6 @@ requires-python = ">= 3.7" + # Core dependencies required for the package to operate. + dependencies = [ + +- # Framework for working with Python packages. +- # Documentation: . +- "setuptools >= 62.4.0", +- + # Platform-independent file locking module. + # Documentation: . + "lockfile >= 0.10", +@@ -48,13 +46,6 @@ authors = [ + { name = "Ben Finney", email = "ben+python@benfinney.id.au" }, + ] + +-# Names of fields that must be dynamically computed by the build system. +-dynamic = [ +- "description", +- "readme", +- "version", +- "maintainers", +- ] + + [project.optional-dependencies] + +@@ -106,16 +97,9 @@ build = [ + # Documentation: . + "docutils", + +- # Parser library for project Change Log documents. +- # Documentation: . +- "changelog-chug", +- + ] + + test = [ +- +- "python-daemon[static-analysis,build]", +- + # Extensions to the Python ‘unittest’ framework. + # Documentation: . + "testtools", +@@ -124,10 +108,6 @@ test = [ + # Documentation: . + "testscenarios >= 0.4", + +- # Code coverage measurement. +- # Documentation: . +- "coverage", +- + ] + + dist = [ +@@ -166,14 +146,6 @@ requires = [ + # Documentation: . + "setuptools >= 62.4.0", + +- # Python Documentation Utilities. +- # Documentation: . +- "docutils", +- +- # Parser library for project Change Log documents. +- # Documentation: . +- "changelog-chug", +- + ] + + # Path to the Python object to perform the build. +diff --git a/util/metadata.py b/util/metadata.py +index 6da93c0..38a7df7 100644 +--- a/util/metadata.py ++++ b/util/metadata.py +@@ -16,8 +16,6 @@ import inspect + import pydoc + import re + +-import chug.parsers.rest +- + + rfc822_person_regex = re.compile( + r"^(?P[^<]+) <(?P[^>]+)>$") +@@ -110,20 +108,6 @@ def synopsis_and_description_from_docstring(docstring): + (synopsis, long_description) = pydoc.splitdoc(docstring) + return (synopsis, long_description) + +- +-def get_latest_changelog_entry(infile_path): +- """ Get the latest entry data from the changelog at `infile_path`. +- +- :param infile_path: The filesystem path (text) from which to read the +- change log document. +- :return: The most recent change log entry, as a `chug.ChangeLogEntry`. +- """ +- document_text = chug.parsers.get_changelog_document_text(infile_path) +- document = chug.parsers.rest.parse_rest_document_from_text(document_text) +- entries = chug.parsers.rest.make_change_log_entries_from_document( +- document) +- latest_entry = entries[0] +- return latest_entry + + + # Copyright © 2008–2024 Ben Finney +-- +2.47.0 + diff --git a/SPECS/python-daemon.spec b/SPECS/python-daemon.spec new file mode 100644 index 0000000..249cd1f --- /dev/null +++ b/SPECS/python-daemon.spec @@ -0,0 +1,257 @@ +Name: python-daemon +Version: 3.1.0 +Release: 2%{?dist} +Summary: Library to implement a well-behaved Unix daemon process + +# Some build scripts and test framework are licensed GPL-3.0-or-later but those aren't shipped +License: Apache-2.0 +URL: https://pagure.io/python-daemon +Source: %{pypi_source python_daemon} +# Downstream changes to some deps and metdata, for example: +# - changelog-chug is not packaged in Fedora +# - coverage and other static analysis tools are not needed here +# - version is dynamic but got via changelog-chug, use a placeholder +# - setuptools is not needed at runtime +Patch: drop-dependencies-and-fix-dynamic-version.patch + +BuildArch: noarch +BuildRequires: python3-devel + +%global _description %{expand: +This library implements the well-behaved daemon specification of PEP 3143, +"Standard daemon process library".} + + +%description %_description + + +%package -n python3-daemon +Summary: %{summary} + + +%description -n python3-daemon %_description + + +%prep +%autosetup -p1 -n python_daemon-%{version} +# See the patch removing dependencies above +# - insert the actual version +sed -i "s/VERSION_PLACEHOLDER/%{version}/" pyproject.toml +# - setup.py is not needed, everything that remains is in pyproject.toml +# - test_setup.py tests importing of setup.py +# - test_util_* are not testing the libraty but packaging and other tools +rm setup.py test/test_setup.py test/test_util_metadata.py test/test_util_packaging.py + + +%generate_buildrequires +%pyproject_buildrequires -x test + + +%build +%pyproject_wheel + + +%install +%pyproject_install +%pyproject_save_files daemon + + +%check +PYTHONPATH=%{buildroot}%{python3_sitelib} %python3 -m unittest discover + + +%files -n python3-daemon -f %{pyproject_files} +%doc README ChangeLog + +%changelog +* Sat Jan 18 2025 Fedora Release Engineering - 3.1.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Thu Oct 31 2024 Lumir Balhar - 3.1.0-1 +- Update to 3.1.0 (rhbz#2175352, rhbz#2319648, rhbz#2307635) + +* Fri Jul 19 2024 Fedora Release Engineering - 2.3.2-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Fri Jun 07 2024 Python Maint - 2.3.2-7 +- Rebuilt for Python 3.13 + +* Fri Jan 26 2024 Fedora Release Engineering - 2.3.2-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Mon Jan 22 2024 Fedora Release Engineering - 2.3.2-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Fri Jul 21 2023 Fedora Release Engineering - 2.3.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Wed Jun 14 2023 Python Maint - 2.3.2-3 +- Rebuilt for Python 3.12 + +* Fri Jan 20 2023 Fedora Release Engineering - 2.3.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Mon Dec 12 2022 Carl George - 2.3.2-1 +- Convert to pyproject macros + +* Thu Aug 18 2022 Mikel Olasagasti Uranga - 2.3.1-2 +- Remove mock and extras BuildRequires + +* Tue Aug 16 2022 Mikel Olasagasti Uranga - 2.3.1-1 +- Update to 2.3.1 - Closes rhbz#2108452 +- Remove upstreamed python-daemon-safe_hasattr.patch +- Remove upstreamed tests-remove-duplicate-mocking.patch + +* Fri Jul 22 2022 Fedora Release Engineering - 2.3.0-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Wed Jun 15 2022 Python Maint - 2.3.0-5 +- Rebuilt for Python 3.11 + +* Fri Jan 21 2022 Fedora Release Engineering - 2.3.0-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Tue Jul 27 2021 Fedora Release Engineering - 2.3.0-3 +- Second attempt - Rebuilt for + https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Thu Jun 03 2021 Python Maint - 2.3.0-2 +- Rebuilt for Python 3.10 + +* Mon Feb 22 2021 Kevin Fenzi - 2.3.0-1 +- Update to 2.3.0. Fixes rhbz#1931165 + +* Wed Jan 27 2021 Fedora Release Engineering - 2.2.4-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Jul 29 2020 Fedora Release Engineering - 2.2.4-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Sat May 23 2020 Miro Hrončok - 2.2.4-2 +- Rebuilt for Python 3.9 + +* Sun Mar 22 2020 Carl George - 2.2.4-1 +- Latest upstream rhbz#1765895 + +* Thu Jan 30 2020 Fedora Release Engineering - 2.2.3-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Oct 03 2019 Miro Hrončok - 2.2.3-7 +- Rebuilt for Python 3.8.0rc1 (#1748018) + +* Wed Aug 28 2019 Miro Hrončok - 2.2.3-6 +- Subpackage python2-daemon has been removed + See https://fedoraproject.org/wiki/Changes/Mass_Python_2_Package_Removal + +* Tue Aug 20 2019 Pierre-Yves Chibon - 2.2.3-5 +- Patch the test suite so it passes with py2 + +* Sun Aug 18 2019 Miro Hrončok - 2.2.3-4 +- Rebuilt for Python 3.8 + +* Fri Jul 26 2019 Fedora Release Engineering - 2.2.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Sat Jun 29 2019 Kevin Fenzi - 2.2.3-2 +- Add patch for socket tests in python 3.8. Fixes bug #1695802 + +* Tue Feb 12 2019 Alfredo Moralejo - 2.2.3-1 +- Update to 2.2.3 + +* Sat Feb 02 2019 Fedora Release Engineering - 2.1.2-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jul 13 2018 Fedora Release Engineering - 2.1.2-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Mon Jun 18 2018 Miro Hrončok - 2.1.2-9 +- Rebuilt for Python 3.7 + +* Mon Feb 12 2018 Iryna Shcherbina - 2.1.2-8 +- Update Python 2 dependency declarations to new packaging standards + (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) + +* Fri Feb 09 2018 Fedora Release Engineering - 2.1.2-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Sun Dec 17 2017 Kevin Fenzi - 2.1.2-6 +- Add dep on python2-docutils. Fixes bug #1478196 + +* Sat Aug 19 2017 Zbigniew Jędrzejewski-Szmek - 2.1.2-5 +- Python 2 binary package renamed to python2-daemon + See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3 + +* Thu Jul 27 2017 Fedora Release Engineering - 2.1.2-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sat Feb 11 2017 Fedora Release Engineering - 2.1.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Mon Dec 19 2016 Miro Hrončok - 2.1.2-2 +- Rebuild for Python 3.6 + +* Wed Nov 09 2016 Kevin Fenzi - 2.1.2-1 +- Update to 2.1.2. Fixes bug #1389593 + +* Tue Jul 19 2016 Fedora Release Engineering - 2.1.1-2 +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages + +* Sun Apr 10 2016 Kevin Fenzi - 2.1.1-1 +- Update to 2.1.1. Fixes bug #1234933 + +* Thu Feb 04 2016 Fedora Release Engineering - 2.1.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Mon Nov 30 2015 Toshio Kuratomi - - 2.1.0-1 +- Update to newer upstream. +- Create a python3 subpackage since upstream supports it +- Note that newer upstream has relicensed to Apache 2.0 + +* Thu Jun 18 2015 Fedora Release Engineering - 1.6-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Mon Aug 4 2014 Thomas Spura - 1.6-7 +- enable tests again as lockfile was fixed + +* Sat Jun 07 2014 Fedora Release Engineering - 1.6-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Sun Aug 04 2013 Fedora Release Engineering - 1.6-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Thu Feb 14 2013 Fedora Release Engineering - 1.6-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Sat Jul 21 2012 Fedora Release Engineering - 1.6-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Sat Jan 14 2012 Fedora Release Engineering - 1.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Thu Jul 14 2011 Kushal Das - 1.6-1 +- New release of source + +* Tue Feb 08 2011 Fedora Release Engineering - 1.5.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Thu Jul 22 2010 David Malcolm - 1.5.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild + +* Wed Dec 23 2009 Thomas Spura - 1.5.2-1 +- add missing BR: python-nose +- also add lockfile as R (bug #513546) +- update to 1.5.2 + +* Wed Dec 23 2009 Thomas Spura - 1.5.1-2 +- add missing BR: minimock and lockfile -> testsuite works again +- remove patch, use sed instead + +* Wed Oct 07 2009 Luke Macken - 1.5.1-1 +- Update to 1.5.1 +- Remove conflicting files (#512760) + +* Sun Jul 26 2009 Fedora Release Engineering - 1.4.6-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Wed Jun 24 2009 Kushal Das 1.4.6-1 +- Initial release