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