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