source: spec/trunk/SPECS/python-appdirs.spec

Last change on this file was 1100, checked in by Silvan Scherrer, 8 years ago

spec: python-appdirs: Release version 1.4.3-1.

File size: 3.1 KB
RevLine 
[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
11Name: python-%{modname}
[1100]12Version: 1.4.3
[1038]13Release: 1%{?dist}
14Summary: Python module for determining platform-specific directories
15
16License: MIT
17URL: http://github.com/ActiveState/appdirs
18Vendor: bww bitwise works GmbH
[1100]19%scm_source github https://github.com/bitwiseworks/%{modname}-os2 %{version}-os2
[1038]20
21BuildRequires: python2-devel
22#BuildRequires: python-setuptools
23%if 0%{?with_python3}
24BuildRequires: python3-devel python3-setuptools
25%endif
26BuildArch: noarch
27
28%if 0%{?build_wheel}
29BuildRequires: python2-pip
30BuildRequires: python-wheel
31BuildRequires: python%{python3_pkgversion}-pip
32BuildRequires: python%{python3_pkgversion}-wheel
33%endif
34
35%description
36A small Python module for determining appropriate " + " platform-specific
37directories, e.g. a "user data dir".
38
39%package -n python2-%{modname}
40Summary: Python 2 module for determining platform-specific directoriess
41%{?python_provide:%python_provide python2-%{modname}}
42
43%description -n python2-%{modname}
44A small Python 2 module for determining appropriate " + " platform-specific
45directories, e.g. a "user data dir".
46
47%if 0%{?with_python3}
48%package -n python3-%{modname}
49Summary: Python 3 module for determining platform-specific directoriess
50%{?python_provide:%python_provide python3-%{modname}}
51
52%description -n python3-%{modname}
53A small Python 3 module for determining appropriate " + " platform-specific
54directories, e.g. a "user data dir".
55%endif
56
57%prep
58%scm_setup
59rm -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
89sed -i -e '1{\@^#!/usr/bin/env python@d}' %{buildroot}%{python2_sitelib}/%{modname}.py
90%if 0%{?with_python3}
91sed -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)
Note: See TracBrowser for help on using the repository browser.