source: spec/trunk/SPECS/python-six.spec@ 1010

Last change on this file since 1010 was 875, checked in by Silvan Scherrer, 9 years ago

spec: python-six: Release version 1.10.0-1.

File size: 2.6 KB
Line 
1# Note: this .spec is borrowed from http://pkgs.fedoraproject.org/cgit/rpms/python-six.git/tree/python-six.spec
2# and adapted to our needs
3
4%global modname six
5
6# remove the comment below, when we have python3 support
7#global with_python3 1
8
9
10%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
11
12Name: python-%{modname}
13Version: 1.10.0
14Release: 1%{?dist}
15Summary: Python 2 and 3 compatibility utilities
16
17Group: Development/Languages
18License: MIT
19URL: https://pypi.python.org/pypi/six
20Vendor: bww bitwise works GmbH
21Source0: https://files.pythonhosted.org/packages/source/%(n=%{modname}; echo ${n:0:1})/%{modname}/%{modname}-%{version}.tar.gz
22
23BuildArch: noarch
24
25%global _description \
26%%{name} provides simple utilities for wrapping over differences between\
27Python 2 and Python 3.
28
29
30%description %{_description}
31
32%package -n python2-%{modname}
33Summary: %{summary}
34BuildRequires: python2-devel
35#BuildRequires: python2-setuptools
36# Testing
37#BuildRequires: python2-pytest
38#BuildRequires: tkinter
39Provides: python-six = %{version}-%{release}
40
41%description -n python2-%{modname} %{_description}
42
43Python 2 version.
44
45%if 0%{?with_python3}
46%package -n python3-%{modname}
47Summary: %{summary}
48%{?system_python_abi}
49%{?python_provide:%python_provide python3-%{modname}}
50BuildRequires: python3-devel
51BuildRequires: python3-setuptools
52# Testing
53BuildRequires: python3-pytest
54BuildRequires: python3-tkinter
55
56%description -n python3-%{modname} %{_description}
57
58Python 3 version.
59%endif
60
61%prep
62%setup -q -n six-%{version}
63
64%build
65CFLAGS="%{optflags}" %{__python} setup.py build
66
67%if 0%{?with_python3}
68%py3_build
69%endif
70
71%install
72%if 0%{?with_python3}
73%py3_install
74%endif
75%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
76
77
78%check
79# @todo enable once we got python-unittest
80#py.test-2 -rfsxX test_six.py
81
82%if 0%{?with_python3}
83py.test-3 -rfsxX test_six.py
84%endif
85
86
87%files -n python2-%{modname}
88%{!?_licensedir:%global license %%doc}
89%license LICENSE
90%doc README documentation/index.rst
91%{python_sitearch}/%{modname}.py*
92%{python_sitearch}/%{modname}-*.egg-info
93
94%if 0%{?with_python3}
95%files -n python3-%{modname}
96%{!?_licensedir:%global license %%doc}
97%license LICENSE
98%doc README documentation/index.rst
99%{python3_sitelib}/%{modname}-*.egg-info/
100%{python3_sitelib}/%{modname}.py
101%{python3_sitelib}/__pycache__/%{modname}.*
102%endif
103
104%changelog
105* Thu Oct 27 2016 Silvan Scherrer <silvan.scherrer@aroa.ch> 1.10.0-1
106- Initial package of version 1.10.0.
Note: See TracBrowser for help on using the repository browser.