diff options
author | CoprDistGit <infra@openeuler.org> | 2023-06-20 08:53:25 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-06-20 08:53:25 +0000 |
commit | 1ce9676d4e8bbcba02bce74eae4a169aeec3e15c (patch) | |
tree | 2547664165779716af21b1fca1b1aef4dfbe1102 | |
parent | cfae404dd3db7a6c7f1c5e877af8521a181e0205 (diff) |
automatic import of python-nrpylatexopeneuler20.03
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-nrpylatex.spec | 196 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 198 insertions, 0 deletions
@@ -0,0 +1 @@ +/nrpylatex-1.3.post1.tar.gz diff --git a/python-nrpylatex.spec b/python-nrpylatex.spec new file mode 100644 index 0000000..2923b06 --- /dev/null +++ b/python-nrpylatex.spec @@ -0,0 +1,196 @@ +%global _empty_manifest_terminate_build 0 +Name: python-nrpylatex +Version: 1.3.post1 +Release: 1 +Summary: LaTeX Interface to SymPy (CAS) for General Relativity +License: BSD License (BSD) +URL: https://github.com/zachetienne/nrpylatex +Source0: https://mirrors.aliyun.com/pypi/web/packages/aa/de/859741f6b9cc873b1830cb28f0f33dd6e3bb0580baf7db31bb3acdd7a2e6/nrpylatex-1.3.post1.tar.gz +BuildArch: noarch + +Requires: python3-sympy + +%description +[](https://github.com/zachetienne/nrpylatex/actions/workflows/main.yaml) +[](https://pypi.org/project/nrpylatex/) +[](https://mybinder.org/v2/gh/zachetienne/nrpylatex.git/HEAD?filepath=docs%2FNRPyLaTeX%20Tutorial.ipynb) +[](https://arxiv.org/abs/2111.05861) +[NRPy+](https://github.com/zachetienne/nrpytutorial)'s LaTeX Interface to SymPy (CAS) for General Relativity +- automatic expansion of + - [Einstein summation convention](https://en.wikipedia.org/wiki/Einstein_notation) + - Levi-Civita and Christoffel symbols + - Lie and covariant derivatives + - metric inverse and determinant +- automatic index raising and lowering +- arbitrary coordinate system (default) +- exception handling and debugging +## § Installation +To install **NRPyLaTeX** using [PyPI](https://pypi.org/project/nrpylatex/), run the following command in the terminal + $ pip install nrpylatex +## § Exporting (CAS) +If you are using Mathematica instead of SymPy, run the following code to convert your output + from sympy import mathematica_code + namespace = parse_latex(...) + for var in namespace: + exec(f'{var} = mathematica_code({var})') +If you are using a different CAS, reference the SymPy [documentation](https://docs.sympy.org/latest/modules/printing.html) to find the relevant printing function. +## § Interactive Tutorial (MyBinder) +[Quick Start](https://mybinder.org/v2/gh/zachetienne/nrpylatex.git/HEAD?filepath=docs%2FNRPyLaTeX%20Tutorial.ipynb) | [NRPy+ Integration](https://mybinder.org/v2/gh/zachetienne/nrpytutorial/HEAD?filepath=Tutorial-SymPy_LaTeX_Interface.ipynb) | [Guided Example (BSSN Formalism)](https://mybinder.org/v2/gh/zachetienne/nrpytutorial/HEAD?filepath=Tutorial-LaTeX_Interface_Example-BSSN_Cartesian.ipynb) +## § Documentation and Usage +[Getting Started and API Reference](https://zachetienne.github.io/nrpylatex/) +### Simple Example ([Kretschmann Scalar](https://en.wikipedia.org/wiki/Kretschmann_scalar)) +**Python REPL or Script (*.py)** + >>> from nrpylatex import parse_latex + >>> parse_latex(r""" + ('G', 'GammaUDD', 'gDD', 'gUU', 'epsilonUUUU', 'RUDDD', 'K', 'RUUUU', 'M', 'r', 'theta', 'RDDDD', 'gdet') + >>> from sympy import simplify + >>> print(simplify(K)) + 48*G**2*M**2/r**6 +**IPython REPL or Jupyter Notebook** + In [1]: %load_ext nrpylatex + In [2]: %%parse_latex + Out[2]: ('G', 'GammaUDD', 'gDD', 'gUU', 'epsilonUUUU', 'RUDDD', 'K', 'RUUUU', 'M', 'r', 'theta', 'RDDDD', 'gdet') + In [3]: from sympy import simplify + In [4]: print(simplify(K)) + Out[4]: 48*G**2*M**2/r**6 + +%package -n python3-nrpylatex +Summary: LaTeX Interface to SymPy (CAS) for General Relativity +Provides: python-nrpylatex +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-nrpylatex +[](https://github.com/zachetienne/nrpylatex/actions/workflows/main.yaml) +[](https://pypi.org/project/nrpylatex/) +[](https://mybinder.org/v2/gh/zachetienne/nrpylatex.git/HEAD?filepath=docs%2FNRPyLaTeX%20Tutorial.ipynb) +[](https://arxiv.org/abs/2111.05861) +[NRPy+](https://github.com/zachetienne/nrpytutorial)'s LaTeX Interface to SymPy (CAS) for General Relativity +- automatic expansion of + - [Einstein summation convention](https://en.wikipedia.org/wiki/Einstein_notation) + - Levi-Civita and Christoffel symbols + - Lie and covariant derivatives + - metric inverse and determinant +- automatic index raising and lowering +- arbitrary coordinate system (default) +- exception handling and debugging +## § Installation +To install **NRPyLaTeX** using [PyPI](https://pypi.org/project/nrpylatex/), run the following command in the terminal + $ pip install nrpylatex +## § Exporting (CAS) +If you are using Mathematica instead of SymPy, run the following code to convert your output + from sympy import mathematica_code + namespace = parse_latex(...) + for var in namespace: + exec(f'{var} = mathematica_code({var})') +If you are using a different CAS, reference the SymPy [documentation](https://docs.sympy.org/latest/modules/printing.html) to find the relevant printing function. +## § Interactive Tutorial (MyBinder) +[Quick Start](https://mybinder.org/v2/gh/zachetienne/nrpylatex.git/HEAD?filepath=docs%2FNRPyLaTeX%20Tutorial.ipynb) | [NRPy+ Integration](https://mybinder.org/v2/gh/zachetienne/nrpytutorial/HEAD?filepath=Tutorial-SymPy_LaTeX_Interface.ipynb) | [Guided Example (BSSN Formalism)](https://mybinder.org/v2/gh/zachetienne/nrpytutorial/HEAD?filepath=Tutorial-LaTeX_Interface_Example-BSSN_Cartesian.ipynb) +## § Documentation and Usage +[Getting Started and API Reference](https://zachetienne.github.io/nrpylatex/) +### Simple Example ([Kretschmann Scalar](https://en.wikipedia.org/wiki/Kretschmann_scalar)) +**Python REPL or Script (*.py)** + >>> from nrpylatex import parse_latex + >>> parse_latex(r""" + ('G', 'GammaUDD', 'gDD', 'gUU', 'epsilonUUUU', 'RUDDD', 'K', 'RUUUU', 'M', 'r', 'theta', 'RDDDD', 'gdet') + >>> from sympy import simplify + >>> print(simplify(K)) + 48*G**2*M**2/r**6 +**IPython REPL or Jupyter Notebook** + In [1]: %load_ext nrpylatex + In [2]: %%parse_latex + Out[2]: ('G', 'GammaUDD', 'gDD', 'gUU', 'epsilonUUUU', 'RUDDD', 'K', 'RUUUU', 'M', 'r', 'theta', 'RDDDD', 'gdet') + In [3]: from sympy import simplify + In [4]: print(simplify(K)) + Out[4]: 48*G**2*M**2/r**6 + +%package help +Summary: Development documents and examples for nrpylatex +Provides: python3-nrpylatex-doc +%description help +[](https://github.com/zachetienne/nrpylatex/actions/workflows/main.yaml) +[](https://pypi.org/project/nrpylatex/) +[](https://mybinder.org/v2/gh/zachetienne/nrpylatex.git/HEAD?filepath=docs%2FNRPyLaTeX%20Tutorial.ipynb) +[](https://arxiv.org/abs/2111.05861) +[NRPy+](https://github.com/zachetienne/nrpytutorial)'s LaTeX Interface to SymPy (CAS) for General Relativity +- automatic expansion of + - [Einstein summation convention](https://en.wikipedia.org/wiki/Einstein_notation) + - Levi-Civita and Christoffel symbols + - Lie and covariant derivatives + - metric inverse and determinant +- automatic index raising and lowering +- arbitrary coordinate system (default) +- exception handling and debugging +## § Installation +To install **NRPyLaTeX** using [PyPI](https://pypi.org/project/nrpylatex/), run the following command in the terminal + $ pip install nrpylatex +## § Exporting (CAS) +If you are using Mathematica instead of SymPy, run the following code to convert your output + from sympy import mathematica_code + namespace = parse_latex(...) + for var in namespace: + exec(f'{var} = mathematica_code({var})') +If you are using a different CAS, reference the SymPy [documentation](https://docs.sympy.org/latest/modules/printing.html) to find the relevant printing function. +## § Interactive Tutorial (MyBinder) +[Quick Start](https://mybinder.org/v2/gh/zachetienne/nrpylatex.git/HEAD?filepath=docs%2FNRPyLaTeX%20Tutorial.ipynb) | [NRPy+ Integration](https://mybinder.org/v2/gh/zachetienne/nrpytutorial/HEAD?filepath=Tutorial-SymPy_LaTeX_Interface.ipynb) | [Guided Example (BSSN Formalism)](https://mybinder.org/v2/gh/zachetienne/nrpytutorial/HEAD?filepath=Tutorial-LaTeX_Interface_Example-BSSN_Cartesian.ipynb) +## § Documentation and Usage +[Getting Started and API Reference](https://zachetienne.github.io/nrpylatex/) +### Simple Example ([Kretschmann Scalar](https://en.wikipedia.org/wiki/Kretschmann_scalar)) +**Python REPL or Script (*.py)** + >>> from nrpylatex import parse_latex + >>> parse_latex(r""" + ('G', 'GammaUDD', 'gDD', 'gUU', 'epsilonUUUU', 'RUDDD', 'K', 'RUUUU', 'M', 'r', 'theta', 'RDDDD', 'gdet') + >>> from sympy import simplify + >>> print(simplify(K)) + 48*G**2*M**2/r**6 +**IPython REPL or Jupyter Notebook** + In [1]: %load_ext nrpylatex + In [2]: %%parse_latex + Out[2]: ('G', 'GammaUDD', 'gDD', 'gUU', 'epsilonUUUU', 'RUDDD', 'K', 'RUUUU', 'M', 'r', 'theta', 'RDDDD', 'gdet') + In [3]: from sympy import simplify + In [4]: print(simplify(K)) + Out[4]: 48*G**2*M**2/r**6 + +%prep +%autosetup -n nrpylatex-1.3.post1 + +%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-nrpylatex -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Tue Jun 20 2023 Python_Bot <Python_Bot@openeuler.org> - 1.3.post1-1 +- Package Spec generated @@ -0,0 +1 @@ +d1c3d926c6ae05516ae960d5387aa523 nrpylatex-1.3.post1.tar.gz |