]> git.pld-linux.org Git - packages/python-decorator.git/blob - python-decorator.spec
- python 3.4
[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
6 %define         module decorator
7 Summary:        Bunch of nice decorators for Python 2
8 Summary(pl.UTF-8):      Zbiór ładnych dekoratorów dla Pythona 2
9 Name:           python-%{module}
10 Version:        3.4.0
11 Release:        3
12 License:        BSD
13 Group:          Libraries/Python
14 Source0:        https://pypi.python.org/packages/source/d/decorator/%{module}-%{version}.tar.gz
15 # Source0-md5:  1e8756f719d746e2fc0dd28b41251356
16 URL:            https://pypi.python.org/pypi/decorator/
17 %if %{with python2}
18 BuildRequires:  python-devel >= 1:2.4
19 BuildRequires:  python-modules >= 1:2.4
20 %endif
21 %if %{with python3}
22 BuildRequires:  python3-devel >= 3.2
23 BuildRequires:  python3-modules >= 3.2
24 %endif
25 BuildRequires:  rpm-pythonprov
26 BuildRequires:  rpmbuild(macros) >= 1.612
27 BuildArch:      noarch
28 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30 %description
31 Bunch of nice decorators for Python 2 like memoize, tracing,
32 redirecting_stdout, locked.
33
34 %description -l pl.UTF-8
35 Zbiór ładnych dekoratorów dla Pythona 2: memoize, tracing,
36 redirecting_stdout, locked...
37
38 %package -n python3-%{module}
39 Summary:        Bunch of nice decorators for Python 3
40 Summary(pl.UTF-8):      Zbiór ładnych dekoratorów dla Pythona 3
41 Group:          Libraries/Python
42
43 %description -n python3-%{module}
44 Bunch of nice decorators for Python 3 like memoize, tracing,
45 redirecting_stdout, locked.
46
47 %description -n python3-%{module} -l pl.UTF-8
48 Zbiór ładnych dekoratorów dla Pythona 3: memoize, tracing,
49 redirecting_stdout, locked...
50
51 %prep
52 %setup -q -n %{module}-%{version}
53
54 %build
55 %if %{with python2}
56 %{__python} setup.py build \
57         --build-base build-2
58 %endif
59 %if %{with python3}
60 %{__python3} setup.py build \
61         --build-base build-3
62 %endif
63
64 %install
65 rm -rf $RPM_BUILD_ROOT
66
67 %if %{with python2}
68 %{__python} setup.py \
69         build \
70                 --build-base build-2 \
71         install \
72                 --optimize=2 \
73                 --root=$RPM_BUILD_ROOT
74
75 %py_postclean
76 %endif
77
78 %if %{with python3}
79 %{__python3} setup.py \
80         build \
81                 --build-base build-3 \
82         install \
83                 --optimize=2 \
84                 --root=$RPM_BUILD_ROOT
85 %endif
86
87 %clean
88 rm -rf $RPM_BUILD_ROOT
89
90 %if %{with python2}
91 %files
92 %defattr(644,root,root,755)
93 %doc README.txt documentation.py
94 %{py_sitescriptdir}/decorator.py[co]
95 %{py_sitescriptdir}/decorator-%{version}-py*.egg-info
96 %endif
97
98 %if %{with python3}
99 %files -n python3-%{module}
100 %defattr(644,root,root,755)
101 %doc README.txt documentation.py
102 %{py3_sitescriptdir}/decorator.py
103 %{py3_sitescriptdir}/__pycache__/decorator.*.py[co]
104 %{py3_sitescriptdir}/decorator-%{version}-py*.egg-info
105 %endif
This page took 0.07684 seconds and 4 git commands to generate.