Merged update from upstream sources

This is an automated DistroBaker update from upstream sources.
If you do not know what this is about or would like to opt out,
contact the OSCI team.

Source: https://src.fedoraproject.org/rpms/python-packaging.git#14817c6e2d55eed68a869da721ba1372ca225360
This commit is contained in:
DistroBaker 2020-11-30 15:27:01 +00:00
parent 3f9a5a223c
commit 199f01ccd5
4 changed files with 12 additions and 60 deletions

1
.gitignore vendored
View File

@ -7,3 +7,4 @@
/packaging-20.1.tar.gz /packaging-20.1.tar.gz
/packaging-20.3.tar.gz /packaging-20.3.tar.gz
/packaging-20.4.tar.gz /packaging-20.4.tar.gz
/packaging-20.7.tar.gz

View File

@ -1,51 +0,0 @@
From 39a70cce69d9b08cc4d02b225114d556d5b59ada Mon Sep 17 00:00:00 2001
From: Hugo van Kemenade <hugovk@users.noreply.github.com>
Date: Wed, 19 Aug 2020 22:37:34 +0300
Subject: [PATCH] Remove dependency on six to make package lighter (#331)
---
packaging/requirements.py | 8 +++++++-
setup.py | 2 +-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/packaging/requirements.py b/packaging/requirements.py
index 91f81ed..2226e98 100644
--- a/packaging/requirements.py
+++ b/packaging/requirements.py
@@ -5,16 +5,22 @@
import string
import re
+import sys
from pyparsing import stringStart, stringEnd, originalTextFor, ParseException
from pyparsing import ZeroOrMore, Word, Optional, Regex, Combine
from pyparsing import Literal as L # noqa
-from six.moves.urllib import parse as urlparse
from ._typing import TYPE_CHECKING
from .markers import MARKER_EXPR, Marker
from .specifiers import LegacySpecifier, Specifier, SpecifierSet
+if sys.version_info[0] >= 3:
+ from urllib import parse as urlparse # pragma: no cover
+else: # pragma: no cover
+ import urlparse
+
+
if TYPE_CHECKING: # pragma: no cover
from typing import List
diff --git a/setup.py b/setup.py
index f533a7d..a14d926 100644
--- a/setup.py
+++ b/setup.py
@@ -49,7 +49,7 @@
author=about["__author__"],
author_email=about["__email__"],
python_requires=">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*",
- install_requires=["pyparsing>=2.0.2", "six"], # Needed to avoid issue #91
+ install_requires=["pyparsing>=2.0.2"], # Needed to avoid issue #91
classifiers=[
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",

View File

@ -7,18 +7,15 @@
%bcond_without tests %bcond_without tests
Name: python-%{pypi_name} Name: python-%{pypi_name}
Version: 20.4 Version: 20.7
Release: 3%{?dist} Release: 1%{?dist}
Summary: Core utilities for Python packages Summary: Core utilities for Python packages
License: BSD or ASL 2.0 License: BSD or ASL 2.0
URL: https://github.com/pypa/packaging URL: https://github.com/pypa/packaging
Source0: %{pypi_source} Source0: %{url}/archive/%{version}/%{pypi_name}-%{version}.tar.gz
BuildArch: noarch BuildArch: noarch
# Remove dependency on six to make package lighter, backported from upstream
Patch1: %{url}/commit/39a70cce.patch
BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}-devel
BuildRequires: pyproject-rpm-macros BuildRequires: pyproject-rpm-macros
@ -26,9 +23,8 @@ BuildRequires: pyproject-rpm-macros
# dependency on self. # dependency on self.
# We also don't use the python3dist() form, in case packaging is ever used # We also don't use the python3dist() form, in case packaging is ever used
# in the provides generator. # in the provides generator.
BuildRequires: python%{python3_pkgversion}-setuptools BuildRequires: python%{python3_pkgversion}-flit-core
BuildRequires: python%{python3_pkgversion}-pip BuildRequires: python%{python3_pkgversion}-pip
BuildRequires: python%{python3_pkgversion}-wheel
# Upstream uses nox for testing, we specify the test deps manually as well. # Upstream uses nox for testing, we specify the test deps manually as well.
%if %{with tests} %if %{with tests}
@ -70,6 +66,9 @@ Documentation for python-packaging
%prep %prep
%autosetup -p1 -n %{pypi_name}-%{version} %autosetup -p1 -n %{pypi_name}-%{version}
# Do not use furo as HTML theme in docs
# furo is not available in Fedora
sed -i '/html_theme = "furo"/d' docs/conf.py
%build %build
%pyproject_wheel %pyproject_wheel
@ -108,6 +107,9 @@ rm -rf html/_static/fonts/
%changelog %changelog
* Mon Nov 30 2020 Lumír Balhar <lbalhar@redhat.com> - 20.7-1
- Update to 20.7 (#1902369)
* Fri Oct 02 2020 Miro Hrončok <mhroncok@redhat.com> - 20.4-3 * Fri Oct 02 2020 Miro Hrončok <mhroncok@redhat.com> - 20.4-3
- Drop the dependency on six to make the package lighter - Drop the dependency on six to make the package lighter

View File

@ -1 +1 @@
SHA512 (packaging-20.4.tar.gz) = d53912041a9950efb5d221fc968adc328c2ef1e54ec9806d2158fd6db1b170e37afb05213f5750b10c59927504083ca3781c958caa0c802b1c7c0fe1ac1682a4 SHA512 (packaging-20.7.tar.gz) = 4da8f66af066ac92b47664d21af34a02526cd1639cb766927670bec0ac8c7416116834c847678a29862a46faeda7e2f2393744be315cdfbbb8bd55a04ceb942c