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