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

Antonio Rojas arojas at archlinux.org
Fri Nov 1 20:06:29 UTC 2019


    Date: Friday, November 1, 2019 @ 20:06:29
  Author: arojas
Revision: 522085

Fix metadata parsing with python 3.8

Added:
  python-dephell-discover/trunk/dephell_discover-python-3.8.patch
Modified:
  python-dephell-discover/trunk/PKGBUILD

-----------------------------------+
 PKGBUILD                          |   11 ++++++++---
 dephell_discover-python-3.8.patch |   22 ++++++++++++++++++++++
 2 files changed, 30 insertions(+), 3 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-11-01 19:57:01 UTC (rev 522084)
+++ PKGBUILD	2019-11-01 20:06:29 UTC (rev 522085)
@@ -11,13 +11,18 @@
 depends=('python-attrs')
 makedepends=('python-setuptools')
 checkdepends=('python-pytest')
-source=("https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/${_pkgname}/${_pkgname}-${pkgver}.tar.gz")
-sha256sums=('70347d511074c19a3facb16cd87f98c7077b76f3dfb6f4fc49e03392a81cb97d')
-b2sums=('3e739975095e4358ab8931a24fd7949b6b25faaeaeaf94f3a89f9b81d1eb6d0368c391aa440e9d498d5449cd0155a0524a5e7ca62cfa71239bdc83a60264afda')
+source=("https://files.pythonhosted.org/packages/source/${_pkgname:0:1}/${_pkgname}/${_pkgname}-${pkgver}.tar.gz"
+         dephell_discover-python-3.8.patch)
+sha256sums=('70347d511074c19a3facb16cd87f98c7077b76f3dfb6f4fc49e03392a81cb97d'
+            'a3ebca2fae6b43aa8c882ba8fa5d4dc0cbe5ad80f27dafe01a597cac2b2da8a7')
+b2sums=('3e739975095e4358ab8931a24fd7949b6b25faaeaeaf94f3a89f9b81d1eb6d0368c391aa440e9d498d5449cd0155a0524a5e7ca62cfa71239bdc83a60264afda'
+        'a1b218c4afdd995346cd67a505ac42147aa4609d5fb4c628fa4199fcd6df2f9ea4096104cb324fd6ac48e977ce8fa6de0a36191c55cda3301dc77e5a6c86b185')
 
 prepare() {
     cd "${srcdir}"/${_pkgname}-${pkgver}
 
+    # Fix metadata parsing, in python 3.8 ast.Constant is used for all constants
+    patch -p1 -i ../dephell_discover-python-3.8.patch
     # pycache slipped into release tarballs
     find . -name \*.pyc -delete
 }

Added: dephell_discover-python-3.8.patch
===================================================================
--- dephell_discover-python-3.8.patch	                        (rev 0)
+++ dephell_discover-python-3.8.patch	2019-11-01 20:06:29 UTC (rev 522085)
@@ -0,0 +1,22 @@
+diff --git a/dephell_discover/_line.py b/dephell_discover/_line.py
+index 6739c34..31c82e4 100644
+--- a/dephell_discover/_line.py
++++ b/dephell_discover/_line.py
+@@ -53,7 +53,7 @@ class Line:
+         value = tree.body[0].value  # type: ignore
+ 
+         # get string
+-        if type(value) is ast.Str:
++        if type(value) is ast.Constant:
+             return cls(
+                 target=target.id,
+                 value=value.s,
+@@ -65,7 +65,7 @@ class Line:
+         # get list
+         if type(value) is ast.List or type(value) is ast.Tuple:
+             for element in value.elts:
+-                if type(element) is not ast.Str:
++                if type(element) is not ast.Constant:
+                     return None
+             return cls(
+                 target=target.id,



More information about the arch-commits mailing list