]> git.pld-linux.org Git - packages/python-zipp.git/blob - python-zipp.spec
83f5b08b221eef2fb7b7632b298540db3d388ead
[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:        0.6.0
12 Release:        2
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:  d4451a749d8a7c3c392a9edd1864a937
18 URL:            https://pypi.org/project/zipp/
19 %if %{with python2}
20 BuildRequires:  python-modules >= 1:2.7
21 BuildRequires:  python-setuptools >= 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 >= 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:  python-jaraco.packaging >= 3.2
44 BuildRequires:  python-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 %{?with_tests:test}
90 %endif
91
92 %if %{with python3}
93 %py3_build %{?with_tests:test}
94 %endif
95
96 %if %{with doc}
97 sphinx-build-3 -b html docs docs/_build/html
98 %endif
99
100 %install
101 rm -rf $RPM_BUILD_ROOT
102
103 %if %{with python2}
104 %py_install
105
106 %py_postclean
107 %endif
108
109 %if %{with python3}
110 %py3_install
111 %endif
112
113 %clean
114 rm -rf $RPM_BUILD_ROOT
115
116 %if %{with python2}
117 %files
118 %defattr(644,root,root,755)
119 %doc CHANGES.rst LICENSE README.rst
120 %{py_sitescriptdir}/zipp.py[co]
121 %{py_sitescriptdir}/zipp-%{version}-py*.egg-info
122 %endif
123
124 %if %{with python3}
125 %files -n python3-zipp
126 %defattr(644,root,root,755)
127 %doc CHANGES.rst LICENSE README.rst
128 %{py3_sitescriptdir}/zipp.py
129 %{py3_sitescriptdir}/__pycache__/zipp.cpython-*.py[co]
130 %{py3_sitescriptdir}/zipp-%{version}-py*.egg-info
131 %endif
132
133 %if %{with doc}
134 %files apidocs
135 %defattr(644,root,root,755)
136 %doc docs/_build/html/{_static,*.html,*.js}
137 %endif
This page took 0.090152 seconds and 2 git commands to generate.