summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntonio Rojas2022-08-01 10:18:38 +0200
committerAntonio Rojas2022-08-01 10:18:38 +0200
commit0cac0b5ba9afc112b9c9231e43d6941a40338868 (patch)
treeebb7daa0a621f39cec6ce1254c1a4af4551c0035
downloadaur-0cac0b5ba9afc112b9c9231e43d6941a40338868.tar.gz
import from community
-rw-r--r--.SRCINFO60
-rw-r--r--0001-Do-not-override-the-system-SSL-certificates-with-the.patch55
-rw-r--r--PKGBUILD110
-rw-r--r--new-pip-parser-api.patch53
4 files changed, 278 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..865d5ad7da8b
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,60 @@
+pkgbase = python-dephell
+ pkgdesc = universal Python project management: convert between formats, build, manage venvs
+ pkgver = 0.8.3
+ pkgrel = 7
+ url = https://github.com/dephell/dephell
+ arch = any
+ license = ISC
+ checkdepends = git
+ checkdepends = python-pytest
+ checkdepends = python-aioresponses
+ checkdepends = python-requests-mock
+ checkdepends = python-moreorless
+ depends = python-aiohttp
+ depends = python-appdirs
+ depends = python-attrs
+ depends = python-bowler
+ depends = python-cerberus
+ depends = python-colorama
+ depends = python-dephell-archive
+ depends = python-dephell-argparse
+ depends = python-dephell-changelogs
+ depends = python-dephell-discover
+ depends = python-dephell-licenses
+ depends = python-dephell-links
+ depends = python-dephell-markers
+ depends = python-dephell-pythons
+ depends = python-dephell-setuptools
+ depends = python-dephell-shells
+ depends = python-dephell-specifier
+ depends = python-dephell-venvs
+ depends = python-dephell-versioning
+ depends = python-html5lib
+ depends = python-jinja
+ depends = python-packaging
+ depends = python-pip
+ depends = python-pygments
+ depends = python-requests
+ depends = python-ruamel-yaml
+ depends = python-tabulate
+ depends = python-tomlkit
+ depends = python-yaspin
+ depends = m2r
+ optdepends = python-aiofiles: speed up file writes for files downloaded from warehouse
+ optdepends = python-docker: for the docker subcommand
+ optdepends = python-dockerpty: for the docker subcommand
+ optdepends = python-gnupg: for the package verify subcommand
+ optdepends = python-graphviz: print deps tree as a graph
+ optdepends = autopep8: make setup.py converter produce formatted pep8 output
+ optdepends = yapf: make setup.py converter produce google yapf-formatted output
+ source = https://files.pythonhosted.org/packages/source/d/dephell/dephell-0.8.3.tar.gz
+ source = new-pip-parser-api.patch
+ source = 0001-Do-not-override-the-system-SSL-certificates-with-the.patch
+ sha256sums = a9fcc528a0c6f9f5d721292bdf846e5338e4dca7cd6fef1551fbe71564dfe61e
+ sha256sums = 85ac9db84375d9063fae8cbc91ad7cbcec5b0da8cfe800ed400bcc92f0412934
+ sha256sums = acbe38854daef23a6cb752bfa98323ae5c7f85cca8562cb070d59e11e05991b0
+ b2sums = 7ab8e2022134ff11a39476e121388e627b434b5568bd39879f60a9f14cb27cfee153d27df880fd755c5ab0b0c44fa960a9330df4d2bb15c55b03ffaaa600cbf2
+ b2sums = f6f32fbddb21fb263541f6025b9bd111354f39ad2624fa1830d962f40915948bf2bfcc678b9cc2332b3eae7da7d94555a693e5295507004ba2674831854c60a2
+ b2sums = b69a0f264700c93144adddf86ee133ca15a5e373dc077bc9d24010cce6238a779435e48cab41bf47b72482c357e790ac9bafeafb89b85a36c29769601300a2cf
+
+pkgname = python-dephell
diff --git a/0001-Do-not-override-the-system-SSL-certificates-with-the.patch b/0001-Do-not-override-the-system-SSL-certificates-with-the.patch
new file mode 100644
index 000000000000..9088595f21f1
--- /dev/null
+++ b/0001-Do-not-override-the-system-SSL-certificates-with-the.patch
@@ -0,0 +1,55 @@
+From 9e8c2fd8abef936fa483da40f3819100b5e3b520 Mon Sep 17 00:00:00 2001
+From: Eli Schwartz <eschwartz@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
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..538396aa3bbf
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,110 @@
+# Maintainer: Caleb Maclennana <caleb@alerque.com>
+# Contributor: Eli Schwartz <eschwartz@archlinux.org>
+
+_pyname=dephell
+pkgname=python-dephell
+pkgver=0.8.3
+pkgrel=7
+pkgdesc='universal Python project management: convert between formats, build, manage venvs'
+arch=(any)
+url="https://github.com/dephell/$_pyname"
+license=('ISC')
+_dhdeps=(archive
+ argparse
+ changelogs
+ discover
+ licenses
+ links markers
+ pythons
+ setuptools
+ shells
+ specifier
+ venvs
+ versioning)
+_pydeps=(aiohttp
+ appdirs
+ attrs
+ bowler
+ cerberus
+ colorama
+ "${_dhdeps[@]/#/dephell-}"
+ html5lib
+ jinja
+ packaging
+ pip
+ pygments
+ requests
+ ruamel-yaml
+ tabulate
+ tomlkit
+ yaspin)
+depends=("${_pydeps[@]/#/python-}" m2r)
+checkdepends=(git python-pytest python-aioresponses python-requests-mock
+ python-moreorless)
+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')
+_archive="$_pyname-$pkgver"
+source=("https://files.pythonhosted.org/packages/source/${_pyname:0:1}/${_pyname}/$_archive.tar.gz"
+ 'new-pip-parser-api.patch'
+ '0001-Do-not-override-the-system-SSL-certificates-with-the.patch')
+sha256sums=('a9fcc528a0c6f9f5d721292bdf846e5338e4dca7cd6fef1551fbe71564dfe61e'
+ '85ac9db84375d9063fae8cbc91ad7cbcec5b0da8cfe800ed400bcc92f0412934'
+ 'acbe38854daef23a6cb752bfa98323ae5c7f85cca8562cb070d59e11e05991b0')
+b2sums=('7ab8e2022134ff11a39476e121388e627b434b5568bd39879f60a9f14cb27cfee153d27df880fd755c5ab0b0c44fa960a9330df4d2bb15c55b03ffaaa600cbf2'
+ 'f6f32fbddb21fb263541f6025b9bd111354f39ad2624fa1830d962f40915948bf2bfcc678b9cc2332b3eae7da7d94555a693e5295507004ba2674831854c60a2'
+ 'b69a0f264700c93144adddf86ee133ca15a5e373dc077bc9d24010cce6238a779435e48cab41bf47b72482c357e790ac9bafeafb89b85a36c29769601300a2cf')
+
+prepare() {
+ cd "$_archive"
+
+ # https://github.com/dephell/dephell/pull/473
+ patch -Np1 -i ../new-pip-parser-api.patch
+
+ # 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 "$_archive"
+ python setup.py build
+}
+
+check() {
+ cd "$_archive"
+
+ # 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 \
+ --deselect tests/test_actions/test_entrypoints.py::test_smoke_get_entrypoints \
+ --deselect tests/test_commands/test_vendor_import.py::test_patch_imports
+}
+
+package() {
+ cd "$_archive"
+
+ python setup.py install --root="$pkgdir" --optimize=1 --skip-build
+ install -Dm0644 -t "$pkgdir/usr/share/licenses/$pkgname/" LICENSE
+
+ # make shell completions
+ python -c 'from dephell.actions._autocomplete import make_bash_autocomplete as comp; print(comp())' |
+ install -Dm0644 /dev/stdin "$pkgdir/usr/share/bash-completion/completions/$_pyname"
+
+ # 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 -Dm0644 /dev/stdin "$pkgdir/usr/share/zsh/site-functions/_$_pyname"
+}
diff --git a/new-pip-parser-api.patch b/new-pip-parser-api.patch
new file mode 100644
index 000000000000..dbd81fa8b0b9
--- /dev/null
+++ b/new-pip-parser-api.patch
@@ -0,0 +1,53 @@
+From a3872e15312d8382017fbd6888744f4025cae5ac Mon Sep 17 00:00:00 2001
+From: Ben Greiner <code@bnavigator.de>
+Date: Tue, 27 Oct 2020 22:18:42 +0100
+Subject: [PATCH] support changed pip parser api
+
+---
+ dephell/converters/pip.py | 18 +++++++++++++++++-
+ 1 file changed, 17 insertions(+), 1 deletion(-)
+
+diff --git a/dephell/converters/pip.py b/dephell/converters/pip.py
+index 6d6181db..89c36e95 100644
+--- a/dephell/converters/pip.py
++++ b/dephell/converters/pip.py
+@@ -9,6 +9,7 @@
+ from dephell_discover import Root as PackageRoot
+ from dephell_links import DirLink, FileLink
+ from pip._internal.req import parse_requirements
++from pip._internal.req.req_install import InstallRequirement
+
+ # app
+ from ..context_tools import chdir
+@@ -38,6 +39,14 @@
+ # external
+ from pip._internal.network.session import PipSession
+
++try:
++ # pip >= 20.2
++ from pip._internal.req.req_file import ParsedRequirement
++ from pip._internal.req.constructors import \
++ install_req_from_parsed_requirement
++except ImportError:
++ ParsedRequirement = None
++
+
+ @attr.s()
+ class PIPConverter(BaseConverter):
+@@ -98,8 +107,15 @@ def load(self, path) -> RootDependency:
+ )
+
+ deps = []
+- for req in reqs:
++ for ireq in reqs:
+ # https://github.com/pypa/pip/blob/master/src/pip/_internal/req/req_install.py
++ if isinstance(ireq, InstallRequirement):
++ req = ireq
++ elif isinstance(ireq, ParsedRequirement):
++ req = install_req_from_parsed_requirement(ireq)
++ else:
++ raise Exception("Another internal API change, why do you "
++ "keep using internal APIs?")
+ if req.req is None:
+ req.req = SimpleNamespace(
+ name=req.link.url.split('/')[-1],