[arch-commits] Commit in hy/repos (3 files)
Felix Yan
felixonmars at archlinux.org
Sun Nov 10 08:31:24 UTC 2019
Date: Sunday, November 10, 2019 @ 08:31:24
Author: felixonmars
Revision: 524937
archrelease: copy trunk to community-staging-any
Added:
hy/repos/community-staging-any/
hy/repos/community-staging-any/PKGBUILD
(from rev 524936, hy/trunk/PKGBUILD)
hy/repos/community-staging-any/python-3.8.patch
(from rev 524936, hy/trunk/python-3.8.patch)
------------------+
PKGBUILD | 46 +++++++++++++++++++++++++++++++++
python-3.8.patch | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 119 insertions(+)
Copied: hy/repos/community-staging-any/PKGBUILD (from rev 524936, hy/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD (rev 0)
+++ community-staging-any/PKGBUILD 2019-11-10 08:31:24 UTC (rev 524937)
@@ -0,0 +1,46 @@
+# Maintainer: Morten Linderud <foxboron at archlinux.org>
+# Contributor: JP Cimalando <jp-dev at inbox.ru>
+
+pkgname=hy
+pkgver=0.17.0
+pkgrel=2
+pkgdesc="A dialect of Lisp that's embedded in Python"
+arch=('any')
+url="http://hylang.org/"
+license=('MIT')
+depends=('python-rply' 'python-astor' 'python-clint' 'python-funcparserlib')
+makedepends=('python-setuptools')
+checkdepends=('python-pytest' 'python-pytest-runner')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/hylang/hy/archive/$pkgver.tar.gz"
+ python-3.8.patch)
+md5sums=('fc719573093f14caba2fade84a8d11e9'
+ '5f8c4d26d959168f88faaccc8b4dfb6c')
+
+prepare() {
+ cd "$pkgname-$pkgver"
+
+ patch -Np1 -i ../python-3.8.patch
+
+ # usually generated from git metadata and aded to PyPI sdist
+ # PyPI does not include testsuite files.
+ echo "__version__ = '$pkgver'" > hy/version.py
+}
+
+build() {
+ cd "$pkgname-$pkgver"
+ python setup.py build
+}
+
+check(){
+ cd "$pkgname-$pkgver"
+ python setup.py develop --user
+ PATH="$HOME/.local/bin:$PATH"
+ python setup.py pytest #--addopts "-k 'not test_bin'"
+}
+
+package() {
+ cd "$pkgname-$pkgver"
+ python setup.py install --root="$pkgdir/" --optimize=1 --skip-build
+ install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+ rm -rf "$pkgdir/usr/get_version"
+}
Copied: hy/repos/community-staging-any/python-3.8.patch (from rev 524936, hy/trunk/python-3.8.patch)
===================================================================
--- community-staging-any/python-3.8.patch (rev 0)
+++ community-staging-any/python-3.8.patch 2019-11-10 08:31:24 UTC (rev 524937)
@@ -0,0 +1,73 @@
+From 563f27632c95d709f6685e469b7c1e97be1c38e7 Mon Sep 17 00:00:00 2001
+From: Kodi Arfer <git at arfer.net>
+Date: Tue, 4 Jun 2019 16:03:52 -0400
+Subject: [PATCH 1/2] Fix crashes on the new Python 3.8 alpha
+
+---
+ hy/_compat.py | 4 +++-
+ hy/compiler.py | 3 ++-
+ 2 files changed, 5 insertions(+), 2 deletions(-)
+
+diff --git a/hy/_compat.py b/hy/_compat.py
+index a2ab7a5..da31477 100644
+--- a/hy/_compat.py
++++ b/hy/_compat.py
+@@ -37,10 +37,12 @@ if PY3:
+ finally:
+ traceback = None
+
+- code_obj_args = ['argcount', 'kwonlyargcount', 'nlocals', 'stacksize',
++ code_obj_args = ['argcount', 'posonlyargcount', 'kwonlyargcount', 'nlocals', 'stacksize',
+ 'flags', 'code', 'consts', 'names', 'varnames',
+ 'filename', 'name', 'firstlineno', 'lnotab', 'freevars',
+ 'cellvars']
++ if not PY38:
++ code_obj_args.remove("posonlyargcount")
+ else:
+ def raise_from(value, from_value=None):
+ raise value
+diff --git a/hy/compiler.py b/hy/compiler.py
+index 9a20daf..ddb75da 100755
+--- a/hy/compiler.py
++++ b/hy/compiler.py
+@@ -1145,7 +1145,7 @@ class HyASTCompiler(object):
+ expr,
+ name=fname,
+ args=ast.arguments(
+- args=[], vararg=None, kwarg=None,
++ args=[], vararg=None, kwarg=None, posonlyargs=[],
+ kwonlyargs=[], kw_defaults=[], defaults=[]),
+ body=f(parts).stmts,
+ decorator_list=[])
+@@ -1524,6 +1524,7 @@ class HyASTCompiler(object):
+ args = ast.arguments(
+ args=main_args, defaults=defaults,
+ vararg=rest,
++ posonlyargs=[],
+ kwonlyargs=kwonly, kw_defaults=kw_defaults,
+ kwarg=kwargs)
+
+
+From 9af02dd0a4e8ffe8234e42cf834fbdcf1e12b301 Mon Sep 17 00:00:00 2001
+From: Kodi Arfer <git at arfer.net>
+Date: Mon, 10 Jun 2019 16:12:46 -0400
+Subject: [PATCH 2/2] Fix a test for Python 3.8.0b1
+
+`int`, among other types, no longer has a `__str__` method, so `(str '3)` now returns "(HyInteger 3)" instead of "3".
+---
+ tests/native_tests/native_macros.hy | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/native_tests/native_macros.hy b/tests/native_tests/native_macros.hy
+index 835939e..e320143 100644
+--- a/tests/native_tests/native_macros.hy
++++ b/tests/native_tests/native_macros.hy
+@@ -391,7 +391,7 @@ in expansions."
+ ;; Now, let's use a `require`d macro that depends on another macro defined only
+ ;; in this scope.
+ (defmacro local-test-macro [x]
+- (.format "This is the local version of `nonlocal-test-macro` returning {}!" x))
++ (.format "This is the local version of `nonlocal-test-macro` returning {}!" (int x)))
+
+ (assert (= "This is the local version of `nonlocal-test-macro` returning 3!"
+ (test-module-macro-2 3)))
More information about the arch-commits
mailing list