]> git.pld-linux.org Git - packages/python-decorator.git/blame - python-decorator.spec
rebuild with python 3.10
[packages/python-decorator.git] / python-decorator.spec
CommitLineData
9f1dcfe7
JB
1#
2# Conditional build:
3%bcond_without python2 # CPython 2.x module
4%bcond_without python3 # CPython 3.x module
3ca93b97 5%bcond_without tests # test suite
9f1dcfe7 6
8520a43a 7%define module decorator
9f1dcfe7
JB
8Summary: Bunch of nice decorators for Python 2
9Summary(pl.UTF-8): Zbiór ładnych dekoratorów dla Pythona 2
8f90b112 10Name: python-%{module}
293a5994 11Version: 4.4.2
6f637a45 12Release: 4
1767f406 13License: BSD
8520a43a 14Group: Libraries/Python
a505c87c 15#Source0Download: https://pypi.org/simple/decorator/
3ca93b97 16Source0: https://files.pythonhosted.org/packages/source/d/decorator/%{module}-%{version}.tar.gz
293a5994 17# Source0-md5: d83c624cce93e6bdfab144821b526e1d
a4fd0b0a 18Source1: https://raw.githubusercontent.com/micheles/decorator/%{version}/docs/documentation.md
293a5994 19# Source1-md5: e98a2c67526f4fb98053399c2de83f11
a505c87c 20URL: https://pypi.org/project/decorator/
9f1dcfe7 21%if %{with python2}
a505c87c
JB
22BuildRequires: python-devel >= 1:2.6
23BuildRequires: python-modules >= 1:2.6
a3525a95 24BuildRequires: python-setuptools
9f1dcfe7
JB
25%endif
26%if %{with python3}
a3525a95
JB
27BuildRequires: python3-devel >= 1:3.2
28BuildRequires: python3-modules >= 1:3.2
29BuildRequires: python3-setuptools
9f1dcfe7 30%endif
22a4cdb6 31BuildRequires: rpm-pythonprov
a505c87c 32BuildRequires: rpmbuild(macros) >= 1.714
8f90b112 33BuildArch: noarch
34BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
35
36%description
9f1dcfe7 37Bunch of nice decorators for Python 2 like memoize, tracing,
8f90b112 38redirecting_stdout, locked.
39
a6b812b0 40%description -l pl.UTF-8
9f1dcfe7
JB
41Zbiór ładnych dekoratorów dla Pythona 2: memoize, tracing,
42redirecting_stdout, locked...
43
44%package -n python3-%{module}
45Summary: Bunch of nice decorators for Python 3
46Summary(pl.UTF-8): Zbiór ładnych dekoratorów dla Pythona 3
47Group: Libraries/Python
48
49%description -n python3-%{module}
50Bunch of nice decorators for Python 3 like memoize, tracing,
51redirecting_stdout, locked.
52
53%description -n python3-%{module} -l pl.UTF-8
54Zbiór ładnych dekoratorów dla Pythona 3: memoize, tracing,
a6b812b0
JB
55redirecting_stdout, locked...
56
a3525a95
JB
57%package doc
58Summary: Documentation for decorator module in PDF format
59Summary(pl.UTF-8): Dokumentacja modułu decorator w formacie PDF
60Group: Documentation
61
62%description doc
63Documentation for decorator module in PDF format.
64
65%description doc -l pl.UTF-8
66Dokumentacja modułu decorator w formacie PDF.
67
8f90b112 68%prep
8a1c3358 69%setup -q -n %{module}-%{version}
8f90b112 70
a4fd0b0a 71cp -p %{SOURCE1} .
a505c87c 72
8f90b112 73%build
9f1dcfe7 74%if %{with python2}
3ca93b97 75%py_build %{?with_tests:test}
9f1dcfe7 76%endif
3ca93b97 77
9f1dcfe7 78%if %{with python3}
3ca93b97 79%py3_build %{?with_tests:test}
9f1dcfe7 80%endif
8f90b112 81
82%install
83rm -rf $RPM_BUILD_ROOT
9f1dcfe7
JB
84
85%if %{with python2}
56db354d 86%py_install
8f90b112 87
88%py_postclean
9f1dcfe7
JB
89%endif
90
91%if %{with python3}
56db354d 92%py3_install
9f1dcfe7 93%endif
8f90b112 94
95%clean
96rm -rf $RPM_BUILD_ROOT
97
9f1dcfe7 98%if %{with python2}
8f90b112 99%files
100%defattr(644,root,root,755)
293a5994 101%doc CHANGES.md LICENSE.txt README.rst
fb66e5d5
JB
102%{py_sitescriptdir}/decorator.py[co]
103%{py_sitescriptdir}/decorator-%{version}-py*.egg-info
9f1dcfe7
JB
104%endif
105
106%if %{with python3}
107%files -n python3-%{module}
108%defattr(644,root,root,755)
293a5994 109%doc CHANGES.md LICENSE.txt README.rst
9f1dcfe7 110%{py3_sitescriptdir}/decorator.py
a4fd0b0a 111%{py3_sitescriptdir}/__pycache__/decorator.cpython-*.py[co]
9f1dcfe7
JB
112%{py3_sitescriptdir}/decorator-%{version}-py*.egg-info
113%endif
a3525a95
JB
114
115%files doc
116%defattr(644,root,root,755)
a4fd0b0a 117%doc documentation.md
This page took 0.640242 seconds and 4 git commands to generate.