[arch-commits] Commit in python-antlr4/repos (3 files)

Felix Yan felixonmars at archlinux.org
Thu Nov 12 18:10:25 UTC 2020


    Date: Thursday, November 12, 2020 @ 18:10:25
  Author: felixonmars
Revision: 752972

archrelease: copy trunk to community-staging-any

Added:
  python-antlr4/repos/community-staging-any/
  python-antlr4/repos/community-staging-any/PKGBUILD
    (from rev 752971, python-antlr4/trunk/PKGBUILD)
  python-antlr4/repos/community-staging-any/fix-tests.patch
    (from rev 752971, python-antlr4/trunk/fix-tests.patch)

-----------------+
 PKGBUILD        |   37 +++++++++++++++++++++++++++++++++++++
 fix-tests.patch |   53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 90 insertions(+)

Copied: python-antlr4/repos/community-staging-any/PKGBUILD (from rev 752971, python-antlr4/trunk/PKGBUILD)
===================================================================
--- community-staging-any/PKGBUILD	                        (rev 0)
+++ community-staging-any/PKGBUILD	2020-11-12 18:10:25 UTC (rev 752972)
@@ -0,0 +1,37 @@
+# Maintainer: Baptiste Jonglez <archlinux at bitsofnetworks dot org>
+
+_pkgname=antlr4
+pkgname=python-${_pkgname}
+pkgver=4.8
+pkgrel=2
+pkgdesc="ANTLR4 runtime for Python"
+arch=('any')
+url="https://www.antlr.org/"
+license=('BSD')
+depends=('python')
+makedepends=('python-setuptools')
+source=("${pkgname}-${pkgver}.tar.gz::https://github.com/antlr/${_pkgname}/archive/${pkgver}.tar.gz"
+        'fix-tests.patch')
+sha256sums=('992d52444b81ed75e52ea62f9f38ecb7652d5ce2a2130af143912b3042a6d77e'
+            'dd83a2cc00457123c8b52da018d05a7e80d251adba0f39bf287258f97892a698')
+
+prepare() {
+  patch -Np1 -i "${srcdir}"/fix-tests.patch -d "${srcdir}/${_pkgname}-${pkgver}"
+}
+
+build() {
+  cd "${srcdir}/${_pkgname}-${pkgver}/runtime/Python3"
+  python setup.py build
+}
+
+check() {
+  cd "${srcdir}/${_pkgname}-${pkgver}/runtime/Python3"
+  python setup.py test
+}
+
+package() {
+  cd "${srcdir}/${_pkgname}-${pkgver}/runtime/Python3"
+  python setup.py install --root="$pkgdir" --optimize=1 --skip-build
+  install -d "${pkgdir}/usr/share/licenses/${pkgname}"
+  install -Dm644 "${srcdir}/${_pkgname}-${pkgver}"/LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}"/LICENSE
+}

Copied: python-antlr4/repos/community-staging-any/fix-tests.patch (from rev 752971, python-antlr4/trunk/fix-tests.patch)
===================================================================
--- community-staging-any/fix-tests.patch	                        (rev 0)
+++ community-staging-any/fix-tests.patch	2020-11-12 18:10:25 UTC (rev 752972)
@@ -0,0 +1,53 @@
+diff -aur antlr4-4.8-old/runtime/Python3/test/ctest.py antlr4-4.8-new/runtime/Python3/test/ctest.py
+--- antlr4-4.8-old/runtime/Python3/test/ctest.py	2020-01-19 18:18:55.000000000 +0200
++++ antlr4-4.8-new/runtime/Python3/test/ctest.py	2020-06-30 16:32:13.862026103 +0300
+@@ -7,8 +7,8 @@
+ import sys
+ sys.setrecursionlimit(4000)
+ import antlr4
+-from parser.cparser import CParser
+-from parser.clexer import CLexer
++from .parser.cparser import CParser
++from .parser.clexer import CLexer
+ from datetime import datetime
+ import cProfile
+ 
+diff -aur antlr4-4.8-old/runtime/Python3/test/run.py antlr4-4.8-new/runtime/Python3/test/run.py
+--- antlr4-4.8-old/runtime/Python3/test/run.py	2020-01-19 18:18:55.000000000 +0200
++++ antlr4-4.8-new/runtime/Python3/test/run.py	2020-06-30 16:32:26.675359328 +0300
+@@ -3,6 +3,6 @@
+ src_path = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), 'src')
+ sys.path.insert(0,src_path)
+ from TestTokenStreamRewriter import TestTokenStreamRewriter
+-from xpathtest import XPathTest
++from .xpathtest import XPathTest
+ import unittest
+-unittest.main()
+\ No newline at end of file
++unittest.main()
+diff -aur antlr4-4.8-old/runtime/Python3/test/TestTokenStreamRewriter.py antlr4-4.8-new/runtime/Python3/test/TestTokenStreamRewriter.py
+--- antlr4-4.8-old/runtime/Python3/test/TestTokenStreamRewriter.py	2020-01-19 18:18:55.000000000 +0200
++++ antlr4-4.8-new/runtime/Python3/test/TestTokenStreamRewriter.py	2020-06-30 16:32:36.462025917 +0300
+@@ -5,7 +5,7 @@
+ import unittest
+ 
+ 
+-from mocks.TestLexer import TestLexer, TestLexer2
++from .mocks.TestLexer import TestLexer, TestLexer2
+ from antlr4.TokenStreamRewriter import TokenStreamRewriter
+ from antlr4.InputStream import InputStream
+ from antlr4.CommonTokenStream import CommonTokenStream
+diff -aur antlr4-4.8-old/runtime/Python3/test/xpathtest.py antlr4-4.8-new/runtime/Python3/test/xpathtest.py
+--- antlr4-4.8-old/runtime/Python3/test/xpathtest.py	2020-01-19 18:18:55.000000000 +0200
++++ antlr4-4.8-new/runtime/Python3/test/xpathtest.py	2020-06-30 16:32:44.398692519 +0300
+@@ -2,8 +2,8 @@
+ from antlr4 import InputStream, CommonTokenStream, TerminalNode
+ from antlr4.xpath.XPath import XPath
+ import unittest
+-from expr.ExprParser import ExprParser
+-from expr.ExprLexer  import ExprLexer
++from .expr.ExprParser import ExprParser
++from .expr.ExprLexer  import ExprLexer
+ 
+ def tokenToString(token, ruleNames):
+     if isinstance(token, TerminalNode):



More information about the arch-commits mailing list