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