[arch-commits] Commit in python-dephell/repos (3 files)

Evangelos Foutras foutrelis at gemini.archlinux.org
Mon Nov 29 22:18:14 UTC 2021


    Date: Monday, November 29, 2021 @ 22:18:13
  Author: foutrelis
Revision: 1057642

archrelease: copy trunk to community-staging-any

Added:
  python-dephell/repos/community-staging-any/
  python-dephell/repos/community-staging-any/0001-Do-not-override-the-system-SSL-certificates-with-the.patch
    (from rev 1057641, python-dephell/trunk/0001-Do-not-override-the-system-SSL-certificates-with-the.patch)
  python-dephell/repos/community-staging-any/PKGBUILD
    (from rev 1057641, python-dephell/trunk/PKGBUILD)

-----------------------------------------------------------------+
 0001-Do-not-override-the-system-SSL-certificates-with-the.patch |   55 +++++++
 PKGBUILD                                                        |   74 ++++++++++
 2 files changed, 129 insertions(+)

Copied: python-dephell/repos/community-staging-any/0001-Do-not-override-the-system-SSL-certificates-with-the.patch (from rev 1057641, python-dephell/trunk/0001-Do-not-override-the-system-SSL-certificates-with-the.patch)
===================================================================
--- community-staging-any/0001-Do-not-override-the-system-SSL-certificates-with-the.patch	                        (rev 0)
+++ community-staging-any/0001-Do-not-override-the-system-SSL-certificates-with-the.patch	2021-11-29 22:18:13 UTC (rev 1057642)
@@ -0,0 +1,55 @@
+From 9e8c2fd8abef936fa483da40f3819100b5e3b520 Mon Sep 17 00:00:00 2001
+From: Eli Schwartz <eschwartz at archlinux.org>
+Date: Tue, 6 Aug 2019 19:43:13 -0400
+Subject: [PATCH] Do not override the system SSL certificates with the certifi
+ bundle.
+
+We need to respect the system certification policy, and by default the
+ssl module will use our packaged ca-certificates.
+
+ssl.create_default_context(cafile=None) is the default to use the
+builtin (system) certs, but can be overridden on the command line. I
+don't know why one would wish to do so, but eh, this patch is less
+invasive than the previous patch.
+---
+ dephell/networking.py | 3 +--
+ setup.py              | 2 +-
+ 2 files changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/dephell/networking.py b/dephell/networking.py
+index faa91d3..61f836f 100644
+--- a/dephell/networking.py
++++ b/dephell/networking.py
+@@ -6,7 +6,6 @@ from time import sleep
+ from typing import Any, Optional
+ 
+ # external
+-import certifi
+ import requests
+ from aiohttp import ClientError, ClientSession, TCPConnector
+ from requests.sessions import Session
+@@ -31,7 +30,7 @@ def aiohttp_session(*, auth: Optional[Auth] = None, **kwargs: Any) -> ClientSess
+     # setup SSL
+     cafile = config.get('ca')
+     if not cafile:
+-        cafile = certifi.where()
++        cafile = None
+     ssl_context = create_default_context(cafile=cafile)
+     try:
+         connector = TCPConnector(ssl=ssl_context)
+diff --git a/setup.py b/setup.py
+index 2db6286..7f18120 100644
+--- a/setup.py
++++ b/setup.py
+@@ -56,7 +56,7 @@ setup(
+     package_dir={"": "."},
+     package_data={"dephell": ["templates/*.j2", "templates/*.sh"]},
+     install_requires=[
+-        'aiohttp', 'attrs>=19.2.0', 'cerberus>=1.3', 'certifi',
++        'aiohttp', 'attrs>=19.2.0', 'cerberus>=1.3',
+         'dephell-archive>=0.1.5', 'dephell-argparse>=0.1.1',
+         'dephell-changelogs', 'dephell-discover>=0.2.6',
+         'dephell-licenses>=0.1.6', 'dephell-links>=0.1.4',
+-- 
+2.27.0
+

Copied: python-dephell/repos/community-staging-any/PKGBUILD (from rev 1057641, python-dephell/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD	                        (rev 0)
+++ community-staging-any/PKGBUILD	2021-11-29 22:18:13 UTC (rev 1057642)
@@ -0,0 +1,74 @@
+# Maintainer: Eli Schwartz <eschwartz at archlinux.org>
+
+_pkgname=dephell
+pkgname=python-dephell
+pkgver=0.8.3
+pkgrel=4
+pkgdesc="universal Python project management: convert between formats, build, manage venvs"
+arch=('any')
+url="https://github.com/dephell/${_pkgname}"
+license=('ISC')
+_d_deps=('archive' 'argparse' 'changelogs' 'discover' 'licenses' 'links' 'markers'
+         'pythons' 'setuptools' 'shells' 'specifier' 'venvs' 'versioning')
+_deps=('aiohttp' 'appdirs' 'attrs' 'bowler' 'cerberus' 'colorama' "${_d_deps[@]/#/dephell-}"
+       'html5lib' 'jinja' 'packaging'
+       'pip' 'pygments' 'requests' 'ruamel-yaml' 'tabulate' 'tomlkit' 'yaspin')
+depends=("${_deps[@]/#/python-}" 'm2r')
+checkdepends=('git' 'python-pytest' 'python-aioresponses' 'python-requests-mock')
+optdepends=('python-aiofiles: speed up file writes for files downloaded from warehouse'
+            'python-docker: for the docker subcommand'
+            'python-dockerpty: for the docker subcommand'
+            'python-gnupg: for the package verify subcommand'
+            'python-graphviz: print deps tree as a graph'
+            'autopep8: make setup.py converter produce formatted pep8 output'
+            'yapf: make setup.py converter produce google yapf-formatted output')
+source=("https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/${_pkgname}/${_pkgname}-${pkgver}.tar.gz"
+        "0001-Do-not-override-the-system-SSL-certificates-with-the.patch")
+sha256sums=('a9fcc528a0c6f9f5d721292bdf846e5338e4dca7cd6fef1551fbe71564dfe61e'
+            'acbe38854daef23a6cb752bfa98323ae5c7f85cca8562cb070d59e11e05991b0')
+b2sums=('7ab8e2022134ff11a39476e121388e627b434b5568bd39879f60a9f14cb27cfee153d27df880fd755c5ab0b0c44fa960a9330df4d2bb15c55b03ffaaa600cbf2'
+        'b69a0f264700c93144adddf86ee133ca15a5e373dc077bc9d24010cce6238a779435e48cab41bf47b72482c357e790ac9bafeafb89b85a36c29769601300a2cf')
+
+prepare() {
+    cd "${srcdir}"/${_pkgname}-${pkgver}
+
+    # bad certifi
+    patch -p1 -i ../0001-Do-not-override-the-system-SSL-certificates-with-the.patch
+
+    # don't lock pip version to below pip 20:
+    # https://github.com/dephell/dephell/pull/363#issuecomment-606150965
+    # because https://github.com/pypa/pip/issues/7629 seems insufficient
+    # to hold up non-PyPY platforms :/
+    sed -i 's/pip<=19.3.1,>=18.0/pip/' setup.py
+}
+
+build(){
+    cd "${srcdir}"/${_pkgname}-${pkgver}
+
+    python setup.py build
+}
+
+check() {
+    cd "${srcdir}"/${_pkgname}-${pkgver}
+
+    # skip git tests, which rely on being run from dephell's own git repo
+    # skip doc test, which tests whether html docs not in the tarball, cover all commands
+    python -m pytest -k 'not test_git_git and not test_docs' --no-network
+}
+
+package() {
+    cd "${srcdir}"/${_pkgname}-${pkgver}
+
+    python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
+    install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
+
+    # make shell completions
+    python -c 'from dephell.actions._autocomplete import make_bash_autocomplete as comp; print(comp())' | \
+        install -Dm644 /dev/stdin "${pkgdir}"/usr/share/bash-completion/completions/dephell
+
+    # rewrite zsh completion to support autoloading
+    {   printf '#compdef dephell\n'
+        python -c 'from dephell.actions._autocomplete import make_zsh_autocomplete as comp; print(comp())' | \
+            sed 's/^compdef _dephell dephell$/_dephell/'
+    } | install -Dm644 /dev/stdin "${pkgdir}"/usr/share/zsh/site-functions/_dephell
+}



More information about the arch-commits mailing list