[arch-commits] Commit in python-setuptools/repos/testing-any (4 files)

Felix Yan felixonmars at gemini.archlinux.org
Sat Jun 11 10:47:59 UTC 2022


    Date: Saturday, June 11, 2022 @ 10:47:58
  Author: felixonmars
Revision: 448168

archrelease: copy trunk to testing-any

Added:
  python-setuptools/repos/testing-any/PKGBUILD
    (from rev 448167, python-setuptools/trunk/PKGBUILD)
  python-setuptools/repos/testing-any/system-validate-pyproject.patch
    (from rev 448167, python-setuptools/trunk/system-validate-pyproject.patch)
Deleted:
  python-setuptools/repos/testing-any/PKGBUILD
  python-setuptools/repos/testing-any/system-validate-pyproject.patch

---------------------------------+
 PKGBUILD                        |  182 +++++++++++++++++++-------------------
 system-validate-pyproject.patch |   42 ++++----
 2 files changed, 112 insertions(+), 112 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2022-06-11 10:47:52 UTC (rev 448167)
+++ PKGBUILD	2022-06-11 10:47:58 UTC (rev 448168)
@@ -1,91 +0,0 @@
-# Maintainer: Angel Velasquez <angvp at archlinux.org>
-# Maintainer: Felix Yan <felixonmars at archlinux.org>
-# Contributor: Eli Schwartz <eschwartz at archlinux.org>
-
-pkgname=python-setuptools
-pkgver=61.0.0
-pkgrel=1
-epoch=1
-pkgdesc="Easily download, build, install, upgrade, and uninstall Python packages"
-arch=('any')
-license=('PSF')
-url="https://pypi.org/project/setuptools/"
-depends=('python-appdirs' 'python-jaraco.text' 'python-more-itertools' 'python-nspektr'
-         'python-ordered-set' 'python-packaging' 'python-pyparsing' 'python-tomli'
-         'python-validate-pyproject')
-makedepends=('git' 'python-setuptools')
-checkdepends=('python-jaraco.envs' 'python-jaraco.path' 'python-mock' 'python-pip' 'python-pip-run'
-              'python-pytest-fixture-config' 'python-pytest-flake8' 'python-pytest-virtualenv'
-              'python-wheel' 'python-paver' 'python-pytest-cov' 'python-sphinx' 'python-build'
-              'python-ini2toml' 'python-tomli-w')
-provides=('python-distribute')
-replaces=('python-distribute')
-source=("$pkgname-$pkgver.tar.gz::https://github.com/pypa/setuptools/archive/v$pkgver.tar.gz"
-        system-validate-pyproject.patch)
-sha512sums=('e02390b9b4b962693a37f6918c615700cb836f312b255822b08b20387cb61e9533995f864c5b854d46abf48e5ffe3bcc1bd1e944813f1a0faaf553df6f885d10'
-            '678c1f4bfc012c5615691433b9e329a4dd363c2b31e70620ce073bab3efe925437bf6f41c12ad48a8042e37ea6f8f7a25198afa482680ebd1505c0fc5bc30927')
-
-export SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES=0
-
-prepare() {
-  cd setuptools-$pkgver
-
-  patch -p1 -i ../system-validate-pyproject.patch
-
-  rm -r {pkg_resources,setuptools}/{extern,_vendor}
-
-  # Upstream devendoring logic is badly broken, see:
-  # https://bugs.archlinux.org/task/58670
-  # https://github.com/pypa/pip/issues/5429
-  # https://github.com/pypa/setuptools/issues/1383
-  # The simplest fix is to simply rewrite import paths to use the canonical
-  # location in the first place
-  for _module in setuptools pkg_resources '' ; do
-      find . -name \*.py -exec sed -i \
-          -e 's/from '$_module.extern' import/import/' \
-          -e 's/from '$_module.extern'\./from /' \
-          -e 's/import '$_module.extern'\./import /' \
-          -e "s/__import__('$_module.extern./__import__('/" \
-          -e 's/from \.\.extern\./from /' \
-          {} +
-  done
-
-  # Remove post-release tag since we are using stable tags
-  sed -e '/tag_build = .post/d' \
-      -e '/tag_date = 1/d' \
-      -i setup.cfg
-
-  # Fix shebang
-  sed -i -e "s|^#\!.*/usr/bin/env python|#!/usr/bin/env python3|" setuptools/command/easy_install.py
-}
-
-build() {
-  cd setuptools-$pkgver
-  python setup.py build
-}
-
-check() { (
-  # Workaround UTF-8 tests by setting LC_CTYPE
-  export LC_CTYPE=en_US.UTF-8
-
-  # https://github.com/pypa/setuptools/pull/810
-  export PYTHONDONTWRITEBYTECODE=1
-
-  cd setuptools-$pkgver
-  SETUPTOOLS_USE_DISTUTILS=stdlib python -m pytest \
-    --deselect setuptools/tests/test_distutils_adoption.py \
-    --deselect setuptools/tests/integration/test_pip_install_sdist.py \
-    --deselect setuptools/tests/test_setuptools.py::test_its_own_wheel_does_not_contain_tests \
-    --deselect setuptools/tests/test_virtualenv.py \
-    --deselect "setuptools/tests/test_editable_install.py::test_editable_with_pyproject[__import__('setuptools').setup()]" \
-    --deselect setuptools/tests/test_config_discovery.py::TestDiscoverPackagesAndPyModules::test_project \
-    --deselect setuptools/tests/test_config_discovery.py::TestNoConfig::test_build_with_discovered_name \
-    --deselect setuptools/tests/test_config_discovery.py::TestWithAttrDirective::test_setupcfg_metadata \
-    --deselect setuptools/tests/config/test_apply_pyprojecttoml.py::test_apply_pyproject_equivalent_to_setupcfg \
-    --deselect setuptools/tests/config/test_pyprojecttoml.py::test_invalid_example
-)}
-
-package() {
-  cd setuptools-$pkgver
-  python setup.py install --prefix=/usr --root="$pkgdir" --optimize=1 --skip-build
-}

Copied: python-setuptools/repos/testing-any/PKGBUILD (from rev 448167, python-setuptools/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2022-06-11 10:47:58 UTC (rev 448168)
@@ -0,0 +1,91 @@
+# Maintainer: Angel Velasquez <angvp at archlinux.org>
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Eli Schwartz <eschwartz at archlinux.org>
+
+pkgname=python-setuptools
+pkgver=61.1.0
+pkgrel=1
+epoch=1
+pkgdesc="Easily download, build, install, upgrade, and uninstall Python packages"
+arch=('any')
+license=('PSF')
+url="https://pypi.org/project/setuptools/"
+depends=('python-appdirs' 'python-jaraco.text' 'python-more-itertools' 'python-nspektr'
+         'python-ordered-set' 'python-packaging' 'python-pyparsing' 'python-tomli'
+         'python-validate-pyproject')
+makedepends=('git' 'python-setuptools')
+checkdepends=('python-jaraco.envs' 'python-jaraco.path' 'python-mock' 'python-pip' 'python-pip-run'
+              'python-pytest-fixture-config' 'python-pytest-flake8' 'python-pytest-virtualenv'
+              'python-wheel' 'python-paver' 'python-pytest-cov' 'python-sphinx' 'python-build'
+              'python-ini2toml' 'python-tomli-w')
+provides=('python-distribute')
+replaces=('python-distribute')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/pypa/setuptools/archive/v$pkgver.tar.gz"
+        system-validate-pyproject.patch)
+sha512sums=('388929780cd7adf3bb367ed4ee00bf3069d45a968498754d094e66174a30439cdf8f2167f5cb1b31ef5add21b95dde838b05a2aeb0b72346ed26c3f1c0640441'
+            '678c1f4bfc012c5615691433b9e329a4dd363c2b31e70620ce073bab3efe925437bf6f41c12ad48a8042e37ea6f8f7a25198afa482680ebd1505c0fc5bc30927')
+
+export SETUPTOOLS_INSTALL_WINDOWS_SPECIFIC_FILES=0
+
+prepare() {
+  cd setuptools-$pkgver
+
+  patch -p1 -i ../system-validate-pyproject.patch
+
+  rm -r {pkg_resources,setuptools}/{extern,_vendor}
+
+  # Upstream devendoring logic is badly broken, see:
+  # https://bugs.archlinux.org/task/58670
+  # https://github.com/pypa/pip/issues/5429
+  # https://github.com/pypa/setuptools/issues/1383
+  # The simplest fix is to simply rewrite import paths to use the canonical
+  # location in the first place
+  for _module in setuptools pkg_resources '' ; do
+      find . -name \*.py -exec sed -i \
+          -e 's/from '$_module.extern' import/import/' \
+          -e 's/from '$_module.extern'\./from /' \
+          -e 's/import '$_module.extern'\./import /' \
+          -e "s/__import__('$_module.extern./__import__('/" \
+          -e 's/from \.\.extern\./from /' \
+          {} +
+  done
+
+  # Remove post-release tag since we are using stable tags
+  sed -e '/tag_build = .post/d' \
+      -e '/tag_date = 1/d' \
+      -i setup.cfg
+
+  # Fix shebang
+  sed -i -e "s|^#\!.*/usr/bin/env python|#!/usr/bin/env python3|" setuptools/command/easy_install.py
+}
+
+build() {
+  cd setuptools-$pkgver
+  python setup.py build
+}
+
+check() { (
+  # Workaround UTF-8 tests by setting LC_CTYPE
+  export LC_CTYPE=en_US.UTF-8
+
+  # https://github.com/pypa/setuptools/pull/810
+  export PYTHONDONTWRITEBYTECODE=1
+
+  cd setuptools-$pkgver
+  SETUPTOOLS_USE_DISTUTILS=stdlib python -m pytest \
+    --deselect setuptools/tests/test_distutils_adoption.py \
+    --deselect setuptools/tests/integration/test_pip_install_sdist.py \
+    --deselect setuptools/tests/test_setuptools.py::test_its_own_wheel_does_not_contain_tests \
+    --deselect setuptools/tests/test_virtualenv.py \
+    --deselect "setuptools/tests/test_editable_install.py::test_editable_with_pyproject[__import__('setuptools').setup()]" \
+    --deselect setuptools/tests/test_config_discovery.py::TestDiscoverPackagesAndPyModules::test_project \
+    --deselect setuptools/tests/test_config_discovery.py::TestNoConfig::test_build_with_discovered_name \
+    --deselect setuptools/tests/test_config_discovery.py::TestWithAttrDirective::test_setupcfg_metadata \
+    --deselect setuptools/tests/config/test_apply_pyprojecttoml.py::test_apply_pyproject_equivalent_to_setupcfg \
+    --deselect setuptools/tests/config/test_pyprojecttoml.py::test_invalid_example
+)}
+
+package() {
+  cd setuptools-$pkgver
+  python setup.py install --prefix=/usr --root="$pkgdir" --optimize=1 --skip-build
+}

Deleted: system-validate-pyproject.patch
===================================================================
--- system-validate-pyproject.patch	2022-06-11 10:47:52 UTC (rev 448167)
+++ system-validate-pyproject.patch	2022-06-11 10:47:58 UTC (rev 448168)
@@ -1,21 +0,0 @@
-diff --git a/setuptools/config/pyprojecttoml.py b/setuptools/config/pyprojecttoml.py
-index bc76b111..886c9747 100644
---- a/setuptools/config/pyprojecttoml.py
-+++ b/setuptools/config/pyprojecttoml.py
-@@ -26,10 +26,14 @@ 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
-+    plugins = validate_pyproject.plugins.list_from_entry_points()
-+    validator = validate_pyproject.api.Validator(
-+        validate_pyproject.cli.select_plugins(plugins, ('setuptools', 'distutils'), ())
-+    )
- 
-     try:
--        return _validate(config)
-+        return validator(config)
-     except Exception as ex:
-         if ex.__class__.__name__ != "ValidationError":
-             # Workaround for the fact that `extern` can duplicate imports

Copied: python-setuptools/repos/testing-any/system-validate-pyproject.patch (from rev 448167, python-setuptools/trunk/system-validate-pyproject.patch)
===================================================================
--- system-validate-pyproject.patch	                        (rev 0)
+++ system-validate-pyproject.patch	2022-06-11 10:47:58 UTC (rev 448168)
@@ -0,0 +1,21 @@
+diff --git a/setuptools/config/pyprojecttoml.py b/setuptools/config/pyprojecttoml.py
+index bc76b111..886c9747 100644
+--- a/setuptools/config/pyprojecttoml.py
++++ b/setuptools/config/pyprojecttoml.py
+@@ -26,10 +26,14 @@ 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
++    plugins = validate_pyproject.plugins.list_from_entry_points()
++    validator = validate_pyproject.api.Validator(
++        validate_pyproject.cli.select_plugins(plugins, ('setuptools', 'distutils'), ())
++    )
+ 
+     try:
+-        return _validate(config)
++        return validator(config)
+     except Exception as ex:
+         if ex.__class__.__name__ != "ValidationError":
+             # Workaround for the fact that `extern` can duplicate imports



More information about the arch-commits mailing list