Drop python2 subpackage
Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
This commit is contained in:
		
							parent
							
								
									06c9153c98
								
							
						
					
					
						commit
						9e4dd3841e
					
				| @ -1,99 +1,69 @@ | ||||
| %global modname appdirs | ||||
| %global build_wheel 1 | ||||
| %global srcname appdirs | ||||
| %bcond_without wheel | ||||
| %global wheelname %{srcname}-%{version}-py2.py3-none-any.whl | ||||
| 
 | ||||
| %global python2_wheelname %{modname}-%{version}-py2.py3-none-any.whl | ||||
| %global python3_wheelname %python2_wheelname | ||||
| 
 | ||||
| Name:          python-%{modname} | ||||
| Name:          python-%{srcname} | ||||
| Version:       1.4.3 | ||||
| Release:       5%{?dist} | ||||
| Release:       6%{?dist} | ||||
| Summary:       Python module for determining platform-specific directories | ||||
| 
 | ||||
| License:       MIT | ||||
| URL:           https://github.com/ActiveState/appdirs | ||||
| Source0:       https://files.pythonhosted.org/packages/source/a/%{modname}/%{modname}-%{version}.tar.gz | ||||
| Source0:       %{pypi_source} | ||||
| 
 | ||||
| BuildArch:      noarch | ||||
| BuildArch:     noarch | ||||
| 
 | ||||
| %description | ||||
| A small Python module for determining appropriate " + " platform-specific | ||||
| directories, e.g. a "user data dir". | ||||
| 
 | ||||
| %package -n python2-%{modname} | ||||
| Summary:       Python 2 module for determining platform-specific directoriess | ||||
| %{?python_provide:%python_provide python2-%{modname}} | ||||
| BuildRequires:  python2-devel | ||||
| BuildRequires:  python2-setuptools | ||||
| %if 0%{?build_wheel} | ||||
| BuildRequires:  python2-pip | ||||
| BuildRequires:  python2-wheel | ||||
| %endif | ||||
| 
 | ||||
| %description -n python2-%{modname} | ||||
| A small Python 2 module for determining appropriate " + " platform-specific | ||||
| directories, e.g. a "user data dir". | ||||
| 
 | ||||
| %package -n python3-%{modname} | ||||
| Summary:       Python 3 module for determining platform-specific directoriess | ||||
| %{?python_provide:%python_provide python3-%{modname}} | ||||
| %package -n python3-%{srcname} | ||||
| Summary:        %{summary} | ||||
| %{?python_provide:%python_provide python3-%{srcname}} | ||||
| BuildRequires:  python3-devel | ||||
| BuildRequires:  python3-setuptools | ||||
| %if 0%{?build_wheel} | ||||
| %if %{with wheel} | ||||
| BuildRequires:  python3-pip | ||||
| BuildRequires:  python3-wheel | ||||
| %endif | ||||
| 
 | ||||
| %description -n python3-%{modname} | ||||
| %description -n python3-%{srcname} | ||||
| A small Python 3 module for determining appropriate " + " platform-specific | ||||
| directories, e.g. a "user data dir". | ||||
| 
 | ||||
| %prep | ||||
| %autosetup -n %{modname}-%{version} | ||||
| rm -rf %{modname}.egg-info | ||||
| %autosetup -n %{srcname}-%{version} | ||||
| rm -vrf %{srcname}.egg-info | ||||
| 
 | ||||
| %build | ||||
| %if 0%{?build_wheel} | ||||
| %py2_build_wheel | ||||
| %if %{with wheel} | ||||
|   %py3_build_wheel | ||||
| %else | ||||
| %py2_build | ||||
| %endif | ||||
| %if 0%{?build_wheel} | ||||
| %py3_build_wheel | ||||
| %else | ||||
| %py3_build | ||||
|   %py3_build | ||||
| %endif | ||||
| 
 | ||||
| %install | ||||
| %if 0%{?build_wheel} | ||||
| %py2_install_wheel %{python2_wheelname} | ||||
| %if %{with wheel} | ||||
|   %py3_install_wheel %{wheelname} | ||||
| %else | ||||
| %py2_install | ||||
| %endif | ||||
| %if 0%{?build_wheel} | ||||
| %py3_install_wheel %{python3_wheelname} | ||||
| %else | ||||
| %py3_install | ||||
|   %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 | ||||
| sed -i -e '1{\@^#!/usr/bin/env python@d}' %{buildroot}%{python3_sitelib}/%{srcname}.py | ||||
| 
 | ||||
| %check | ||||
| %{__python2} setup.py test | ||||
| %{__python3} setup.py test | ||||
| 
 | ||||
| %files -n python2-%{modname} | ||||
| %files -n python3-%{srcname} | ||||
| %license LICENSE.txt | ||||
| %doc README.rst CHANGES.rst | ||||
| %{python2_sitelib}/%{modname}* | ||||
| 
 | ||||
| %files -n python3-%{modname} | ||||
| %license LICENSE.txt | ||||
| %doc README.rst CHANGES.rst | ||||
| %{python3_sitelib}/%{modname}* | ||||
| %{python3_sitelib}/__pycache__/%{modname}.* | ||||
| %{python3_sitelib}/%{srcname}* | ||||
| %{python3_sitelib}/__pycache__/%{srcname}.* | ||||
| 
 | ||||
| %changelog | ||||
| * Sun Aug 12 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 1.4.3-6 | ||||
| - Drop python2 subpackage | ||||
| 
 | ||||
| * Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 1.4.3-5 | ||||
| - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild | ||||
| 
 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user