[arch-commits] Commit in python-setuptools/trunk (2 files)
Felix Yan
felixonmars at gemini.archlinux.org
Sun Jun 12 20:36:09 UTC 2022
Date: Sunday, June 12, 2022 @ 20:36:09
Author: felixonmars
Revision: 448344
upgpkg: python-setuptools 1:61.3.0-1
Modified:
python-setuptools/trunk/PKGBUILD
python-setuptools/trunk/system-validate-pyproject.patch
---------------------------------+
PKGBUILD | 8 ++++----
system-validate-pyproject.patch | 32 +++++++++++++++++++++-----------
2 files changed, 25 insertions(+), 15 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2022-06-12 20:32:54 UTC (rev 448343)
+++ PKGBUILD 2022-06-12 20:36:09 UTC (rev 448344)
@@ -3,7 +3,7 @@
# Contributor: Eli Schwartz <eschwartz at archlinux.org>
pkgname=python-setuptools
-pkgver=61.2.0
+pkgver=61.3.0
pkgrel=1
epoch=1
pkgdesc="Easily download, build, install, upgrade, and uninstall Python packages"
@@ -22,8 +22,8 @@
replaces=('python-distribute')
source=("$pkgname-$pkgver.tar.gz::https://github.com/pypa/setuptools/archive/v$pkgver.tar.gz"
system-validate-pyproject.patch)
-sha512sums=('eec787039223a65849bb68c9ea2ddcb4a3502420b09db03be0845c85eed88aefe2cde9e478020142bb2ecb90b54c37790c4ae26a648bbb3b43e002dea2ac925b'
- '678c1f4bfc012c5615691433b9e329a4dd363c2b31e70620ce073bab3efe925437bf6f41c12ad48a8042e37ea6f8f7a25198afa482680ebd1505c0fc5bc30927')
+sha512sums=('35e2b848cf79e577b8c469562cb68a80b27d42d2d9c1c94f84fea9beb85e2db0796ed64d414add67a404d801c4f4e6cd489a72153de4dc8ed8b45fab24c28fd9'
+ '50495062093b1b6902484c384abe073896e4f45c5768741582e178014367f186831711a72a8a987e7bacafe96d871161fc07c686dd92c6886de19302f6a10b56')
export SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES=0
@@ -32,7 +32,7 @@
patch -p1 -i ../system-validate-pyproject.patch
- rm -r {pkg_resources,setuptools}/{extern,_vendor}
+ rm -r {pkg_resources,setuptools}/{extern,_vendor} setuptools/config/_validate_pyproject
# Upstream devendoring logic is badly broken, see:
# https://bugs.archlinux.org/task/58670
Modified: system-validate-pyproject.patch
===================================================================
--- system-validate-pyproject.patch 2022-06-12 20:32:54 UTC (rev 448343)
+++ system-validate-pyproject.patch 2022-06-12 20:36:09 UTC (rev 448344)
@@ -1,21 +1,31 @@
diff --git a/setuptools/config/pyprojecttoml.py b/setuptools/config/pyprojecttoml.py
-index bc76b111..886c9747 100644
+index d4024956..2c3bd6bf 100644
--- a/setuptools/config/pyprojecttoml.py
+++ b/setuptools/config/pyprojecttoml.py
-@@ -26,10 +26,14 @@ def load_file(filepath: _Path) -> dict:
+@@ -27,16 +27,22 @@ def load_file(filepath: _Path) -> dict:
- def validate(config: dict, filepath: _Path):
-- from setuptools.extern._validate_pyproject import validate as _validate
-+ import validate_pyproject.api, validate_pyproject.cli, validate_pyproject.plugins
+ def validate(config: dict, filepath: _Path) -> bool:
+- from . import _validate_pyproject as validator
++ import validate_pyproject.api, validate_pyproject.errors, validate_pyproject.cli, validate_pyproject.plugins
+
+- trove_classifier = validator.FORMAT_FUNCTIONS.get("trove-classifier")
++ trove_classifier = validate_pyproject.api.FORMAT_FUNCTIONS.get("trove-classifier")
+ if hasattr(trove_classifier, "_disable_download"):
+ # Improve reproducibility by default. See issue 31 for validate-pyproject.
+ trove_classifier._disable_download() # type: ignore
+
+ plugins = validate_pyproject.plugins.list_from_entry_points()
+ validator = validate_pyproject.api.Validator(
-+ validate_pyproject.cli.select_plugins(plugins, ('setuptools', 'distutils'), ())
++ validate_pyproject.cli.select_plugins(plugins, ('setuptools', 'distutils'), ()),
++ validate_pyproject.api.FORMAT_FUNCTIONS,
+ )
-
++
try:
-- return _validate(config)
+- return validator.validate(config)
+- except validator.ValidationError as ex:
+ return validator(config)
- except Exception as ex:
- if ex.__class__.__name__ != "ValidationError":
- # Workaround for the fact that `extern` can duplicate imports
++ except validate_pyproject.errors.ValidationError as ex:
+ _logger.error(f"configuration error: {ex.summary}") # type: ignore
+ _logger.debug(ex.details) # type: ignore
+ error = ValueError(f"invalid pyproject.toml config: {ex.name}") # type: ignore
More information about the arch-commits
mailing list