]> git.pld-linux.org Git - packages/python-zipp.git/blame - python-zipp.spec
- updated to 1.2.0
[packages/python-zipp.git] / python-zipp.spec
CommitLineData
a2946a5f
JB
1#
2# Conditional build:
3%bcond_without doc # Sphinx documentation
4%bcond_without tests # unit tests
5%bcond_without python2 # CPython 2.x module
6%bcond_without python3 # CPython 3.x module
7
8Summary: pathlib-compatible Zipfile object wrapper
9Summary(pl.UTF-8): Obiektowe obudowanie Zipfile zgodne z pathlib
10Name: python-zipp
fa77fd09
JB
11# keep 1.x here for python2 support
12Version: 1.2.0
13Release: 1
a2946a5f
JB
14License: MIT
15Group: Libraries/Python
16#Source0Download: https://pypi.org/simple/zipp/
17Source0: https://files.pythonhosted.org/packages/source/z/zipp/zipp-%{version}.tar.gz
fa77fd09 18# Source0-md5: c25d36db01d011eb2067c722cbd56279
a2946a5f
JB
19URL: https://pypi.org/project/zipp/
20%if %{with python2}
21BuildRequires: python-modules >= 1:2.7
9a699eed 22BuildRequires: python-setuptools >= 1:31.0.1
a2946a5f
JB
23BuildRequires: python-setuptools_scm >= 1.15.0
24%if %{with tests}
25BuildRequires: python-contextlib2
fa77fd09
JB
26BuildRequires: python-func_timeout
27BuildRequires: python-jaraco.itertools
af20f0e6 28BuildRequires: python-linecache2
af20f0e6
MK
29BuildRequires: python-pathlib2
30BuildRequires: python-traceback2
a2946a5f
JB
31BuildRequires: python-unittest2
32%endif
33%endif
34%if %{with python3}
35BuildRequires: python3-modules >= 1:3.2
9a699eed 36BuildRequires: python3-setuptools >= 1:31.0.1
a2946a5f
JB
37BuildRequires: python3-setuptools_scm >= 1.15.0
38%if %{with tests}
fa77fd09
JB
39BuildRequires: python3-func_timeout
40BuildRequires: python3-jaraco.itertools
a2946a5f
JB
41%endif
42%endif
43BuildRequires: rpm-pythonprov
44BuildRequires: rpmbuild(macros) >= 1.714
45%if %{with doc}
fa77fd09
JB
46BuildRequires: python-jaraco.packaging >= 3.2
47BuildRequires: python-rst.linker >= 1.9
48BuildRequires: sphinx-pdg-2
a2946a5f
JB
49%endif
50Requires: python-modules >= 1:2.7
51BuildArch: noarch
52BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
53
54%description
55pathlib-compatible Zipfile object wrapper - backport from Python 3.8
56zipfile module.
57
58%description -l pl.UTF-8
59Obiektowe obudowanie Zipfile zgodne z pathlib - backport z modułu
60zipfile Pythona 3.8.
61
62%package -n python3-zipp
63Summary: pathlib-compatible Zipfile object wrapper
64Summary(pl.UTF-8): Obiektowe obudowanie Zipfile zgodne z pathlib
65Group: Libraries/Python
66Requires: python3-modules >= 1:3.2
67
68%description -n python3-zipp
69pathlib-compatible Zipfile object wrapper - backport from Python 3.8
70zipfile module.
71
72%description -n python3-zipp -l pl.UTF-8
73Obiektowe obudowanie Zipfile zgodne z pathlib - backport z modułu
74zipfile Pythona 3.8.
75
76%package apidocs
77Summary: API documentation for Python zipp module
78Summary(pl.UTF-8): Dokumentacja API modułu Pythona zipp
79Group: Documentation
80
81%description apidocs
82API documentation for Python zipp module.
83
84%description apidocs -l pl.UTF-8
85Dokumentacja API modułu Pythona zipp.
86
87%prep
88%setup -q -n zipp-%{version}
89
90%build
91%if %{with python2}
9a699eed
JB
92%py_build
93
94%if %{with tests}
95%{__python} -m unittest test_zipp
96%endif
a2946a5f
JB
97%endif
98
99%if %{with python3}
9a699eed
JB
100%py3_build
101
102%if %{with tests}
103%{__python3} -m unittest test_zipp
104%endif
a2946a5f
JB
105%endif
106
107%if %{with doc}
fa77fd09 108sphinx-build-2 -b html docs docs/_build/html
a2946a5f
JB
109%endif
110
111%install
112rm -rf $RPM_BUILD_ROOT
113
114%if %{with python2}
115%py_install
116
117%py_postclean
118%endif
119
120%if %{with python3}
121%py3_install
122%endif
123
124%clean
125rm -rf $RPM_BUILD_ROOT
126
127%if %{with python2}
128%files
129%defattr(644,root,root,755)
130%doc CHANGES.rst LICENSE README.rst
131%{py_sitescriptdir}/zipp.py[co]
132%{py_sitescriptdir}/zipp-%{version}-py*.egg-info
133%endif
134
135%if %{with python3}
136%files -n python3-zipp
137%defattr(644,root,root,755)
138%doc CHANGES.rst LICENSE README.rst
139%{py3_sitescriptdir}/zipp.py
140%{py3_sitescriptdir}/__pycache__/zipp.cpython-*.py[co]
141%{py3_sitescriptdir}/zipp-%{version}-py*.egg-info
142%endif
143
144%if %{with doc}
145%files apidocs
146%defattr(644,root,root,755)
147%doc docs/_build/html/{_static,*.html,*.js}
148%endif
This page took 0.074693 seconds and 4 git commands to generate.