- 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
This commit is contained in:
parent
2499868206
commit
e34d27536a
37
README.md
37
README.md
@ -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"
|
||||
}
|
||||
]
|
||||
}
|
@ -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
|
||||
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e4a659df3db42a2ff9fbc961eb6d4076a0b945e1aadfc20d48f913ad5dca011d
|
||||
size 24039
|
BIN
pyjsparser-2.7.1.tar.gz
(Stored with Git LFS)
Normal file
BIN
pyjsparser-2.7.1.tar.gz
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat May 25 13:09:24 UTC 2019 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
- Update to 2.7.1:
|
||||
* no upstream changelog
|
||||
- Rebase fix_version.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Mar 14 16:38:43 UTC 2019 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user