]> git.pld-linux.org Git - packages/python-wheel.git/blob - python-wheel.spec
- release 2 (by relup.sh)
[packages/python-wheel.git] / python-wheel.spec
1 #
2 # Conditional build:
3 %bcond_with     tests   # unit tests [broken with "--build-base"]
4 %bcond_without  python2 # CPython 2.x module
5 %bcond_without  python3 # CPython 3.x module
6
7 %define         module  wheel
8 Summary:        A built-package format for Python
9 Summary(pl.UTF-8):      Format zbudowanych pakietów dla Pythona
10 Name:           python-%{module}
11 Version:        0.34.2
12 Release:        2
13 License:        MIT
14 Group:          Libraries/Python
15 #Source0Download: https://pypi.python.org/simple/wheel/
16 Source0:        https://pypi.python.org/packages/source/w/wheel/%{module}-%{version}.tar.gz
17 # Source0-md5:  ce2a27f99c130a927237b5da1ff5ceaf
18 URL:            https://bitbucket.org/pypa/wheel
19 %if %{with python2}
20 BuildRequires:  python-devel >= 1:2.6
21 BuildRequires:  python-setuptools
22 %if %{with tests}
23 %if "%{py_ver}" < "2.7"
24 BuildRequires:  python-argparse
25 BuildRequires:  python-importlib
26 %endif
27 BuildRequires:  python-coverage
28 BuildRequires:  python-jsonschema
29 BuildRequires:  python-keyring
30 BuildRequires:  python-pytest
31 BuildRequires:  python-pytest-cov
32 BuildRequires:  python-pyxdg
33 %endif
34 %endif
35 %if %{with python3}
36 BuildRequires:  python3-devel >= 1:3.2
37 BuildRequires:  python3-setuptools
38 %if %{with tests}
39 BuildRequires:  python3-coverage
40 BuildRequires:  python3-jsonschema
41 BuildRequires:  python3-keyring
42 BuildRequires:  python3-pytest
43 BuildRequires:  python3-pytest-cov
44 BuildRequires:  python3-pyxdg
45 %endif
46 %endif
47 BuildRequires:  rpm-pythonprov
48 BuildRequires:  rpmbuild(macros) >= 1.714
49 BuildArch:      noarch
50 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51
52 %description
53 A built-package format for Python.
54
55 A wheel is a ZIP-format archive with a specially formatted filename
56 and the .whl extension. It is designed to contain all the files for a
57 PEP 376 compatible install in a way that is very close to the on-disk
58 format.
59
60 %description -l pl.UTF-8
61 Format zbudowanych pakietów dla Pythona.
62
63 "wheel" to archiwum w formacie ZIP ze specjalnie sformatowaną nazwą
64 pliku oraz rozszerzeniem ".whl". Jest zaprojektowane, aby zawierało
65 wszystkie pliki instalacji zgodnej z PEP 376 w sposób bardzo zbliżony
66 do formatu na dysku.
67
68 %package -n python3-%{module}
69 Summary:        A built-package format for Python
70 Summary(pl.UTF-8):      Format zbudowanych pakietów dla Pythona
71 Group:          Libraries/Python
72
73 %description -n python3-%{module}
74 A built-package format for Python.
75
76 A wheel is a ZIP-format archive with a specially formatted filename
77 and the .whl extension. It is designed to contain all the files for a
78 PEP 376 compatible install in a way that is very close to the on-disk
79 format.
80
81 %description -n python3-%{module} -l pl.UTF-8
82 Format zbudowanych pakietów dla Pythona.
83
84 "wheel" to archiwum w formacie ZIP ze specjalnie sformatowaną nazwą
85 pliku oraz rozszerzeniem ".whl". Jest zaprojektowane, aby zawierało
86 wszystkie pliki instalacji zgodnej z PEP 376 w sposób bardzo zbliżony
87 do formatu na dysku.
88
89 %prep
90 %setup -q -n %{module}-%{version}
91
92 %build
93 %if %{with python2}
94 %py_build
95
96 %if %{with tests}
97 PYTHONPATH=build-2/lib %{__python} -m pytest --ignore build -k 'not test_keygen'
98 %endif
99 %endif
100
101 %if %{with python3}
102 %py3_build
103
104 %if %{with tests}
105 PYTHONPATH=build-3/lib %{__python3} -m pytest --ignore build
106 %endif
107 %endif
108
109 %clean
110 rm -rf $RPM_BUILD_ROOT
111
112 %install
113 rm -rf $RPM_BUILD_ROOT
114 %if %{with python3}
115 %py3_install
116 %{__mv} $RPM_BUILD_ROOT%{_bindir}/wheel{,-3}
117 %endif
118
119 %if %{with python2}
120 %py_install
121 %{__mv} $RPM_BUILD_ROOT%{_bindir}/wheel{,-2}
122 ln -sf wheel-2 $RPM_BUILD_ROOT%{_bindir}/wheel
123
124 %py_postclean
125 %endif
126
127 %if %{with python2}
128 %files
129 %defattr(644,root,root,755)
130 %doc LICENSE.txt README.rst
131 %attr(755,root,root) %{_bindir}/wheel
132 %attr(755,root,root) %{_bindir}/wheel-2
133 %{py_sitescriptdir}/wheel
134 %{py_sitescriptdir}/wheel-%{version}-py*.egg-info
135 %endif
136
137 %if %{with python3}
138 %files -n python3-%{module}
139 %defattr(644,root,root,755)
140 %doc LICENSE.txt README.rst
141 %attr(755,root,root) %{_bindir}/wheel-3
142 %{py3_sitescriptdir}/wheel
143 %{py3_sitescriptdir}/wheel-%{version}-py*.egg-info
144 %endif
This page took 0.106308 seconds and 3 git commands to generate.