Add platform-python package
This commit is contained in:
parent
0cfa8adf32
commit
f81b0b5401
@ -1,11 +1,14 @@
|
||||
%global modname iniparse
|
||||
%bcond_without python2
|
||||
%bcond_without python3
|
||||
%bcond_without platform_python
|
||||
|
||||
# Use the same directory of the main package for subpackage licence and docs
|
||||
%global _docdir_fmt %{name}
|
||||
|
||||
Name: python-%{modname}
|
||||
Version: 0.4
|
||||
Release: 25%{?dist}
|
||||
Release: 26%{?dist}
|
||||
Summary: Python Module for Accessing and Modifying Configuration Data in INI files
|
||||
License: MIT and Python
|
||||
URL: http://code.google.com/p/iniparse/
|
||||
@ -29,6 +32,7 @@ use.
|
||||
|
||||
%description %{_description}
|
||||
|
||||
%if %{with python2}
|
||||
%package -n python2-%{modname}
|
||||
Summary: Python 2 Module for Accessing and Modifying Configuration Data in INI files
|
||||
%{?python_provide:%python_provide python2-%{modname}}
|
||||
@ -41,10 +45,11 @@ Requires: python2-six
|
||||
%description -n python2-%{modname} %{_description}
|
||||
|
||||
Python 2 version.
|
||||
%endif
|
||||
|
||||
%if %{with python3}
|
||||
%package -n python3-%{modname}
|
||||
Summary: %{summary}
|
||||
%{?system_python_abi}
|
||||
%{?python_provide:%python_provide python3-%{modname}}
|
||||
BuildRequires: python3-devel
|
||||
BuildRequires: python3-setuptools
|
||||
@ -55,6 +60,22 @@ Requires: python3-six
|
||||
%description -n python3-%{modname} %{_description}
|
||||
|
||||
Python 3 version.
|
||||
%endif
|
||||
|
||||
%if %{with platform_python}
|
||||
%package -n platform-python-%{modname}
|
||||
Summary: %{summary}
|
||||
BuildRequires: platform-python-devel
|
||||
BuildRequires: platform-python-setuptools
|
||||
BuildRequires: platform-python-six
|
||||
BuildRequires: platform-python-test
|
||||
Requires: platform-python-six
|
||||
|
||||
%description -n platform-python-%{modname} %{_description}
|
||||
|
||||
Platform Python version.
|
||||
%endif
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n %{modname}-%{version}
|
||||
@ -64,33 +85,78 @@ Python 3 version.
|
||||
chmod -c -x html/index.html
|
||||
|
||||
%build
|
||||
%if %{with python2}
|
||||
%py2_build
|
||||
%endif
|
||||
|
||||
%if %{with python3}
|
||||
%py3_build
|
||||
%endif
|
||||
|
||||
%if %{with platform_python}
|
||||
%platform_py_build
|
||||
%endif
|
||||
|
||||
%install
|
||||
%if %{with python2}
|
||||
%py2_install
|
||||
%endif
|
||||
|
||||
%if %{with python3}
|
||||
%py3_install
|
||||
%endif
|
||||
|
||||
%if %{with platform_python}
|
||||
%platform_py_install
|
||||
%endif
|
||||
|
||||
|
||||
rm -vfr %{buildroot}%{_docdir}/*
|
||||
|
||||
%check
|
||||
%if %{with python2}
|
||||
%{__python2} runtests.py
|
||||
%{__python3} runtests.py
|
||||
%endif
|
||||
|
||||
%if %{with python3}
|
||||
%{__python3} runtests.py
|
||||
%endif
|
||||
|
||||
%if %{with platform_python}
|
||||
%{__platform_python} runtests.py
|
||||
%endif
|
||||
|
||||
|
||||
%if %{with python2}
|
||||
%files -n python2-%{modname}
|
||||
%license LICENSE LICENSE-PSF
|
||||
%doc README Changelog html/
|
||||
%{python2_sitelib}/%{modname}/
|
||||
%{python2_sitelib}/%{modname}-%{version}-*.egg-info
|
||||
%endif
|
||||
|
||||
%if %{with python3}
|
||||
%files -n python3-%{modname}
|
||||
%license LICENSE LICENSE-PSF
|
||||
%doc README Changelog html/
|
||||
%{python3_sitelib}/%{modname}/
|
||||
%{python3_sitelib}/%{modname}-%{version}-*.egg-info
|
||||
%endif
|
||||
|
||||
%if %{with platform_python}
|
||||
%files -n platform-python-%{modname}
|
||||
%license LICENSE LICENSE-PSF
|
||||
%doc README Changelog html/
|
||||
%{platform_python_sitelib}/%{modname}/
|
||||
%{platform_python_sitelib}/%{modname}-%{version}-*.egg-info
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Thu Aug 10 2017 Miro Hrončok <mhroncok@redhat.com> - 0.4-26
|
||||
- Add platform-python package
|
||||
- Add bconds
|
||||
- Remove %%{?system_python_abi}
|
||||
|
||||
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.4-25
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user