Date: Tuesday, April 18, 2023 @ 19:49:03
  Author: dvzrv
Revision: 474158

archrelease: copy trunk to staging-any

Added:
  python-urllib3/repos/staging-any/LICENSE
    (from rev 474157, python-urllib3/trunk/LICENSE)
  python-urllib3/repos/staging-any/PKGBUILD
    (from rev 474157, python-urllib3/trunk/PKGBUILD)
Deleted:
  python-urllib3/repos/staging-any/LICENSE
  python-urllib3/repos/staging-any/PKGBUILD

----------+
 LICENSE  |   64 ++++++++++++-------------
 PKGBUILD |  154 +++++++++++++++++++++++++++++++++++++------------------------
 2 files changed, 127 insertions(+), 91 deletions(-)

Deleted: LICENSE
===================================================================
--- LICENSE     2023-04-18 19:48:37 UTC (rev 474157)
+++ LICENSE     2023-04-18 19:49:03 UTC (rev 474158)
@@ -1,32 +0,0 @@
-Note from the ArchLinux Packager:
-The urllib3 source doesn't come with a license file.  Its homepage
-does provide a link to the text of the MIT license, so I copied
-the following text to a file when building the package.
-
-------CUT------
-Open Source Initiative OSI - The MIT License:Licensing
-
-
-[OSI Approved License]
-
-The MIT License
-
-Copyright (c) <year> <copyright holders>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.

Copied: python-urllib3/repos/staging-any/LICENSE (from rev 474157, 
python-urllib3/trunk/LICENSE)
===================================================================
--- LICENSE                             (rev 0)
+++ LICENSE     2023-04-18 19:49:03 UTC (rev 474158)
@@ -0,0 +1,32 @@
+Note from the ArchLinux Packager:
+The urllib3 source doesn't come with a license file.  Its homepage
+does provide a link to the text of the MIT license, so I copied
+the following text to a file when building the package.
+
+------CUT------
+Open Source Initiative OSI - The MIT License:Licensing
+
+
+[OSI Approved License]
+
+The MIT License
+
+Copyright (c) <year> <copyright holders>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.

Deleted: PKGBUILD
===================================================================
--- PKGBUILD    2023-04-18 19:48:37 UTC (rev 474157)
+++ PKGBUILD    2023-04-18 19:49:03 UTC (rev 474158)
@@ -1,59 +0,0 @@
-# Maintainer: Felix Yan <[email protected]>
-# Contributor: Patrice Peterson <runiq at archlinux dot us>
-# Contributor: Chris Brannon <[email protected]>
-# Contributor: BorgHunter <borghunter at gmail dot com>
-
-pkgbase=python-urllib3
-pkgname=(python-urllib3 python-urllib3-doc)
-pkgver=1.26.13
-pkgrel=2
-pkgdesc="HTTP library with thread-safe connection pooling and file post 
support"
-arch=("any")
-url="https://github.com/urllib3/urllib3";
-license=("MIT")
-makedepends=('python-setuptools' 'python-sphinx' 'python-ndg-httpsclient'
-             'python-pyasn1' 'python-pyopenssl'
-             'python-pysocks' 'python-mock'
-             'python-brotli' 'python-sphinx-furo')
-checkdepends=('python-pytest-runner' 'python-tornado' 'python-nose' 
'python-psutil' 'python-trustme'
-              'python-gcp-devrel-py-tools' 'python-flaky' 'python-dateutil')
-source=("https://github.com/urllib3/urllib3/archive/$pkgver/$pkgbase-$pkgver.tar.gz";)
-sha512sums=('d8b6b7afa6597e934e1deedf98573226a403d83e306c7471195a079086e048a2e30be5c5a3840e39700b276993e6cf9e3a52328acc7d85e5859618392c30f912')
-
-build() {
-  cd urllib3-$pkgver
-  python setup.py build
-
-  cd docs
-  PYTHONPATH="../build/lib" make html
-}
-
-check() {
-  cd urllib3-$pkgver
-  # TODO
-  python setup.py pytest --addopts "--deselect 
test/test_retry.py::TestRetry::test_respect_retry_after_header_sleep \
-                                    --deselect 
test/test_retry_deprecated.py::TestRetry::test_respect_retry_after_header_sleep 
\
-                                    --deselect 
test/contrib/test_pyopenssl.py::TestSSL::test_ssl_read_timeout \
-                                    --deselect 
test/with_dummyserver/test_socketlevel.py::TestSSL::test_ssl_read_timeout"
-}
-
-package_python-urllib3() {
-  depends=('python')
-  optdepends=('python-pysocks: SOCKS support'
-              'python-brotli: Brotli support'
-              'python-pyopenssl: security support'
-              'python-idna: security support')
-
-  cd urllib3-$pkgver
-  python setup.py install --root="$pkgdir"
-  install -Dm644 LICENSE.txt -t "$pkgdir"/usr/share/licenses/$pkgname/
-}
-
-package_python-urllib3-doc() {
-  pkgdesc="urllib3 Documentation"
-
-  cd urllib3-$pkgver/docs
-  install -d "$pkgdir"/usr/share/doc
-  cp -r _build/html "$pkgdir"/usr/share/doc/python-urllib3
-  install -Dm644 ../LICENSE.txt -t "$pkgdir"/usr/share/licenses/$pkgname/
-}

Copied: python-urllib3/repos/staging-any/PKGBUILD (from rev 474157, 
python-urllib3/trunk/PKGBUILD)
===================================================================
--- PKGBUILD                            (rev 0)
+++ PKGBUILD    2023-04-18 19:49:03 UTC (rev 474158)
@@ -0,0 +1,95 @@
+# Maintainer: Felix Yan <[email protected]>
+# Contributor: Patrice Peterson <runiq at archlinux dot us>
+# Contributor: Chris Brannon <[email protected]>
+# Contributor: BorgHunter <borghunter at gmail dot com>
+
+_name=urllib3
+pkgbase=python-urllib3
+pkgname=(python-urllib3 python-urllib3-doc)
+pkgver=1.26.15
+pkgrel=1
+pkgdesc="HTTP library with thread-safe connection pooling and file post 
support"
+arch=("any")
+url="https://github.com/urllib3/urllib3";
+license=("MIT")
+makedepends=(
+  'python-build'
+  'python-installer'
+  'python-setuptools'
+  'python-sphinx'
+  'python-sphinx-furo'
+  'python-wheel'
+)
+checkdepends=(
+  'python-brotli'
+  'python-certifi'
+  'python-cryptography'
+  'python-dateutil'
+  'python-flaky'
+  'python-gcp-devrel-py-tools'
+  'python-idna'
+  'python-pyopenssl'
+  'python-pysocks'
+  'python-pytest'
+  'python-pytest-freezegun'
+  'python-pytest-timeout'
+  'python-tornado'
+  'python-trustme'
+)
+source=("https://github.com/urllib3/urllib3/archive/$pkgver/$pkgbase-$pkgver.tar.gz";)
+sha512sums=('edd52a05049a047b1bb913de1cc211a6f7b70802e9ddcb639a973fb910bf218210577a5375077b6569ef382c07668ad6057adb67a31475125c2e5517c603131d')
+
+prepare() {
+  # remove python-mock requirement
+  find $_name-$pkgver -type f -iname "*.py" -exec sed 's/import mock/from 
unittest import mock/; s/from mock/from unittest.mock/' -i {} +
+}
+
+build() {
+  cd $_name-$pkgver
+  python -m build --wheel --no-isolation
+
+  cd docs
+  PYTHONPATH="../build/lib" make html
+}
+
+check() {
+  local pytest_options=(
+    -vv
+    # TODO: report upstream
+    --deselect 
test/test_ssltransport.py::SingleTLSLayerTestCase::test_ssl_object_attributes
+    --deselect test/contrib/test_pyopenssl.py::TestSSL::test_ssl_read_timeout
+    --deselect 
test/with_dummyserver/test_socketlevel.py::TestSSL::test_ssl_read_timeout
+  )
+  local site_packages=$(python -c "import site; 
print(site.getsitepackages()[0])")
+
+  cd $_name-$pkgver
+  # install to temporary location, as importlib is used
+  python -m installer --destdir=test_dir dist/*.whl
+  export PYTHONPATH="$PWD/test_dir/$site_packages:$PYTHONPATH"
+  pytest "${pytest_options[@]}"
+}
+
+package_python-urllib3() {
+  depends=('python')
+  optdepends=(
+    'python-brotli: Brotli support'
+    'python-certifi: security support'
+    'python-cryptography: security support'
+    'python-idna: security support'
+    'python-pyopenssl: security support'
+    'python-pysocks: SOCKS support'
+  )
+
+  cd $_name-$pkgver
+  python -m installer --destdir="$pkgdir" dist/*.whl
+  install -Dm644 LICENSE.txt -t "$pkgdir"/usr/share/licenses/$pkgname/
+}
+
+package_python-urllib3-doc() {
+  pkgdesc="urllib3 Documentation"
+
+  cd $_name-$pkgver/docs
+  install -d "$pkgdir"/usr/share/doc
+  cp -r _build/html "$pkgdir"/usr/share/doc/python-urllib3
+  install -Dm644 ../LICENSE.txt -t "$pkgdir"/usr/share/licenses/$pkgname/
+}

Reply via email to