From e34d27536ad6b56f60c4ede83044657e1744c205a5a7f09d987b06630e11c008 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Chv=C3=A1tal?= Date: Sat, 25 May 2019 13:12:23 +0000 Subject: [PATCH] - Update to 2.7.1: * no upstream changelog - Rebase fix_version.patch OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pyjsparser?expand=0&rev=7 --- README.md | 37 ------------------------------------- fix_version.patch | 17 +++++++++-------- pyjsparser-2.5.2.tar.gz | 3 --- pyjsparser-2.7.1.tar.gz | 3 +++ python-pyjsparser.changes | 7 +++++++ python-pyjsparser.spec | 11 ++++------- 6 files changed, 23 insertions(+), 55 deletions(-) delete mode 100644 README.md delete mode 100644 pyjsparser-2.5.2.tar.gz create mode 100644 pyjsparser-2.7.1.tar.gz diff --git a/README.md b/README.md deleted file mode 100644 index 2275af0..0000000 --- a/README.md +++ /dev/null @@ -1,37 +0,0 @@ -# pyjsparser -Fast JavaScript parser - manual translation of esprima.js to python. Takes 1 second to parse whole angular.js library so parsing speed is about 100k characters per second which makes it the fastest and most comprehensible JavaScript parser for python out there. - -Supports whole ECMAScript 5.1 and parts of ECMAScript 6. If you need full ECMA 6 support I recomment trying out [this](https://github.com/Kronuz/esprima-python) parser by Kronuz. - -# Installation - - pip install pyjsparser - -# Example - - >>> from pyjsparser import PyJsParser - >>> p = PyJsParser() - >>> p.parse('var $ = "Hello!"') - { - "type": "Program", - "body": [ - { - "type": "VariableDeclaration", - "declarations": [ - { - "type": "VariableDeclarator", - "id": { - "type": "Identifier", - "name": "$" - }, - "init": { - "type": "Literal", - "value": "Hello!", - "raw": '"Hello!"' - } - } - ], - "kind": "var" - } - ] - } diff --git a/fix_version.patch b/fix_version.patch index 41ea51b..b31acdf 100644 --- a/fix_version.patch +++ b/fix_version.patch @@ -1,12 +1,13 @@ -Index: pyjsparser-2.5.2/pyjsparser/__init__.py +Index: pyjsparser-2.7.1/pyjsparser/__init__.py =================================================================== ---- pyjsparser-2.5.2.orig/pyjsparser/__init__.py -+++ pyjsparser-2.5.2/pyjsparser/__init__.py -@@ -1,4 +1,4 @@ - __all__ = ['PyJsParser', 'parse', 'JsSyntaxError'] +--- pyjsparser-2.7.1.orig/pyjsparser/__init__.py ++++ pyjsparser-2.7.1/pyjsparser/__init__.py +@@ -1,5 +1,5 @@ + __all__ = ['PyJsParser', 'parse', 'JsSyntaxError', 'pyjsparserdata'] __author__ = 'Piotr Dabkowski' -__version__ = '2.2.0' --from .parser import PyJsParser, parse, JsSyntaxError ++__version__ = '2.7.1' + from .parser import PyJsParser, parse, JsSyntaxError +-from . import pyjsparserdata \ No newline at end of file -+__version__ = '2.5.2' -+from .parser import PyJsParser, parse, JsSyntaxError ++from . import pyjsparserdata diff --git a/pyjsparser-2.5.2.tar.gz b/pyjsparser-2.5.2.tar.gz deleted file mode 100644 index 93d05e3..0000000 --- a/pyjsparser-2.5.2.tar.gz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e4a659df3db42a2ff9fbc961eb6d4076a0b945e1aadfc20d48f913ad5dca011d -size 24039 diff --git a/pyjsparser-2.7.1.tar.gz b/pyjsparser-2.7.1.tar.gz new file mode 100644 index 0000000..5dcfe77 --- /dev/null +++ b/pyjsparser-2.7.1.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:be60da6b778cc5a5296a69d8e7d614f1f870faf94e1b1b6ac591f2ad5d729579 +size 24196 diff --git a/python-pyjsparser.changes b/python-pyjsparser.changes index 8304128..7d7a849 100644 --- a/python-pyjsparser.changes +++ b/python-pyjsparser.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Sat May 25 13:09:24 UTC 2019 - Tomáš Chvátal + +- Update to 2.7.1: + * no upstream changelog +- Rebase fix_version.patch + ------------------------------------------------------------------- Thu Mar 14 16:38:43 UTC 2019 - Jan Engelhardt diff --git a/python-pyjsparser.spec b/python-pyjsparser.spec index 2524719..f696890 100644 --- a/python-pyjsparser.spec +++ b/python-pyjsparser.spec @@ -18,21 +18,19 @@ %{?!python_module:%define python_module() python-%{**} python3-%{**}} Name: python-pyjsparser -Version: 2.5.2 +Version: 2.7.1 Release: 0 Summary: Javascript parser based on esprimajs License: MIT Group: Development/Languages/Python -Url: https://github.com/PiotrDabkowski/pyjsparser +URL: https://github.com/PiotrDabkowski/pyjsparser Source: https://files.pythonhosted.org/packages/source/p/pyjsparser/pyjsparser-%{version}.tar.gz -Source1: https://raw.githubusercontent.com/PiotrDabkowski/pyjsparser/master/LICENSE -Source2: https://raw.githubusercontent.com/PiotrDabkowski/pyjsparser/master/README.md +Source1: https://raw.githubusercontent.com/PiotrDabkowski/pyjsparser/master/LICENSE Patch0: fix_version.patch BuildRequires: %{python_module setuptools} BuildRequires: fdupes BuildRequires: python-rpm-macros BuildArch: noarch - %python_subpackages %description @@ -42,8 +40,7 @@ It supports the whole of ECMAScript 5.1 and parts of ECMAScript 6. %prep %setup -q -n pyjsparser-%{version} %patch0 -p1 -cp %{S:1} . -cp %{S:2} . +cp %{SOURCE1} . %build %python_build