]> git.pld-linux.org Git - packages/python3-zipp.git/blob - python-zipp.spec
- updated to 1.2.0
[packages/python3-zipp.git] / python-zipp.spec
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
8 Summary:        pathlib-compatible Zipfile object wrapper
9 Summary(pl.UTF-8):      Obiektowe obudowanie Zipfile zgodne z pathlib
10 Name:           python-zipp
11 # keep 1.x here for python2 support
12 Version:        1.2.0
13 Release:        1
14 License:        MIT
15 Group:          Libraries/Python
16 #Source0Download: https://pypi.org/simple/zipp/
17 Source0:        https://files.pythonhosted.org/packages/source/z/zipp/zipp-%{version}.tar.gz
18 # Source0-md5:  c25d36db01d011eb2067c722cbd56279
19 URL:            https://pypi.org/project/zipp/
20 %if %{with python2}
21 BuildRequires:  python-modules >= 1:2.7
22 BuildRequires:  python-setuptools >= 1:31.0.1
23 BuildRequires:  python-setuptools_scm >= 1.15.0
24 %if %{with tests}
25 BuildRequires:  python-contextlib2
26 BuildRequires:  python-func_timeout
27 BuildRequires:  python-jaraco.itertools
28 BuildRequires:  python-linecache2
29 BuildRequires:  python-pathlib2
30 BuildRequires:  python-traceback2
31 BuildRequires:  python-unittest2
32 %endif
33 %endif
34 %if %{with python3}
35 BuildRequires:  python3-modules >= 1:3.2
36 BuildRequires:  python3-setuptools >= 1:31.0.1
37 BuildRequires:  python3-setuptools_scm >= 1.15.0
38 %if %{with tests}
39 BuildRequires:  python3-func_timeout
40 BuildRequires:  python3-jaraco.itertools
41 %endif
42 %endif
43 BuildRequires:  rpm-pythonprov
44 BuildRequires:  rpmbuild(macros) >= 1.714
45 %if %{with doc}
46 BuildRequires:  python-jaraco.packaging >= 3.2
47 BuildRequires:  python-rst.linker >= 1.9
48 BuildRequires:  sphinx-pdg-2
49 %endif
50 Requires:       python-modules >= 1:2.7
51 BuildArch:      noarch
52 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
53
54 %description
55 pathlib-compatible Zipfile object wrapper - backport from Python 3.8
56 zipfile module.
57
58 %description -l pl.UTF-8
59 Obiektowe obudowanie Zipfile zgodne z pathlib - backport z modułu
60 zipfile Pythona 3.8.
61
62 %package -n python3-zipp
63 Summary:        pathlib-compatible Zipfile object wrapper
64 Summary(pl.UTF-8):      Obiektowe obudowanie Zipfile zgodne z pathlib
65 Group:          Libraries/Python
66 Requires:       python3-modules >= 1:3.2
67
68 %description -n python3-zipp
69 pathlib-compatible Zipfile object wrapper - backport from Python 3.8
70 zipfile module.
71
72 %description -n python3-zipp -l pl.UTF-8
73 Obiektowe obudowanie Zipfile zgodne z pathlib - backport z modułu
74 zipfile Pythona 3.8.
75
76 %package apidocs
77 Summary:        API documentation for Python zipp module
78 Summary(pl.UTF-8):      Dokumentacja API modułu Pythona zipp
79 Group:          Documentation
80
81 %description apidocs
82 API documentation for Python zipp module.
83
84 %description apidocs -l pl.UTF-8
85 Dokumentacja API modułu Pythona zipp.
86
87 %prep
88 %setup -q -n zipp-%{version}
89
90 %build
91 %if %{with python2}
92 %py_build
93
94 %if %{with tests}
95 %{__python} -m unittest test_zipp
96 %endif
97 %endif
98
99 %if %{with python3}
100 %py3_build
101
102 %if %{with tests}
103 %{__python3} -m unittest test_zipp
104 %endif
105 %endif
106
107 %if %{with doc}
108 sphinx-build-2 -b html docs docs/_build/html
109 %endif
110
111 %install
112 rm -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
125 rm -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.097296 seconds and 3 git commands to generate.