[1038] | 1 | ### remark: as soon as setuptools is done, enable it here also !!!
|
---|
| 2 |
|
---|
| 3 | %global modname appdirs
|
---|
| 4 | %global build_wheel 0
|
---|
| 5 | %global with_python3 0
|
---|
| 6 | %global with_test 0
|
---|
| 7 |
|
---|
| 8 | %global python2_wheelname %{modname}-%{version}-py2.py3-none-any.whl
|
---|
| 9 | %global python3_wheelname %python2_wheelname
|
---|
| 10 |
|
---|
| 11 | Name: python-%{modname}
|
---|
[1100] | 12 | Version: 1.4.3
|
---|
[1038] | 13 | Release: 1%{?dist}
|
---|
| 14 | Summary: Python module for determining platform-specific directories
|
---|
| 15 |
|
---|
| 16 | License: MIT
|
---|
| 17 | URL: http://github.com/ActiveState/appdirs
|
---|
| 18 | Vendor: bww bitwise works GmbH
|
---|
[1100] | 19 | %scm_source github https://github.com/bitwiseworks/%{modname}-os2 %{version}-os2
|
---|
[1038] | 20 |
|
---|
| 21 | BuildRequires: python2-devel
|
---|
| 22 | #BuildRequires: python-setuptools
|
---|
| 23 | %if 0%{?with_python3}
|
---|
| 24 | BuildRequires: python3-devel python3-setuptools
|
---|
| 25 | %endif
|
---|
| 26 | BuildArch: noarch
|
---|
| 27 |
|
---|
| 28 | %if 0%{?build_wheel}
|
---|
| 29 | BuildRequires: python2-pip
|
---|
| 30 | BuildRequires: python-wheel
|
---|
| 31 | BuildRequires: python%{python3_pkgversion}-pip
|
---|
| 32 | BuildRequires: python%{python3_pkgversion}-wheel
|
---|
| 33 | %endif
|
---|
| 34 |
|
---|
| 35 | %description
|
---|
| 36 | A small Python module for determining appropriate " + " platform-specific
|
---|
| 37 | directories, e.g. a "user data dir".
|
---|
| 38 |
|
---|
| 39 | %package -n python2-%{modname}
|
---|
| 40 | Summary: Python 2 module for determining platform-specific directoriess
|
---|
| 41 | %{?python_provide:%python_provide python2-%{modname}}
|
---|
| 42 |
|
---|
| 43 | %description -n python2-%{modname}
|
---|
| 44 | A small Python 2 module for determining appropriate " + " platform-specific
|
---|
| 45 | directories, e.g. a "user data dir".
|
---|
| 46 |
|
---|
| 47 | %if 0%{?with_python3}
|
---|
| 48 | %package -n python3-%{modname}
|
---|
| 49 | Summary: Python 3 module for determining platform-specific directoriess
|
---|
| 50 | %{?python_provide:%python_provide python3-%{modname}}
|
---|
| 51 |
|
---|
| 52 | %description -n python3-%{modname}
|
---|
| 53 | A small Python 3 module for determining appropriate " + " platform-specific
|
---|
| 54 | directories, e.g. a "user data dir".
|
---|
| 55 | %endif
|
---|
| 56 |
|
---|
| 57 | %prep
|
---|
| 58 | %scm_setup
|
---|
| 59 | rm -rf %{modname}.egg-info
|
---|
| 60 |
|
---|
| 61 | %build
|
---|
| 62 | %if 0%{?build_wheel}
|
---|
| 63 | %py2_build_wheel
|
---|
| 64 | %else
|
---|
| 65 | %py2_build
|
---|
| 66 | %endif
|
---|
| 67 | %if 0%{?with_python3}
|
---|
| 68 | %if 0%{?build_wheel}
|
---|
| 69 | %py3_build_wheel
|
---|
| 70 | %else
|
---|
| 71 | %py3_build
|
---|
| 72 | %endif
|
---|
| 73 | %endif
|
---|
| 74 |
|
---|
| 75 | %install
|
---|
| 76 | %if 0%{?build_wheel}
|
---|
| 77 | %py2_install_wheel %{python2_wheelname}
|
---|
| 78 | %else
|
---|
| 79 | %py2_install
|
---|
| 80 | %endif
|
---|
| 81 | %if 0%{?with_python3}
|
---|
| 82 | %if 0%{?build_wheel}
|
---|
| 83 | %py3_install_wheel %{python3_wheelname}
|
---|
| 84 | %else
|
---|
| 85 | %py3_install
|
---|
| 86 | %endif
|
---|
| 87 | %endif
|
---|
| 88 |
|
---|
| 89 | sed -i -e '1{\@^#!/usr/bin/env python@d}' %{buildroot}%{python2_sitelib}/%{modname}.py
|
---|
| 90 | %if 0%{?with_python3}
|
---|
| 91 | sed -i -e '1{\@^#!/usr/bin/env python@d}' %{buildroot}%{python3_sitelib}/%{modname}.py
|
---|
| 92 | %endif
|
---|
| 93 |
|
---|
| 94 | %check
|
---|
| 95 | %if 0%{?with_test}
|
---|
| 96 | %{__python2} setup.py test
|
---|
| 97 | %if 0%{?with_python3}
|
---|
| 98 | %{__python3} setup.py test
|
---|
| 99 | %endif
|
---|
| 100 | %endif
|
---|
| 101 |
|
---|
| 102 | %files -n python2-%{modname}
|
---|
| 103 | %license LICENSE.txt
|
---|
| 104 | %doc README.rst CHANGES.rst
|
---|
| 105 | %{python2_sitelib}/%{modname}*
|
---|
| 106 |
|
---|
| 107 | %if 0%{?with_python3}
|
---|
| 108 | %files -n python3-%{modname}
|
---|
| 109 | %license LICENSE.txt
|
---|
| 110 | %doc README.rst CHANGES.rst
|
---|
| 111 | %{python3_sitelib}/%{modname}*
|
---|
| 112 | %{python3_sitelib}/__pycache__/%{modname}.*
|
---|
| 113 | %endif
|
---|
| 114 |
|
---|
| 115 | %changelog
|
---|
[1100] | 116 | * Thu Apr 13 2017 Silvan Scherrer <silvan.scherrer@aroa.ch> 1.4.3-1
|
---|
| 117 | - update to version 1.4.3
|
---|
| 118 | - moved source to github
|
---|
| 119 |
|
---|
[1038] | 120 | * Mon Feb 27 2017 Silvan Scherrer <silvan.scherrer@aroa.ch> 1.4.0-1
|
---|
[1100] | 121 | - first rpm version (internal version only)
|
---|