diff options
author | CoprDistGit <infra@openeuler.org> | 2023-03-09 15:33:17 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-03-09 15:33:17 +0000 |
commit | be32339c08dd74b3cbc7d0016d4887b3ea54a9c9 (patch) | |
tree | fae881db72dd65ef8ce8c577b309c8139e52ae16 | |
parent | 65418b3fa5ec7a90ae52eee71d6ebc2e680db038 (diff) |
automatic import of python-pygrocy
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | python-pygrocy.spec | 195 | ||||
-rw-r--r-- | sources | 1 |
3 files changed, 197 insertions, 0 deletions
@@ -0,0 +1 @@ +/pygrocy-1.5.0.tar.gz diff --git a/python-pygrocy.spec b/python-pygrocy.spec new file mode 100644 index 0000000..4892719 --- /dev/null +++ b/python-pygrocy.spec @@ -0,0 +1,195 @@ +%global _empty_manifest_terminate_build 0 +Name: python-pygrocy +Version: 1.5.0 +Release: 1 +Summary: please add a summary manually as the author left a blank one +License: MIT +URL: https://github.com/sebrut/pygrocy +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/c5/7a/a88f1caa309480196bbc628c9b7ada0baa2725399d0846bc5c3f0f864303/pygrocy-1.5.0.tar.gz +BuildArch: noarch + + +%description +# pygrocy +[](https://travis-ci.com/SebRut/pygrocy) +[](https://pypi.org/project/pygrocy/) + + +[](https://coveralls.io/github/SebRut/pygrocy?branch=master) +[](https://www.codefactor.io/repository/github/sebrut/pygrocy) +[](https://github.com/pre-commit/pre-commit) +[Documentation](https://sebrut.github.io/pygrocy/) + +## Installation + +`pip install pygrocy` + +## Usage +Import the package: +```python +from pygrocy import Grocy +``` + +Obtain a grocy instance: +```python +grocy = Grocy("https://example.com", "GROCY_API_KEY") +``` +or +```python +grocy = Grocy("https://example.com", "GROCY_API_KEY", port = 9192, verify_ssl = True) +``` + +Get current stock: +```python +for entry in grocy.stock(): + print("{} in stock for product id {}".format(entry.available_amount, entry.id)) +``` + +# Support + +If you need help using pygrocy check the [discussions](https://github.com/SebRut/pygrocy/issues) section. Feel free to create an issue for feature requests, bugs and errors in the library. + +## Development testing +You need tox and Python 3.8/9/10 to run the tests. Navigate to the root dir of `pygrocy` and execute `tox` to run the tests. + + +%package -n python3-pygrocy +Summary: please add a summary manually as the author left a blank one +Provides: python-pygrocy +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-pygrocy +# pygrocy +[](https://travis-ci.com/SebRut/pygrocy) +[](https://pypi.org/project/pygrocy/) + + +[](https://coveralls.io/github/SebRut/pygrocy?branch=master) +[](https://www.codefactor.io/repository/github/sebrut/pygrocy) +[](https://github.com/pre-commit/pre-commit) +[Documentation](https://sebrut.github.io/pygrocy/) + +## Installation + +`pip install pygrocy` + +## Usage +Import the package: +```python +from pygrocy import Grocy +``` + +Obtain a grocy instance: +```python +grocy = Grocy("https://example.com", "GROCY_API_KEY") +``` +or +```python +grocy = Grocy("https://example.com", "GROCY_API_KEY", port = 9192, verify_ssl = True) +``` + +Get current stock: +```python +for entry in grocy.stock(): + print("{} in stock for product id {}".format(entry.available_amount, entry.id)) +``` + +# Support + +If you need help using pygrocy check the [discussions](https://github.com/SebRut/pygrocy/issues) section. Feel free to create an issue for feature requests, bugs and errors in the library. + +## Development testing +You need tox and Python 3.8/9/10 to run the tests. Navigate to the root dir of `pygrocy` and execute `tox` to run the tests. + + +%package help +Summary: Development documents and examples for pygrocy +Provides: python3-pygrocy-doc +%description help +# pygrocy +[](https://travis-ci.com/SebRut/pygrocy) +[](https://pypi.org/project/pygrocy/) + + +[](https://coveralls.io/github/SebRut/pygrocy?branch=master) +[](https://www.codefactor.io/repository/github/sebrut/pygrocy) +[](https://github.com/pre-commit/pre-commit) +[Documentation](https://sebrut.github.io/pygrocy/) + +## Installation + +`pip install pygrocy` + +## Usage +Import the package: +```python +from pygrocy import Grocy +``` + +Obtain a grocy instance: +```python +grocy = Grocy("https://example.com", "GROCY_API_KEY") +``` +or +```python +grocy = Grocy("https://example.com", "GROCY_API_KEY", port = 9192, verify_ssl = True) +``` + +Get current stock: +```python +for entry in grocy.stock(): + print("{} in stock for product id {}".format(entry.available_amount, entry.id)) +``` + +# Support + +If you need help using pygrocy check the [discussions](https://github.com/SebRut/pygrocy/issues) section. Feel free to create an issue for feature requests, bugs and errors in the library. + +## Development testing +You need tox and Python 3.8/9/10 to run the tests. Navigate to the root dir of `pygrocy` and execute `tox` to run the tests. + + +%prep +%autosetup -n pygrocy-1.5.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-pygrocy -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Thu Mar 09 2023 Python_Bot <Python_Bot@openeuler.org> - 1.5.0-1 +- Package Spec generated @@ -0,0 +1 @@ +8d2a8cc121af65e77627924bd91b8722 pygrocy-1.5.0.tar.gz |