[arch-commits] Commit in python-poetry/trunk (2 files)

Eli Schwartz eschwartz at archlinux.org
Tue Apr 28 02:12:35 UTC 2020


    Date: Tuesday, April 28, 2020 @ 02:12:32
  Author: eschwartz
Revision: 621956

upgpkg: python-poetry 1.0.5-2: fix tomlkit versioned dependency (FS#66431)

Move version patching to prepare via a patch, clean up setup.py generation (and
corresponding paths) a bit by switching back to dephell.

Added:
  python-poetry/trunk/0001-Suppress-dependency-versions-which-are-known-to-be-t.patch
Modified:
  python-poetry/trunk/PKGBUILD

-----------------------------------------------------------------+
 0001-Suppress-dependency-versions-which-are-known-to-be-t.patch |   50 ++++++++++
 PKGBUILD                                                        |   22 ++--
 2 files changed, 61 insertions(+), 11 deletions(-)

Added: 0001-Suppress-dependency-versions-which-are-known-to-be-t.patch
===================================================================
--- 0001-Suppress-dependency-versions-which-are-known-to-be-t.patch	                        (rev 0)
+++ 0001-Suppress-dependency-versions-which-are-known-to-be-t.patch	2020-04-28 02:12:32 UTC (rev 621956)
@@ -0,0 +1,50 @@
+From 983be1fa0e0780c816147d994e97846c8a2f6db9 Mon Sep 17 00:00:00 2001
+From: Eli Schwartz <eschwartz at archlinux.org>
+Date: Mon, 27 Apr 2020 21:51:57 -0400
+Subject: [PATCH] Suppress dependency versions which are known to be too
+ pessimistic
+
+These all work just fine in reported use and should not be pinned; we
+package versions in Arch which are "too new".
+---
+ pyproject.toml | 11 ++++-------
+ 1 file changed, 4 insertions(+), 7 deletions(-)
+
+diff --git a/pyproject.toml b/pyproject.toml
+index 519fb37..06a31c3 100644
+--- a/pyproject.toml
++++ b/pyproject.toml
+@@ -27,15 +27,15 @@ cleo = "^0.7.6"
+ clikit = "^0.4.2"
+ requests = "^2.18"
+ cachy = "^0.3.0"
+-requests-toolbelt = "^0.8.0"
++requests-toolbelt = "*"
+ jsonschema = "^3.1"
+-pyrsistent = "^0.14.2"
++pyrsistent = "*"
+ pyparsing = "^2.2"
+ cachecontrol = { version = "^0.12.4", extras = ["filecache"] }
+ pkginfo = "^1.4"
+ html5lib = "^1.0"
+ shellingham = "^1.1"
+-tomlkit = "^0.5.11"
++tomlkit = "*"
+ pexpect = "^4.7.0"
+ 
+ # The typing module is not in the stdlib in Python 2.7 and 3.4
+@@ -49,10 +49,7 @@ glob2 = { version = "^0.6", python = "~2.7 || ~3.4" }
+ virtualenv = { version = "^16.7.9", python = "~2.7" }
+ # functools32 is needed for Python 2.7
+ functools32 = { version = "^3.2.3", python = "~2.7" }
+-keyring = [
+-    { version = "^18.0.1", python = "~2.7 || ~3.4" },
+-    { version = "^20.0.1", python = "^3.5" }
+-]
++keyring = "*"
+ # Use subprocess32 for Python 2.7 and 3.4
+ subprocess32 = { version = "^3.5", python = "~2.7 || ~3.4" }
+ importlib-metadata = {version = "~1.1.3", python = "<3.8"}
+-- 
+2.26.2
+

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2020-04-28 01:36:16 UTC (rev 621955)
+++ PKGBUILD	2020-04-28 02:12:32 UTC (rev 621956)
@@ -4,7 +4,7 @@
 _pkgname=poetry
 pkgname=python-poetry
 pkgver=1.0.5
-pkgrel=1
+pkgrel=2
 pkgdesc="Python dependency management and packaging made easy"
 arch=('any')
 url="https://poetry.eustace.io/"
@@ -13,26 +13,32 @@
        'pkginfo' 'pyparsing' 'pyrsistent' 'requests' 'requests-toolbelt'
        'shellingham' 'tomlkit' 'keyring' 'pexpect')
 depends=("${_deps[@]/#/python-}")
+makedepends=('python-dephell')
 checkdepends=('git' 'python-pytest' 'python-pytest-mock' 'python-httpretty')
 provides=('poetry')
 conflicts=('poetry')
 replaces=('poetry')
 source=("${_pkgname}-${pkgver}.tar.gz::https://github.com/sdispater/${_pkgname}/archive/${pkgver}.tar.gz"
+        "0001-Suppress-dependency-versions-which-are-known-to-be-t.patch"
         "poetry-completions-generator")
 sha256sums=('9743e98177552ee6229cc05a35e6a8c7e4506280db66f0f7822ae1e48e651fdc'
+            'c53954bd03a76c72e279f046646b9144a592bd64d24717d778fda70eae75a519'
             '970225289188ea8dc49fbec8a2bfe0c891aee80ff56ba6e69bdd8afef8bccab6')
 b2sums=('7a53b6b60ec04e45b40bbf1be4147aa0f05fe34258c8dedc1235a8b2e67bdb13adc5e7fca48899a62c2fa822dc4124ac53aaabd0094244aa44ddff95bdd83173'
+        '1c4c3aa93a2be5bb586e9dbac34b808c417541261743042906a334a647103359302a5d68e9b3bd837907ea6ea3b86bc4b6b0b415cd2dff94bd64899f76aacbda'
         '3fd62e7936d7547dcd06a1a7519f176a1597553ecc959144a4be799bb7e2d688e187f14604d3e359ed10c128c722ebd588c07ca318e0be0a31d276dcb388e2e1')
 
 prepare() {
     cd "${srcdir}"/${_pkgname}-${pkgver}
 
-    python -m poetry build -f sdist
-    tar xf dist/${_pkgname}-${pkgver}.tar.gz
+    # fix various overly restrictive version pinning
+    patch -p1 -i ../0001-Suppress-dependency-versions-which-are-known-to-be-t.patch
+
+    dephell deps convert --from pyproject.toml --to setup.py
 }
 
 build() {
-    cd "${srcdir}"/${_pkgname}-${pkgver}/${_pkgname}-${pkgver}
+    cd "${srcdir}"/${_pkgname}-${pkgver}
 
     python setup.py build
 }
@@ -49,7 +55,7 @@
 }
 
 package() {
-    cd "${srcdir}"/${_pkgname}-${pkgver}/${_pkgname}-${pkgver}
+    cd "${srcdir}"/${_pkgname}-${pkgver}
 
     python setup.py install --root="${pkgdir}" --optimize=1 --skip-build
     install -Dm644 LICENSE "${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
@@ -64,10 +70,4 @@
         install -Dm644 /dev/stdin "${pkgdir}"/usr/share/zsh/site-functions/_poetry
     ./poetry-completions-generator completions fish | \
         install -Dm644 /dev/stdin "${pkgdir}"/usr/share/fish/vendor_completions.d/poetry.fish
-
-    sed -i \
-        -e "s/pyrsistent.*/pyrsistent/g" \
-        -e "s/requests-toolbelt.*/requests-toolbelt/g" \
-        -e "s/keyring.*/keyring/g" \
-        "${pkgdir}"/usr/lib/python3.8/site-packages/poetry-${pkgver}-py3.8.egg-info/requires.txt
 }



More information about the arch-commits mailing list