Rebuild as wheel

This commit is contained in:
Charalampos Stratakis 2017-02-15 13:41:27 +01:00
parent 960e07ae14
commit 7bb99cfef2

View File

@ -1,8 +1,12 @@
%global modname appdirs
%global build_wheel 1
%global python2_wheelname %{modname}-%{version}-py2.py3-none-any.whl
%global python3_wheelname %python2_wheelname
Name: python-%{modname}
Version: 1.4.0
Release: 9%{?dist}
Release: 10%{?dist}
Summary: Python module for determining platform-specific directories
License: MIT
@ -13,6 +17,13 @@ BuildRequires: python2-devel python-setuptools
BuildRequires: python3-devel python3-setuptools
BuildArch: noarch
%if 0%{?build_wheel}
BuildRequires: python2-pip
BuildRequires: python-wheel
BuildRequires: python%{python3_pkgversion}-pip
BuildRequires: python%{python3_pkgversion}-wheel
%endif
%description
A small Python module for determining appropriate " + " platform-specific
directories, e.g. a "user data dir".
@ -38,12 +49,28 @@ directories, e.g. a "user data dir".
rm -rf %{modname}.egg-info
%build
%if 0%{?build_wheel}
%py2_build_wheel
%else
%py2_build
%endif
%if 0%{?build_wheel}
%py3_build_wheel
%else
%py3_build
%endif
%install
%if 0%{?build_wheel}
%py2_install_wheel %{python2_wheelname}
%else
%py2_install
%endif
%if 0%{?build_wheel}
%py3_install_wheel %{python3_wheelname}
%else
%py3_install
%endif
sed -i -e '1{\@^#!/usr/bin/env python@d}' %{buildroot}%{python2_sitelib}/%{modname}.py
sed -i -e '1{\@^#!/usr/bin/env python@d}' %{buildroot}%{python3_sitelib}/%{modname}.py
@ -64,6 +91,9 @@ sed -i -e '1{\@^#!/usr/bin/env python@d}' %{buildroot}%{python3_sitelib}/%{modna
%{python3_sitelib}/__pycache__/%{modname}.*
%changelog
* Mon Feb 13 2017 Charalampos Stratakis <cstratak@redhat.com> - 1.4.0-10
- Rebuild as wheel
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.0-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild