Add subpackage for platform-python
This commit is contained in:
parent
1e52d21ef8
commit
b1671e93f5
@ -1,10 +1,16 @@
|
|||||||
%{!?python3_pkgversion:%global python3_pkgversion 3}
|
%{!?python3_pkgversion:%global python3_pkgversion 3}
|
||||||
|
|
||||||
|
%bcond_with tests
|
||||||
|
|
||||||
# EL7 does not have a new enough python-setuptools
|
# EL7 does not have a new enough python-setuptools
|
||||||
%if 0%{?rhel} && 0%{?rhel} <= 7
|
%if 0%{?rhel} && 0%{?rhel} <= 7
|
||||||
%global with_python2 0
|
%bcond_with python2
|
||||||
|
%bcond_with python3
|
||||||
|
%bcond_with platform_python
|
||||||
%else
|
%else
|
||||||
%global with_python2 1
|
%bcond_without python2
|
||||||
|
%bcond_without python3
|
||||||
|
%bcond_without platform_python
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%global srcname setuptools_scm
|
%global srcname setuptools_scm
|
||||||
@ -12,7 +18,7 @@
|
|||||||
|
|
||||||
Name: python-%{srcname}
|
Name: python-%{srcname}
|
||||||
Version: 1.15.6
|
Version: 1.15.6
|
||||||
Release: 2%{?dist}
|
Release: 3%{?dist}
|
||||||
Summary: %{sum}
|
Summary: %{sum}
|
||||||
|
|
||||||
License: MIT
|
License: MIT
|
||||||
@ -20,18 +26,39 @@ URL: https://pypi.python.org/pypi/%{srcname}
|
|||||||
Source0: https://files.pythonhosted.org/packages/source/s/%{srcname}/%{srcname}-%{version}.tar.gz
|
Source0: https://files.pythonhosted.org/packages/source/s/%{srcname}/%{srcname}-%{version}.tar.gz
|
||||||
|
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
%if %{with python2}
|
||||||
BuildRequires: python2-devel
|
BuildRequires: python2-devel
|
||||||
|
BuildRequires: python2-setuptools
|
||||||
|
%endif
|
||||||
|
%if %{with python3}
|
||||||
BuildRequires: python%{python3_pkgversion}-devel
|
BuildRequires: python%{python3_pkgversion}-devel
|
||||||
BuildRequires: pytest
|
BuildRequires: python%{python3_pkgversion}-setuptools
|
||||||
BuildRequires: python%{python3_pkgversion}-pytest
|
%endif
|
||||||
|
%if %{with platform_python}
|
||||||
|
BuildRequires: platform-python-devel
|
||||||
|
BuildRequires: platform-python-setuptools
|
||||||
|
%endif
|
||||||
|
|
||||||
# For tests
|
# For tests
|
||||||
|
%if %{with tests}
|
||||||
|
%if %{with python2}
|
||||||
|
BuildRequires: pytest
|
||||||
|
%endif
|
||||||
|
%if %{with python3}
|
||||||
|
BuildRequires: python%{python3_pkgversion}-pytest
|
||||||
|
%endif
|
||||||
|
%if %{with platform_python}
|
||||||
|
BuildRequires: platform-python-pytest
|
||||||
|
%endif
|
||||||
BuildRequires: git-core
|
BuildRequires: git-core
|
||||||
BuildRequires: mercurial
|
BuildRequires: mercurial
|
||||||
|
%endif
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Setuptools_scm handles managing your python package versions in scm metadata.
|
Setuptools_scm handles managing your python package versions in scm metadata.
|
||||||
It also handles file finders for the suppertes scms.
|
It also handles file finders for the suppertes scms.
|
||||||
|
|
||||||
|
%if %{with python2}
|
||||||
%package -n python2-%{srcname}
|
%package -n python2-%{srcname}
|
||||||
Summary: %{sum}
|
Summary: %{sum}
|
||||||
%{?python_provide:%python_provide python2-%{srcname}}
|
%{?python_provide:%python_provide python2-%{srcname}}
|
||||||
@ -39,8 +66,9 @@ Summary: %{sum}
|
|||||||
%description -n python2-%{srcname}
|
%description -n python2-%{srcname}
|
||||||
Setuptools_scm handles managing your python package versions in scm metadata.
|
Setuptools_scm handles managing your python package versions in scm metadata.
|
||||||
It also handles file finders for the suppertes scms.
|
It also handles file finders for the suppertes scms.
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with python3}
|
||||||
%package -n python%{python3_pkgversion}-%{srcname}
|
%package -n python%{python3_pkgversion}-%{srcname}
|
||||||
Summary: %{sum}
|
Summary: %{sum}
|
||||||
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
|
%{?python_provide:%python_provide python%{python3_pkgversion}-%{srcname}}
|
||||||
@ -48,44 +76,84 @@ Summary: %{sum}
|
|||||||
%description -n python%{python3_pkgversion}-%{srcname}
|
%description -n python%{python3_pkgversion}-%{srcname}
|
||||||
Setuptools_scm handles managing your python package versions in scm metadata.
|
Setuptools_scm handles managing your python package versions in scm metadata.
|
||||||
It also handles file finders for the suppertes scms.
|
It also handles file finders for the suppertes scms.
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with platform_python}
|
||||||
|
%package -n platform-python-%{srcname}
|
||||||
|
Summary: %{sum}
|
||||||
|
|
||||||
|
%description -n platform-python-%{srcname}
|
||||||
|
Setuptools_scm handles managing your python package versions in scm metadata.
|
||||||
|
It also handles file finders for the suppertes scms.
|
||||||
|
%endif
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%autosetup -n %{srcname}-%{version}
|
%autosetup -n %{srcname}-%{version}
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%if 0%{?with_python2}
|
%if %{with python2}
|
||||||
%py2_build
|
%py2_build
|
||||||
%endif
|
%endif
|
||||||
|
%if %{with python3}
|
||||||
%py3_build
|
%py3_build
|
||||||
|
%endif
|
||||||
|
%if %{with platform_python}
|
||||||
|
%platform_py_build
|
||||||
|
%endif # with platform_python
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%if 0%{?with_python2}
|
%if %{with python2}
|
||||||
%py2_install
|
%py2_install
|
||||||
%endif
|
%endif
|
||||||
|
%if %{with python3}
|
||||||
%py3_install
|
%py3_install
|
||||||
|
%endif
|
||||||
|
%if %{with platform_python}
|
||||||
|
%platform_py_install
|
||||||
|
%endif # with platform_python
|
||||||
|
|
||||||
|
%if %{with tests}
|
||||||
%check
|
%check
|
||||||
%if 0%{?with_python2}
|
%if %{with python2}
|
||||||
PYTHONPATH=%{buildroot}%{python2_sitelib} py.test-%{python2_version} -vv
|
PYTHONPATH=%{buildroot}%{python2_sitelib} py.test-%{python2_version} -vv
|
||||||
%endif
|
%endif
|
||||||
|
%if %{with python3}
|
||||||
PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-%{python3_version} -vv
|
PYTHONPATH=%{buildroot}%{python3_sitelib} py.test-%{python3_version} -vv
|
||||||
|
%endif
|
||||||
|
%if %{with platform_python}
|
||||||
|
PYTHONPATH=%{buildroot}%{platform_python_sitelib} py.test-%{platform_python_version} -vv
|
||||||
|
%endif # with platform_python
|
||||||
|
%endif # with tests
|
||||||
|
|
||||||
%if 0%{?with_python2}
|
%if %{with python2}
|
||||||
%files -n python2-%{srcname}
|
%files -n python2-%{srcname}
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%doc CHANGELOG.rst README.rst
|
%doc CHANGELOG.rst README.rst
|
||||||
%{python2_sitelib}/*
|
%{python2_sitelib}/*
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if %{with python3}
|
||||||
%files -n python%{python3_pkgversion}-%{srcname}
|
%files -n python%{python3_pkgversion}-%{srcname}
|
||||||
%license LICENSE
|
%license LICENSE
|
||||||
%doc CHANGELOG.rst README.rst
|
%doc CHANGELOG.rst README.rst
|
||||||
%{python3_sitelib}/%{srcname}/
|
%{python3_sitelib}/%{srcname}/
|
||||||
%{python3_sitelib}/%{srcname}-*.egg-info
|
%{python3_sitelib}/%{srcname}-*.egg-info
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if %{with platform_python}
|
||||||
|
%files -n platform-python-%{srcname}
|
||||||
|
%license LICENSE
|
||||||
|
%doc CHANGELOG.rst README.rst
|
||||||
|
%{platform_python_sitelib}/%{srcname}/
|
||||||
|
%{platform_python_sitelib}/%{srcname}-*.egg-info
|
||||||
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Aug 10 2017 Lumír Balhar <lbalhar@redhat.com> - 1.15.6-3
|
||||||
|
- Add subpackage for platform-python
|
||||||
|
- Disable tests so platform-python stack can be bootstrapped
|
||||||
|
(https://fedoraproject.org/wiki/Changes/Platform_Python_Stack)
|
||||||
|
|
||||||
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.15.6-2
|
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 1.15.6-2
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user