From 516a6af5f1614d3b81e3da9264eed0f9d412fe14 Mon Sep 17 00:00:00 2001 From: Jeremy Bertozzi Date: Tue, 29 Oct 2019 14:54:23 +0100 Subject: [PATCH] epel7 specific, python3 build --- python-packaging.spec | 32 ++++++++------------------------ 1 file changed, 8 insertions(+), 24 deletions(-) diff --git a/python-packaging.spec b/python-packaging.spec index 42f4b34..115d062 100644 --- a/python-packaging.spec +++ b/python-packaging.spec @@ -1,16 +1,14 @@ %global pypi_name packaging -%if 0%{?fedora} %global build_wheel 1 %global with_python3 1 -%endif %global python2_wheelname %{pypi_name}-%{version}-py2.py3-none-any.whl %global python3_wheelname %python2_wheelname Name: python-%{pypi_name} Version: 16.8 -Release: 5%{?dist} +Release: 6%{?dist} Summary: Core utilities for Python packages License: BSD or ASL 2.0 @@ -18,24 +16,15 @@ URL: https://github.com/pypa/packaging Source0: https://files.pythonhosted.org/packages/source/p/%{pypi_name}/%{pypi_name}-%{version}.tar.gz BuildArch: noarch -# Dependencies with different names in Fedora and Epel7 -%if 0%{?fedora} -BuildRequires: python2-setuptools -BuildRequires: python2-devel -BuildRequires: python2-pytest -BuildRequires: python2-pyparsing -%else BuildRequires: python-setuptools BuildRequires: python-devel BuildRequires: pytest BuildRequires: pyparsing BuildRequires: python-sphinx -%endif - BuildRequires: python-pretend BuildRequires: python-six -# Build Python 3 subpackage only for Fedora +# Build Python 3 subpackage %if 0%{?with_python3} BuildRequires: python%{python3_pkgversion}-setuptools BuildRequires: python%{python3_pkgversion}-devel @@ -63,12 +52,7 @@ dealing with versions, specifiers, markers etc. Summary: %{summary} %{?python_provide:%python_provide python2-%{pypi_name}} -%if 0%{?fedora} -Requires: python2-pyparsing -%else Requires: pyparsing -%endif - Requires: python-six %description -n python2-%{pypi_name} @@ -114,7 +98,7 @@ rm -rf %{pypi_name}.egg-info # generate html docs %if 0%{?with_python3} -sphinx-build-3 docs html +sphinx-build-%{python3_version} docs html %else sphinx-build docs html %endif @@ -140,13 +124,9 @@ rm -rf html/_static/fonts/ %endif %check -%if 0%{?fedora} -%{__python2} -m pytest tests/ -%{__python3} -m pytest tests/ -%else # Disable non-working tests in Epel7 %{__python2} -m pytest --ignore=tests/test_requirements.py tests/ -%endif +%{__python3} -m pytest --ignore=tests/test_requirements.py tests/ %files -n python2-%{pypi_name} %license LICENSE LICENSE.APACHE LICENSE.BSD @@ -167,6 +147,10 @@ rm -rf html/_static/fonts/ %license LICENSE LICENSE.APACHE LICENSE.BSD %changelog +* Thu Oct 29 2019 Jérémy Bertozzi - 16.8-6 +- epel7 specific spec file +- python3 package for epel7 + * Wed Mar 22 2017 Lumir Balhar - 16.8-5 - Epel7 compatible spec/package