]> git.pld-linux.org Git - packages/python-wheel.git/blame - python-wheel.spec
BR: rpmbuild(macros) >= 1.710
[packages/python-wheel.git] / python-wheel.spec
CommitLineData
9739dc1f
ER
1#
2# Conditional build:
3%bcond_with tests # do not perform "make test"
4%bcond_without python2 # CPython 2.x module
5%bcond_with python3 # CPython 3.x module
6
7%define module wheel
8Summary: A built-package format for Python
9Name: python-%{module}
10Version: 0.24.0
11Release: 0.1
12License: MIT
13Group: Libraries/Python
14Source0: https://pypi.python.org/packages/source/w/%{module}/%{module}-%{version}.tar.gz
15# Source0-md5: 3b0d66f0d127ea8befaa5d11453107fd
16URL: https://bitbucket.org/pypa/wheel
2814391e 17BuildRequires: rpmbuild(macros) >= 1.710
9739dc1f
ER
18%if %{with python2}
19BuildRequires: python-argparse
20BuildRequires: python-devel
21BuildRequires: python-jsonschema
22BuildRequires: python-keyring
23BuildRequires: python-pytest
24BuildRequires: python-setuptools
25%endif
26%if %{with python3}
27BuildRequires: python3-devel
28BuildRequires: python3-jsonschema
29BuildRequires: python3-keyring
30BuildRequires: python3-pytest
31BuildRequires: python3-setuptools
32%endif
33Requires: python-argparse
34BuildArch: noarch
35BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37%description
38A built-package format for Python.
39
40A wheel is a ZIP-format archive with a specially formatted filename
41and the .whl extension. It is designed to contain all the files for a
42PEP 376 compatible install in a way that is very close to the on-disk
43format.
44
45%package -n python3-%{module}
46Summary: A built-package format for Python
47Group: Libraries/Python
48
49%description -n python3-%{module}
50A built-package format for Python.
51
52A wheel is a ZIP-format archive with a specially formatted filename
53and the .whl extension. It is designed to contain all the files for a
54PEP 376 compatible install in a way that is very close to the on-disk
55format.
56
57This is package contains Python 3 version of the package.
58
59%prep
60%setup -q -n %{module}-%{version}
61
62# remove unneeded shebangs
63sed -ie '1d' %{module}/{egg2wheel,wininst2wheel}.py
64
9739dc1f
ER
65%build
66%if %{with python2}
afce17e6 67%py_build
9739dc1f
ER
68%endif
69
70%if %{with python3}
afce17e6 71%py3_build
9739dc1f
ER
72%endif
73
74%if %{with test}
75# remove setup.cfg that makes pytest require pytest-cov (unnecessary dep)
76rm setup.cfg
afce17e6 77PYTHONPATH=build-2/lib py.test --ignore build -k 'not test_keygen'
9739dc1f
ER
78
79# no test for Python 3, no python3-jsonschema yet
80%if %{with python3} && 0
afce17e6 81PYTHONPATH=build-3/lib py.test-%{py3_ver} --ignore build
9739dc1f
ER
82%endif
83
84%endif
85
86%clean
87rm -rf $RPM_BUILD_ROOT
88
89%install
90rm -rf $RPM_BUILD_ROOT
91%if %{with python3}
92cd py3
afce17e6 93%py3_install
9739dc1f
ER
94cd $RPM_BUILD_ROOT%{_bindir}
95 for f in $(ls); do mv $f python3-$f; done
96cd -
97
98%{__rm} -r $RPM_BUILD_ROOT%{py3_sitescriptdir}/%{module}/test
99%endif
100
101%if %{with python2}
afce17e6 102%py_install
9739dc1f
ER
103
104%{__rm} -r $RPM_BUILD_ROOT%{py_sitescriptdir}/%{module}/test
105
106%py_postclean
107%endif
108
109%if %{with python2}
110%files
111%defattr(644,root,root,755)
112%doc LICENSE.txt CHANGES.txt README.txt
113%attr(755,root,root) %{_bindir}/wheel
114%{py_sitescriptdir}/wheel
115%{py_sitescriptdir}/wheel-%{version}-py*.egg-info
116%endif
117
118%if %{with python3}
119%files -n python3-%{module}
120%defattr(644,root,root,755)
121%doc LICENSE.txt CHANGES.txt README.txt
122%attr(755,root,root) %{__python}3-wheel
123%{py3_sitescriptdir}/%{module}*
124%endif
This page took 0.122629 seconds and 4 git commands to generate.