[packages/python3-decorator] - python-decorator.spec updated to 5.2.1 for python 3.8+
qboosh
qboosh at pld-linux.org
Sun Jul 13 12:58:52 CEST 2025
commit db42aec7c13f8fe1eb80de923d4656f4796b5179
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Jul 13 13:00:25 2025 +0200
- python-decorator.spec updated to 5.2.1 for python 3.8+
python-decorator.spec | 118 -------------------------------------------------
python3-decorator.spec | 86 +++++++++++++++++++++++++++++++++++
2 files changed, 86 insertions(+), 118 deletions(-)
---
diff --git a/python-decorator.spec b/python-decorator.spec
deleted file mode 100644
index e7d94dd..0000000
--- a/python-decorator.spec
+++ /dev/null
@@ -1,118 +0,0 @@
-#
-# Conditional build:
-%bcond_without python2 # CPython 2.x module
-%bcond_without python3 # CPython 3.x module
-%bcond_without tests # test suite
-
-%define module decorator
-Summary: Bunch of nice decorators for Python 2
-Summary(pl.UTF-8): Zbiór ładnych dekoratorów dla Pythona 2
-Name: python-%{module}
-# keep 4.x here for python2 support
-Version: 4.4.2
-Release: 7
-License: BSD
-Group: Libraries/Python
-#Source0Download: https://pypi.org/simple/decorator/
-Source0: https://files.pythonhosted.org/packages/source/d/decorator/%{module}-%{version}.tar.gz
-# Source0-md5: d83c624cce93e6bdfab144821b526e1d
-Source1: https://raw.githubusercontent.com/micheles/decorator/%{version}/docs/documentation.md
-# Source1-md5: e98a2c67526f4fb98053399c2de83f11
-URL: https://pypi.org/project/decorator/
-%if %{with python2}
-BuildRequires: python-devel >= 1:2.6
-BuildRequires: python-modules >= 1:2.6
-BuildRequires: python-setuptools
-%endif
-%if %{with python3}
-BuildRequires: python3-devel >= 1:3.2
-BuildRequires: python3-modules >= 1:3.2
-BuildRequires: python3-setuptools
-%endif
-BuildRequires: rpm-pythonprov
-BuildRequires: rpmbuild(macros) >= 1.714
-BuildArch: noarch
-BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-
-%description
-Bunch of nice decorators for Python 2 like memoize, tracing,
-redirecting_stdout, locked.
-
-%description -l pl.UTF-8
-Zbiór ładnych dekoratorów dla Pythona 2: memoize, tracing,
-redirecting_stdout, locked...
-
-%package -n python3-%{module}
-Summary: Bunch of nice decorators for Python 3
-Summary(pl.UTF-8): Zbiór ładnych dekoratorów dla Pythona 3
-Group: Libraries/Python
-
-%description -n python3-%{module}
-Bunch of nice decorators for Python 3 like memoize, tracing,
-redirecting_stdout, locked.
-
-%description -n python3-%{module} -l pl.UTF-8
-Zbiór ładnych dekoratorów dla Pythona 3: memoize, tracing,
-redirecting_stdout, locked...
-
-%package doc
-Summary: Documentation for decorator module in PDF format
-Summary(pl.UTF-8): Dokumentacja modułu decorator w formacie PDF
-Group: Documentation
-
-%description doc
-Documentation for decorator module in PDF format.
-
-%description doc -l pl.UTF-8
-Dokumentacja modułu decorator w formacie PDF.
-
-%prep
-%setup -q -n %{module}-%{version}
-
-cp -p %{SOURCE1} .
-
-%build
-%if %{with python2}
-%py_build %{?with_tests:test}
-%endif
-
-%if %{with python3}
-%py3_build %{?with_tests:test}
-%endif
-
-%install
-rm -rf $RPM_BUILD_ROOT
-
-%if %{with python2}
-%py_install
-
-%py_postclean
-%endif
-
-%if %{with python3}
-%py3_install
-%endif
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%if %{with python2}
-%files
-%defattr(644,root,root,755)
-%doc CHANGES.md LICENSE.txt README.rst
-%{py_sitescriptdir}/decorator.py[co]
-%{py_sitescriptdir}/decorator-%{version}-py*.egg-info
-%endif
-
-%if %{with python3}
-%files -n python3-%{module}
-%defattr(644,root,root,755)
-%doc CHANGES.md LICENSE.txt README.rst
-%{py3_sitescriptdir}/decorator.py
-%{py3_sitescriptdir}/__pycache__/decorator.cpython-*.py[co]
-%{py3_sitescriptdir}/decorator-%{version}-py*.egg-info
-%endif
-
-%files doc
-%defattr(644,root,root,755)
-%doc documentation.md
diff --git a/python3-decorator.spec b/python3-decorator.spec
new file mode 100644
index 0000000..0606a99
--- /dev/null
+++ b/python3-decorator.spec
@@ -0,0 +1,86 @@
+#
+# Conditional build:
+%bcond_without doc # Sphinx documentation
+%bcond_without tests # test suite
+
+%define module decorator
+Summary: Bunch of nice decorators for Python 3
+Summary(pl.UTF-8): Zbiór ładnych dekoratorów dla Pythona 3
+Name: python3-%{module}
+Version: 5.2.1
+Release: 1
+License: BSD
+Group: Libraries/Python
+#Source0Download: https://pypi.org/simple/decorator/
+Source0: https://files.pythonhosted.org/packages/source/d/decorator/%{module}-%{version}.tar.gz
+# Source0-md5: 984649ae1fd174f9a82369e7c9cc56e6
+URL: https://pypi.org/project/decorator/
+BuildRequires: python3-build
+BuildRequires: python3-installer
+BuildRequires: python3-modules >= 1:3.8
+BuildRequires: python3-setuptools
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 2.044
+%if %{with doc}
+BuildRequires: python3-myst_parser
+BuildRequires: sphinx-pdg-3
+%endif
+Requires: python3-modules >= 1:3.8
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Bunch of nice decorators for Python like memoize, tracing,
+redirecting_stdout, locked.
+
+%description -l pl.UTF-8
+Zbiór ładnych dekoratorów dla Pythona: memoize, tracing,
+redirecting_stdout, locked...
+
+%package doc
+Summary: Documentation for decorator module in HTML format
+Summary(pl.UTF-8): Dokumentacja modułu decorator w formacie HTML
+Group: Documentation
+
+%description doc
+Documentation for decorator module in HTML format.
+
+%description doc -l pl.UTF-8
+Dokumentacja modułu decorator w formacie HTML.
+
+%prep
+%setup -q -n %{module}-%{version}
+
+%build
+%py3_build_pyproject
+
+%if %{with tests}
+PYTHONPATH=$(pwd)/src \
+%{__python3} tests/test.py
+%endif
+
+%if %{with doc}
+PYTHONPATH=$(pwd)/src \
+sphinx-build-3 -b html docs docs/_build/html
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%py3_install_pyproject
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc CHANGES.md LICENSE.txt README.rst
+%{py3_sitescriptdir}/decorator.py
+%{py3_sitescriptdir}/__pycache__/decorator.cpython-*.py[co]
+%{py3_sitescriptdir}/decorator-%{version}.dist-info
+
+%if %{with doc}
+%files doc
+%defattr(644,root,root,755)
+%doc docs/_build/html/{_static,*.html,*.js}
+%endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python3-decorator.git/commitdiff/db42aec7c13f8fe1eb80de923d4656f4796b5179
More information about the pld-cvs-commit
mailing list