From 9dc12c4366bcf92e1b77bb0edc49f13a347bdb7f Mon Sep 17 00:00:00 2001 From: sxt1001 Date: Wed, 18 Nov 2020 15:50:49 +0800 Subject: [PATCH] add subpackage python2-appdirs --- python-appdirs.spec | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/python-appdirs.spec b/python-appdirs.spec index a4ec650..c05c014 100644 --- a/python-appdirs.spec +++ b/python-appdirs.spec @@ -2,7 +2,7 @@ name: python-appdirs Version: 1.4.3 -Release: 9 +Release: 10 Summary: A Python module for determining platform-specific directories License: MIT @@ -15,6 +15,16 @@ BuildArch: noarch A small Python module for determining appropriate " + " platform-specific directories, e.g. a "user data dir". +%package -n python2-appdirs +Summary: A python2 module for determining platform-specific directories +%python_provide python2-appdirs +BuildRequires: python2-devel python2-setuptools +BuildRequires: python2-pip python2-wheel + +%description -n python2-appdirs +A small Python 2 module for determining appropriate " + " platform-specific directories, +e.g. a "user data dir". + %package -n python3-appdirs Summary: A python3 module for determining platform-specific directories %python_provide python3-appdirs @@ -30,24 +40,34 @@ e.g. a "user data dir". rm -vrf appdirs.egg-info %build +%py2_build_wheel %py3_build_wheel %install +%py2_install_wheel appdirs-%{version}-py2.py3-none-any.whl %py3_install_wheel appdirs-%{version}-py2.py3-none-any.whl -sed -i -e '1{\@^#!/usr/bin/env python@d}' %{buildroot}%{python3_sitelib}/appdirs.py +sed -i -e '1{\@^#!/usr/bin/env python@d}' %{buildroot}{%{python2_sitelib},%{python3_sitelib}}/appdirs.py %check %if %{with_tests} +%{__python2} setup.py test %{__python3} setup.py test %endif +%files -n python2-appdirs +%doc README.rst CHANGES.rst LICENSE.txt +%{python2_sitelib}/appdirs* + %files -n python3-appdirs %doc README.rst CHANGES.rst LICENSE.txt %{python3_sitelib}/appdirs* %{python3_sitelib}/__pycache__/appdirs.* %changelog +* Wed Nov 18 2020 shixuantong - 1.4.3-10 +- add subpackage python2-appdirs + * Wed Oct 21 2020 chengzihan - 1.4.3-9 - Remove subpackage python2-appdirs -- Gitee