]> git.pld-linux.org Git - packages/python-extras.git/blame - python-extras.spec
automatic change: use py_build/py_install macros
[packages/python-extras.git] / python-extras.spec
CommitLineData
9cc8b867
JB
1#
2# Conditional build:
52634668 3%bcond_without tests # do not perform "make test" (use for extras/testtools pair bootstrap)
9cc8b867
JB
4%bcond_without python2 # CPython 2.x module
5%bcond_without python3 # CPython 3.x module
6
7Summary: Useful extra bits for Python - things that should be in the standard library
8Summary(pl.UTF-8): Przydatne dodatki do Pythona, które powinny być w bibliotece standardowej
9Name: python-extras
10Version: 0.0.3
f034caa2 11Release: 5
9cc8b867
JB
12License: MIT
13Group: Libraries/Python
14Source0: https://pypi.python.org/packages/source/e/extras/extras-%{version}.tar.gz
15# Source0-md5: 62d8ba049e3386a6df69b413ea81517b
9cc8b867
JB
16URL: https://github.com/testing-cabal/extras
17BuildRequires: python-distribute
18BuildRequires: rpm-pythonprov
19BuildRequires: rpmbuild(macros) >= 1.219
9cc8b867
JB
20%if %{with python3}
21BuildRequires: python3-distribute
22%endif
23%if %{with tests}
24%if %{with python2}
25BuildRequires: python-testtools
26%endif
27%if %{with python3}
28BuildRequires: python3-testtools
29%endif
30%endif
31Requires: python-modules
32BuildArch: noarch
33BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34
35%description
36extras is a set of extensions to the Python standard library,
37originally written to make the code within testtools cleaner, but now
38split out for general use outside of a testing context.
39
40%description -l pl.UTF-8
41extras to zbiór rozszerzeń biblioteki standardowej Pythona, pierwotnie
42napisany, aby uczynić kod biblioteki testtools czytelniejszym, ale
43później wydzielony do ogólnego użytku, nie tylko w kontekście testów.
44
45%package -n python3-extras
46Summary: Useful extra bits for Python - things that should be in the standard library
47Summary(pl.UTF-8): Przydatne dodatki do Pythona, które powinny być w bibliotece standardowej
48Group: Libraries/Python
49Requires: python3-modules
50
51%description -n python3-extras
52extras is a set of extensions to the Python standard library,
53originally written to make the code within testtools cleaner, but now
54split out for general use outside of a testing context.
55
56%description -n python3-extras -l pl.UTF-8
57extras to zbiór rozszerzeń biblioteki standardowej Pythona, pierwotnie
58napisany, aby uczynić kod biblioteki testtools czytelniejszym, ale
59później wydzielony do ogólnego użytku, nie tylko w kontekście testów.
60
61%prep
62%setup -q -n extras-%{version}
9cc8b867
JB
63
64%build
65%if %{with python2}
66%{__python} setup.py \
67 build --build-base build-2 \
68 %{?with_tests:test}
69%endif
70
71%if %{with python3}
72%{__python3} setup.py \
73 build --build-base build-3 \
74 %{?with_tests:test}
75%endif
76
77%install
78rm -rf $RPM_BUILD_ROOT
79
80%if %{with python2}
bcaed876 81%py_install
9cc8b867
JB
82
83%py_postclean
84%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/extras/tests
85%endif
86
87%if %{with python3}
bcaed876 88%py3_install
9cc8b867
JB
89
90%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/extras/tests
91%endif
92
93%clean
94rm -rf $RPM_BUILD_ROOT
95
96%if %{with python2}
97%files
98%defattr(644,root,root,755)
99%doc LICENSE NEWS README.rst
100%{py_sitescriptdir}/extras
101%{py_sitescriptdir}/extras-%{version}-py*.egg-info
102%endif
103
104%if %{with python3}
105%files -n python3-extras
106%defattr(644,root,root,755)
107%doc LICENSE NEWS README.rst
108%{py3_sitescriptdir}/extras
109%{py3_sitescriptdir}/extras-%{version}-py*.egg-info
110%endif
This page took 0.072344 seconds and 4 git commands to generate.