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