From 9bedbedfc7aa699d1463b5197b27306829a0ae32 Mon Sep 17 00:00:00 2001 From: CoprDistGit Date: Wed, 10 May 2023 06:56:32 +0000 Subject: automatic import of python-pyslvs --- .gitignore | 1 + python-pyslvs.spec | 211 +++++++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 213 insertions(+) create mode 100644 python-pyslvs.spec create mode 100644 sources diff --git a/.gitignore b/.gitignore index e69de29..142c3f1 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1 @@ +/pyslvs-22.7.0.tar.gz diff --git a/python-pyslvs.spec b/python-pyslvs.spec new file mode 100644 index 0000000..4d5bc42 --- /dev/null +++ b/python-pyslvs.spec @@ -0,0 +1,211 @@ +%global _empty_manifest_terminate_build 0 +Name: python-pyslvs +Version: 22.7.0 +Release: 1 +Summary: Pyslvs core module. An open source planar linkage mechanism synthesis tool. +License: AGPL +URL: https://github.com/KmolYuan/pyslvs +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/bb/8c/c01ec1fe1487cac76b7091b9b453023a243807b10599b2d6c2aca16a9f21/pyslvs-22.7.0.tar.gz + +Requires: python3-numpy +Requires: python3-lark-parser + +%description +[![PyPI](https://img.shields.io/pypi/v/pyslvs.svg)](https://pypi.org/project/pyslvs/) +[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/KmolYuan/pyslvs.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/KmolYuan/pyslvs/context:python) + +# Pyslvs Libraries + +A no-GUI module of mechanism synthesis system and a 2D geometric constraint solver. + +## Installation + +Install from PyPI: + +```bash +pip install pyslvs +``` + +Or install and test from source: + +```bash +pip install -e . +python test +``` + +## Documentation + +Run the solver through an example: + +```python +from pyslvs import example_list, parse_vpoints, t_config, expr_solving + +# Get example with name +expr, inputs = example_list("Jansen's linkage (Single)") +# Parse the mechanism expression into a list of joint data +vpoints = parse_vpoints(expr) +# Config joint data and control data for the solver +exprs = t_config(vpoints, inputs) +# Solve the position +result = expr_solving(exprs, vpoints, {pair: 0. for pair in inputs}) +# Get the result from joint 7 +x, y = result[7] +print(x, y) # -43.170055 -91.753226 +``` + +The documentation of Pyslvs library is on [Readthedocs](https://pyslvs-ui.readthedocs.io/en/latest/pyslvs-lib/). + +If you have any questions, please post on GitHub issue or contact . + + +%package -n python3-pyslvs +Summary: Pyslvs core module. An open source planar linkage mechanism synthesis tool. +Provides: python-pyslvs +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +BuildRequires: python3-cffi +BuildRequires: gcc +BuildRequires: gdb +%description -n python3-pyslvs +[![PyPI](https://img.shields.io/pypi/v/pyslvs.svg)](https://pypi.org/project/pyslvs/) +[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/KmolYuan/pyslvs.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/KmolYuan/pyslvs/context:python) + +# Pyslvs Libraries + +A no-GUI module of mechanism synthesis system and a 2D geometric constraint solver. + +## Installation + +Install from PyPI: + +```bash +pip install pyslvs +``` + +Or install and test from source: + +```bash +pip install -e . +python test +``` + +## Documentation + +Run the solver through an example: + +```python +from pyslvs import example_list, parse_vpoints, t_config, expr_solving + +# Get example with name +expr, inputs = example_list("Jansen's linkage (Single)") +# Parse the mechanism expression into a list of joint data +vpoints = parse_vpoints(expr) +# Config joint data and control data for the solver +exprs = t_config(vpoints, inputs) +# Solve the position +result = expr_solving(exprs, vpoints, {pair: 0. for pair in inputs}) +# Get the result from joint 7 +x, y = result[7] +print(x, y) # -43.170055 -91.753226 +``` + +The documentation of Pyslvs library is on [Readthedocs](https://pyslvs-ui.readthedocs.io/en/latest/pyslvs-lib/). + +If you have any questions, please post on GitHub issue or contact . + + +%package help +Summary: Development documents and examples for pyslvs +Provides: python3-pyslvs-doc +%description help +[![PyPI](https://img.shields.io/pypi/v/pyslvs.svg)](https://pypi.org/project/pyslvs/) +[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/KmolYuan/pyslvs.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/KmolYuan/pyslvs/context:python) + +# Pyslvs Libraries + +A no-GUI module of mechanism synthesis system and a 2D geometric constraint solver. + +## Installation + +Install from PyPI: + +```bash +pip install pyslvs +``` + +Or install and test from source: + +```bash +pip install -e . +python test +``` + +## Documentation + +Run the solver through an example: + +```python +from pyslvs import example_list, parse_vpoints, t_config, expr_solving + +# Get example with name +expr, inputs = example_list("Jansen's linkage (Single)") +# Parse the mechanism expression into a list of joint data +vpoints = parse_vpoints(expr) +# Config joint data and control data for the solver +exprs = t_config(vpoints, inputs) +# Solve the position +result = expr_solving(exprs, vpoints, {pair: 0. for pair in inputs}) +# Get the result from joint 7 +x, y = result[7] +print(x, y) # -43.170055 -91.753226 +``` + +The documentation of Pyslvs library is on [Readthedocs](https://pyslvs-ui.readthedocs.io/en/latest/pyslvs-lib/). + +If you have any questions, please post on GitHub issue or contact . + + +%prep +%autosetup -n pyslvs-22.7.0 + +%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-pyslvs -f filelist.lst +%dir %{python3_sitearch}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Wed May 10 2023 Python_Bot - 22.7.0-1 +- Package Spec generated diff --git a/sources b/sources new file mode 100644 index 0000000..cb600da --- /dev/null +++ b/sources @@ -0,0 +1 @@ +d5b62fedf6178073d0998f531c6cb685 pyslvs-22.7.0.tar.gz -- cgit v1.2.3