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