[arch-commits] Commit in python-dephell/repos (3 files)
Felix Yan
felixonmars at archlinux.org
Fri Oct 25 14:32:37 UTC 2019
Date: Friday, October 25, 2019 @ 14:32:36
Author: felixonmars
Revision: 518906
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 518905, python-dephell/trunk/0001-Do-not-override-the-system-SSL-certificates-with-the.patch)
python-dephell/repos/community-staging-any/PKGBUILD
(from rev 518905, python-dephell/trunk/PKGBUILD)
-----------------------------------------------------------------+
0001-Do-not-override-the-system-SSL-certificates-with-the.patch | 40 +++++
PKGBUILD | 71 ++++++++++
2 files changed, 111 insertions(+)
Copied: python-dephell/repos/community-staging-any/0001-Do-not-override-the-system-SSL-certificates-with-the.patch (from rev 518905, 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 2019-10-25 14:32:36 UTC (rev 518906)
@@ -0,0 +1,40 @@
+From 4ad8b8276699f7d24178e66d0ea4147b776a0234 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.
+---
+ dephell/networking.py | 7 +------
+ 1 file changed, 1 insertion(+), 6 deletions(-)
+
+diff --git a/dephell/networking.py b/dephell/networking.py
+index 9f862be..b33e1b1 100644
+--- a/dephell/networking.py
++++ b/dephell/networking.py
+@@ -2,7 +2,6 @@
+ from ssl import create_default_context
+
+ # external
+-import certifi
+ import requests
+ from aiohttp import ClientSession, TCPConnector
+
+@@ -17,11 +16,7 @@ def aiohttp_session(*, auth=None, **kwargs):
+ headers = dict()
+ if auth:
+ headers['Authorization'] = auth.encode()
+- ssl_context = create_default_context(cafile=certifi.where())
+- try:
+- connector = TCPConnector(ssl=ssl_context)
+- except TypeError:
+- connector = TCPConnector(ssl_context=ssl_context)
++ connector = TCPConnector()
+ return ClientSession(headers=headers, connector=connector, **kwargs)
+
+
+--
+2.22.0
+
Copied: python-dephell/repos/community-staging-any/PKGBUILD (from rev 518905, python-dephell/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2019-10-25 14:32:36 UTC (rev 518906)
@@ -0,0 +1,71 @@
+# Maintainer: Eli Schwartz <eschwartz at archlinux.org>
+
+_pkgname=dephell
+pkgname=python-dephell
+pkgver=0.7.7
+pkgrel=2
+pkgdesc="universal Python project management: convert between formats, build, manage venvs"
+arch=('any')
+url="https://github.com/dephell/${_pkgname}"
+license=('ISC')
+_deps=('aiohttp' 'appdirs' 'attrs' 'bowler' 'cerberus' 'dephell-archive' 'dephell-discover'
+ 'dephell-licenses' 'dephell-links' 'dephell-markers' 'dephell-pythons'
+ 'dephell-shells' 'dephell-specifier' 'dephell-venvs' 'dephell-versioning'
+ 'docker' 'dockerpty' 'html5lib' 'jinja' 'packaging'
+ 'pip' 'requests' 'setuptools' 'tomlkit' 'yaml' 'yaspin')
+depends=("${_deps[@]/#/python-}" 'm2r')
+checkdepends=('git' 'python-pytest' 'python-aioresponses' 'python-requests-mock')
+source=("https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/${_pkgname}/${_pkgname}-${pkgver}.tar.gz"
+ "${url}/pull/250/commits/5cc501da4f3b1873b86d3da606f03503fc79b23f.patch"
+ "0001-Do-not-override-the-system-SSL-certificates-with-the.patch")
+sha256sums=('cd3beb4d0827360ce78303d71985fb612406e965fd3b65538550315482f3ffc9'
+ 'b250879d9110558dcb2ad4a649587adaf48038760f562e4b89552dd51adba614'
+ '4dc2412354c0d96956f88b2e5474652e4a87108588905510d96674ddf939b4c1')
+b2sums=('60d498f457a1166124384f77f57f08780ab4347e5512ba562c2d18baefaac73f729a963257025380edff2ca524600b067ba5d3ebb0ccda4b07e4047fffc091d2'
+ 'ef4bf819e55b701a44d6203b0383e72793c27fb57f08c5afdce5fc01b4069fb293295085c0e85a3c6f9dc43614f7d68be4025750a8a24aca3b74ebc65f74df97'
+ 'f379265aecef50dd45026f777f68725348083c8fb8aa57e14733883067d52aa1ea39e1affc2f4b84e7574e64695bb84a1c13ca5a0f691e089ae5a9438eedab07')
+b2sums=('60d498f457a1166124384f77f57f08780ab4347e5512ba562c2d18baefaac73f729a963257025380edff2ca524600b067ba5d3ebb0ccda4b07e4047fffc091d2'
+ 'dae22561541fd0c99ea0953edbb952da7bb84a4b0cc802b1ac66f3cbe5424190a6c959132a4a3dd7f089a7d1673d6ca6d9cc06a9ad1811e6483b35165cc09fa2'
+ 'f379265aecef50dd45026f777f68725348083c8fb8aa57e14733883067d52aa1ea39e1affc2f4b84e7574e64695bb84a1c13ca5a0f691e089ae5a9438eedab07')
+
+prepare() {
+ cd "${srcdir}"/${_pkgname}-${pkgver}
+
+ # fix tests: https://github.com/dephell/dephell/pull/250
+ patch -p1 -i ../5cc501da4f3b1873b86d3da606f03503fc79b23f.patch
+ # bad certifi
+ patch -p1 -i ../0001-Do-not-override-the-system-SSL-certificates-with-the.patch
+
+ # pycache slipped into release tarballs
+ find . -name \*.pyc -delete
+}
+
+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
+ python -m pytest -k 'not test_git_git'
+}
+
+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