From 7e3e3c89a2c4ea929272766f1a5908f95745e9a6 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Mon, 10 Apr 2023 23:42:50 +0000 Subject: automatic import of python-esprima --- .gitignore | 1 + python-esprima.spec | 420 ++++++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 422 insertions(+) create mode 100644 python-esprima.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..535b20a 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/esprima-4.0.1.tar.gz diff --git a/python-esprima.spec b/python-esprima.spec new file mode 100644 index 0000000..0e3f9b1 --- /dev/null +++ b/python-esprima.spec @@ -0,0 +1,420 @@ +%global _empty_manifest_terminate_build 0 +Name: python-esprima +Version: 4.0.1 +Release: 1 +Summary: ECMAScript parsing infrastructure for multipurpose analysis in Python +License: BSD License +URL: https://github.com/Kronuz/esprima-python +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/cc/a1/50fccd68a12bcfc27adfc9969c090286670a9109a0259f3f70943390b721/esprima-4.0.1.tar.gz +BuildArch: noarch + + +%description +|Donate| |PyPI Version| |PyPI License| |PyPI Format| |PyPI Status| + +**Esprima** (`esprima.org `__, BSD license) is a +high performance, standard-compliant +`ECMAScript `__ +parser officially written in ECMAScript (also popularly known as +`JavaScript `__) and ported to +Python. Esprima is created and maintained by `Ariya +Hidayat `__, with the help of `many +contributors `__. + +Python port is a line-by-line manual translation and was created and is +maintained by `German Mendez Bravo +(Kronuz) `__. + +Features +~~~~~~~~ + +- Full support for ECMAScript 2017 (`ECMA-262 8th + Edition `__) +- Sensible `syntax tree + format `__ as + standardized by `ESTree project `__ +- Experimental support for `JSX `__, a + syntax extension for `React `__ +- Optional tracking of syntax node location (index-based and + line-column) +- `Heavily tested `__ (~1500 `unit + tests `__ + with `full code + coverage `__) + +Installation +~~~~~~~~~~~~ + +.. code:: shell + + pip install esprima + +API +~~~ + +Esprima can be used to perform `lexical +analysis `__ +(tokenization) or `syntactic +analysis `__ (parsing) of a +JavaScript program. + +A simple example: + +.. code:: javascript + + >>> import esprima + >>> program = 'const answer = 42' + + >>> esprima.tokenize(program) + [{ + type: "Keyword", + value: "const" + }, { + type: "Identifier", + value: "answer" + }, { + type: "Punctuator", + value: "=" + }, { + type: "Numeric", + value: "42" + }] + + >>> esprima.parseScript(program) + { + body: [ + { + kind: "const", + declarations: [ + { + init: { + raw: "42", + type: "Literal", + value: 42 + }, + type: "VariableDeclarator", + id: { + type: "Identifier", + name: "answer" + } + } + ], + type: "VariableDeclaration" + } + ], + type: "Program", + sourceType: "script" + } + +For more information, please read the `complete +documentation `__. + +.. |Donate| image:: https://img.shields.io/badge/Donate-PayPal-green.svg + :target: https://www.paypal.me/Kronuz/25 +.. |PyPI Version| image:: https://img.shields.io/pypi/v/esprima.svg + :target: https://pypi.python.org/pypi/esprima +.. |PyPI License| image:: https://img.shields.io/pypi/l/esprima.svg + :target: https://pypi.python.org/pypi/esprima +.. |PyPI Wheel| image:: https://img.shields.io/pypi/wheel/esprima.svg + :target: https://pypi.python.org/pypi/esprima +.. |PyPI Format| image:: https://img.shields.io/pypi/format/esprima.svg + :target: https://pypi.python.org/pypi/esprima +.. |PyPI Python Version| image:: https://img.shields.io/pypi/pyversions/esprima.svg + :target: https://pypi.python.org/pypi/esprima +.. |PyPI Implementation| image:: https://img.shields.io/pypi/implementation/esprima.svg + :target: https://pypi.python.org/pypi/esprima +.. |PyPI Status| image:: https://img.shields.io/pypi/status/esprima.svg + :target: https://pypi.python.org/pypi/esprima +.. |PyPI Downloads| image:: https://img.shields.io/pypi/dm/esprima.svg + :target: https://pypi.python.org/pypi/esprima + +%package -n python3-esprima +Summary: ECMAScript parsing infrastructure for multipurpose analysis in Python +Provides: python-esprima +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-esprima +|Donate| |PyPI Version| |PyPI License| |PyPI Format| |PyPI Status| + +**Esprima** (`esprima.org `__, BSD license) is a +high performance, standard-compliant +`ECMAScript `__ +parser officially written in ECMAScript (also popularly known as +`JavaScript `__) and ported to +Python. Esprima is created and maintained by `Ariya +Hidayat `__, with the help of `many +contributors `__. + +Python port is a line-by-line manual translation and was created and is +maintained by `German Mendez Bravo +(Kronuz) `__. + +Features +~~~~~~~~ + +- Full support for ECMAScript 2017 (`ECMA-262 8th + Edition `__) +- Sensible `syntax tree + format `__ as + standardized by `ESTree project `__ +- Experimental support for `JSX `__, a + syntax extension for `React `__ +- Optional tracking of syntax node location (index-based and + line-column) +- `Heavily tested `__ (~1500 `unit + tests `__ + with `full code + coverage `__) + +Installation +~~~~~~~~~~~~ + +.. code:: shell + + pip install esprima + +API +~~~ + +Esprima can be used to perform `lexical +analysis `__ +(tokenization) or `syntactic +analysis `__ (parsing) of a +JavaScript program. + +A simple example: + +.. code:: javascript + + >>> import esprima + >>> program = 'const answer = 42' + + >>> esprima.tokenize(program) + [{ + type: "Keyword", + value: "const" + }, { + type: "Identifier", + value: "answer" + }, { + type: "Punctuator", + value: "=" + }, { + type: "Numeric", + value: "42" + }] + + >>> esprima.parseScript(program) + { + body: [ + { + kind: "const", + declarations: [ + { + init: { + raw: "42", + type: "Literal", + value: 42 + }, + type: "VariableDeclarator", + id: { + type: "Identifier", + name: "answer" + } + } + ], + type: "VariableDeclaration" + } + ], + type: "Program", + sourceType: "script" + } + +For more information, please read the `complete +documentation `__. + +.. |Donate| image:: https://img.shields.io/badge/Donate-PayPal-green.svg + :target: https://www.paypal.me/Kronuz/25 +.. |PyPI Version| image:: https://img.shields.io/pypi/v/esprima.svg + :target: https://pypi.python.org/pypi/esprima +.. |PyPI License| image:: https://img.shields.io/pypi/l/esprima.svg + :target: https://pypi.python.org/pypi/esprima +.. |PyPI Wheel| image:: https://img.shields.io/pypi/wheel/esprima.svg + :target: https://pypi.python.org/pypi/esprima +.. |PyPI Format| image:: https://img.shields.io/pypi/format/esprima.svg + :target: https://pypi.python.org/pypi/esprima +.. |PyPI Python Version| image:: https://img.shields.io/pypi/pyversions/esprima.svg + :target: https://pypi.python.org/pypi/esprima +.. |PyPI Implementation| image:: https://img.shields.io/pypi/implementation/esprima.svg + :target: https://pypi.python.org/pypi/esprima +.. |PyPI Status| image:: https://img.shields.io/pypi/status/esprima.svg + :target: https://pypi.python.org/pypi/esprima +.. |PyPI Downloads| image:: https://img.shields.io/pypi/dm/esprima.svg + :target: https://pypi.python.org/pypi/esprima + +%package help +Summary: Development documents and examples for esprima +Provides: python3-esprima-doc +%description help +|Donate| |PyPI Version| |PyPI License| |PyPI Format| |PyPI Status| + +**Esprima** (`esprima.org `__, BSD license) is a +high performance, standard-compliant +`ECMAScript `__ +parser officially written in ECMAScript (also popularly known as +`JavaScript `__) and ported to +Python. Esprima is created and maintained by `Ariya +Hidayat `__, with the help of `many +contributors `__. + +Python port is a line-by-line manual translation and was created and is +maintained by `German Mendez Bravo +(Kronuz) `__. + +Features +~~~~~~~~ + +- Full support for ECMAScript 2017 (`ECMA-262 8th + Edition `__) +- Sensible `syntax tree + format `__ as + standardized by `ESTree project `__ +- Experimental support for `JSX `__, a + syntax extension for `React `__ +- Optional tracking of syntax node location (index-based and + line-column) +- `Heavily tested `__ (~1500 `unit + tests `__ + with `full code + coverage `__) + +Installation +~~~~~~~~~~~~ + +.. code:: shell + + pip install esprima + +API +~~~ + +Esprima can be used to perform `lexical +analysis `__ +(tokenization) or `syntactic +analysis `__ (parsing) of a +JavaScript program. + +A simple example: + +.. code:: javascript + + >>> import esprima + >>> program = 'const answer = 42' + + >>> esprima.tokenize(program) + [{ + type: "Keyword", + value: "const" + }, { + type: "Identifier", + value: "answer" + }, { + type: "Punctuator", + value: "=" + }, { + type: "Numeric", + value: "42" + }] + + >>> esprima.parseScript(program) + { + body: [ + { + kind: "const", + declarations: [ + { + init: { + raw: "42", + type: "Literal", + value: 42 + }, + type: "VariableDeclarator", + id: { + type: "Identifier", + name: "answer" + } + } + ], + type: "VariableDeclaration" + } + ], + type: "Program", + sourceType: "script" + } + +For more information, please read the `complete +documentation `__. + +.. |Donate| image:: https://img.shields.io/badge/Donate-PayPal-green.svg + :target: https://www.paypal.me/Kronuz/25 +.. |PyPI Version| image:: https://img.shields.io/pypi/v/esprima.svg + :target: https://pypi.python.org/pypi/esprima +.. |PyPI License| image:: https://img.shields.io/pypi/l/esprima.svg + :target: https://pypi.python.org/pypi/esprima +.. |PyPI Wheel| image:: https://img.shields.io/pypi/wheel/esprima.svg + :target: https://pypi.python.org/pypi/esprima +.. |PyPI Format| image:: https://img.shields.io/pypi/format/esprima.svg + :target: https://pypi.python.org/pypi/esprima +.. |PyPI Python Version| image:: https://img.shields.io/pypi/pyversions/esprima.svg + :target: https://pypi.python.org/pypi/esprima +.. |PyPI Implementation| image:: https://img.shields.io/pypi/implementation/esprima.svg + :target: https://pypi.python.org/pypi/esprima +.. |PyPI Status| image:: https://img.shields.io/pypi/status/esprima.svg + :target: https://pypi.python.org/pypi/esprima +.. |PyPI Downloads| image:: https://img.shields.io/pypi/dm/esprima.svg + :target: https://pypi.python.org/pypi/esprima + +%prep +%autosetup -n esprima-4.0.1 + +%build +%py3_build + +%install +%py3_install +install -d -m755 %{buildroot}/%{_pkgdocdir} +if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi +if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi +if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi +if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi +pushd %{buildroot} +if [ -d usr/lib ]; then + find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/lib64 ]; then + find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/bin ]; then + find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst +fi +if [ -d usr/sbin ]; then + find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst +fi +touch doclist.lst +if [ -d usr/share/man ]; then + find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst +fi +popd +mv %{buildroot}/filelist.lst . +mv %{buildroot}/doclist.lst . + +%files -n python3-esprima -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Mon Apr 10 2023 Python_Bot - 4.0.1-1 +- Package Spec generated diff --git a/sources b/sources new file mode 100644 index 0000000..830f316 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +47b70d12b8af1cc631842f4a947a6e48 esprima-4.0.1.tar.gz -- cgit v1.2.3