/[packages]/cauldron/python-wheel/current/SPECS/python-wheel.spec
ViewVC logotype

Annotation of /cauldron/python-wheel/current/SPECS/python-wheel.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 688422 - (hide annotations) (download)
Tue Sep 16 20:20:52 2014 UTC (9 years, 7 months ago) by umeabot
File size: 3327 byte(s)
Mageia 5 Mass Rebuild
1 philippem 617155 # Created by pyp2rpm-1.0.1
2     %define pypi_name wheel
3     %define with_python3 1
4 philippem 625218 %define run_test 0
5 philippem 617155
6     Name: python-%{pypi_name}
7 philippem 625218 Version: 0.23.0
8 umeabot 688422 Release: %mkrel 3
9 philippem 617155 Summary: A built-package format for Python
10     Group: Development/Python
11     License: MIT
12     URL: http://bitbucket.org/dholth/wheel/
13     Source0: https://pypi.python.org/packages/source/w/%{pypi_name}/%{pypi_name}-%{version}.tar.gz
14     BuildArch: noarch
15    
16     BuildRequires: python-devel
17     BuildRequires: python-setuptools
18    
19 philippem 625218 %if 0%{?run_test}
20 philippem 617155 BuildRequires: python-pytest
21     BuildRequires: python-jsonschema
22     BuildRequires: python-keyring
23 philippem 617157 BuildRequires: python-py
24 philippem 625218 %endif
25    
26 philippem 617155 %if %{?with_python3}
27     BuildRequires: python3-devel
28     BuildRequires: python3-setuptools
29 philippem 625218 %if 0%{?run_test}
30 philippem 617157 BuildRequires: python3-pytest
31     BuildRequires: python3-jsonschema
32     BuildRequires: python3-keyring
33     BuildRequires: python3-py
34 philippem 625218 %endif
35 philippem 617155 %endif # if with_python3
36    
37    
38     %description
39     A built-package format for Python.
40    
41     A wheel is a ZIP-format archive with a specially formatted filename and the
42     .whl extension. It is designed to contain all the files for a PEP 376
43     compatible install in a way that is very close to the on-disk format.
44    
45     %if 0%{?with_python3}
46     %package -n python3-%{pypi_name}
47     Summary: A built-package format for Python
48     Group: Development/Python
49    
50     %description -n python3-%{pypi_name}
51     A built-package format for Python.
52    
53     A wheel is a ZIP-format archive with a specially formatted filename and the
54     .whl extension. It is designed to contain all the files for a PEP 376
55     compatible install in a way that is very close to the on-disk format.
56    
57     This is package contains Python 3 version of the package.
58     %endif # with_python3
59    
60    
61     %prep
62     %setup -q -n %{pypi_name}-%{version}
63    
64     # header files just has to be there, even empty
65     touch %{pypi_name}/test/headers.dist/header.h
66    
67     # remove unneeded shebangs
68     sed -ie '1d' %{pypi_name}/{egg2wheel,wininst2wheel}.py
69    
70     %if 0%{?with_python3}
71     cp -a . %{py3dir}
72     %endif # with_python3
73    
74    
75     %build
76     %{__python} setup.py build
77    
78     %if 0%{?with_python3}
79     pushd %{py3dir}
80     %{__python3} setup.py build
81     popd
82     %endif # with_python3
83    
84    
85     %install
86     # Must do the subpackages' install first because the scripts in /usr/bin are
87     # overwritten with every setup.py install (and we want the python2 version
88     # to be the default for now).
89     %if 0%{?with_python3}
90     pushd %{py3dir}
91     %{__python3} setup.py install --skip-build --root %{buildroot}
92     popd
93     pushd %{buildroot}%{_bindir}
94     for f in $(ls); do mv $f python3-$f; done
95     popd
96     %endif # with_python3
97    
98     %{__python} setup.py install --skip-build --root %{buildroot}
99    
100 philippem 625218 %if 0%{?run_test}
101 philippem 617155 %check
102     # remove setup.cfg that makes pytest require pytest-cov (unnecessary dep)
103     rm setup.cfg
104     py.test --ignore build
105    
106     %if 0%{?with_python3}
107     pushd %{py3dir}
108     rm setup.cfg
109     py.test-%{python3_version} --ignore build
110     popd
111     %endif # with_python3
112 philippem 625218 %endif
113 philippem 617155
114     %files
115     %doc LICENSE.txt CHANGES.txt README.txt
116     %{_bindir}/egg2wheel
117     %{_bindir}/wheel
118     %{_bindir}/wininst2wheel
119     %{python_sitelib}/%{pypi_name}*
120     %exclude %{python_sitelib}/%{pypi_name}/test
121    
122     %if 0%{?with_python3}
123     %files -n python3-%{pypi_name}
124     %doc LICENSE.txt CHANGES.txt README.txt
125     %{_bindir}/python3-egg2wheel
126     %{_bindir}/python3-wheel
127     %{_bindir}/python3-wininst2wheel
128     %{python3_sitelib}/%{pypi_name}*
129     %exclude %{python3_sitelib}/%{pypi_name}/test
130     %endif # with_python3
131    

  ViewVC Help
Powered by ViewVC 1.1.30