| 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 |
|
|---|
| 12 | Name: python-%{modname}
|
|---|
| 13 | Version: 1.10.0
|
|---|
| 14 | Release: 1%{?dist}
|
|---|
| 15 | Summary: Python 2 and 3 compatibility utilities
|
|---|
| 16 |
|
|---|
| 17 | Group: Development/Languages
|
|---|
| 18 | License: MIT
|
|---|
| 19 | URL: https://pypi.python.org/pypi/six
|
|---|
| 20 | Vendor: bww bitwise works GmbH
|
|---|
| 21 | Source0: https://files.pythonhosted.org/packages/source/%(n=%{modname}; echo ${n:0:1})/%{modname}/%{modname}-%{version}.tar.gz
|
|---|
| 22 |
|
|---|
| 23 | BuildArch: noarch
|
|---|
| 24 |
|
|---|
| 25 | %global _description \
|
|---|
| 26 | %%{name} provides simple utilities for wrapping over differences between\
|
|---|
| 27 | Python 2 and Python 3.
|
|---|
| 28 |
|
|---|
| 29 |
|
|---|
| 30 | %description %{_description}
|
|---|
| 31 |
|
|---|
| 32 | %package -n python2-%{modname}
|
|---|
| 33 | Summary: %{summary}
|
|---|
| 34 | BuildRequires: python2-devel
|
|---|
| 35 | #BuildRequires: python2-setuptools
|
|---|
| 36 | # Testing
|
|---|
| 37 | #BuildRequires: python2-pytest
|
|---|
| 38 | #BuildRequires: tkinter
|
|---|
| 39 | Provides: python-six = %{version}-%{release}
|
|---|
| 40 |
|
|---|
| 41 | %description -n python2-%{modname} %{_description}
|
|---|
| 42 |
|
|---|
| 43 | Python 2 version.
|
|---|
| 44 |
|
|---|
| 45 | %if 0%{?with_python3}
|
|---|
| 46 | %package -n python3-%{modname}
|
|---|
| 47 | Summary: %{summary}
|
|---|
| 48 | %{?system_python_abi}
|
|---|
| 49 | %{?python_provide:%python_provide python3-%{modname}}
|
|---|
| 50 | BuildRequires: python3-devel
|
|---|
| 51 | BuildRequires: python3-setuptools
|
|---|
| 52 | # Testing
|
|---|
| 53 | BuildRequires: python3-pytest
|
|---|
| 54 | BuildRequires: python3-tkinter
|
|---|
| 55 |
|
|---|
| 56 | %description -n python3-%{modname} %{_description}
|
|---|
| 57 |
|
|---|
| 58 | Python 3 version.
|
|---|
| 59 | %endif
|
|---|
| 60 |
|
|---|
| 61 | %prep
|
|---|
| 62 | %setup -q -n six-%{version}
|
|---|
| 63 |
|
|---|
| 64 | %build
|
|---|
| 65 | CFLAGS="%{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}
|
|---|
| 83 | py.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.
|
|---|