summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-15 05:00:24 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-15 05:00:24 +0000
commit167c55cf0ffa425631d3cbade75ee4af35188ed2 (patch)
tree917c73f45977ec302d6692962bde99f874d10130
parent11249735db61893e99cde3735f9b4c0c96417dc4 (diff)
automatic import of python-pyfoldingathomecontrol
-rw-r--r--.gitignore1
-rw-r--r--python-pyfoldingathomecontrol.spec225
-rw-r--r--sources1
3 files changed, 227 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..d446653 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/pyfoldingathomecontrol-3.0.1.tar.gz
diff --git a/python-pyfoldingathomecontrol.spec b/python-pyfoldingathomecontrol.spec
new file mode 100644
index 0000000..d7a7727
--- /dev/null
+++ b/python-pyfoldingathomecontrol.spec
@@ -0,0 +1,225 @@
+%global _empty_manifest_terminate_build 0
+Name: python-pyfoldingathomecontrol
+Version: 3.0.1
+Release: 1
+Summary: Python library to get stats from your Folding@Home Clients
+License: MIT
+URL: http://github.com/eifinger/PyFoldingAtHomeControl
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/90/c6/aa1f450b320adbe5000102862648cb09530f4c4d02d284faee7f2e4495e9/pyfoldingathomecontrol-3.0.1.tar.gz
+BuildArch: noarch
+
+
+%description
+# PyFoldingAtHomeControl
+
+Python library to get stats from your Folding@Home Clients
+
+[![GitHub Actions](https://github.com/eifinger/PyFoldingAtHomeControl/workflows/Python%20package/badge.svg)](https://github.com/eifinger/PyFoldingAtHomeControl/actions?workflow=Python+package)
+[![PyPi](https://img.shields.io/pypi/v/PyFoldingAtHomeControl.svg)](https://pypi.python.org/pypi/PyFoldingAtHomeControl)
+[![PyPi](https://img.shields.io/pypi/l/PyFoldingAtHomeControl.svg)](https://github.com/eifinger/PyFoldingAtHomeControl/blob/master/LICENSE)
+[![codecov](https://codecov.io/gh/eifinger/PyFoldingAtHomeControl/branch/master/graph/badge.svg)](https://codecov.io/gh/eifinger/PyFoldingAtHomeControl)
+[![Downloads](https://pepy.tech/badge/pyfoldingathomecontrol)](https://pepy.tech/project/pyfoldingathomecontrol)
+
+## Installation
+
+```bash
+pip install PyFoldingAtHomeControl
+```
+
+## Usage
+
+```python
+import asyncio
+from FoldingAtHomeControl import FoldingAtHomeController
+from FoldingAtHomeControl import PyOnMessageTypes
+
+
+def callback(message_type, data):
+ print(f"callback for: {message_type}: ", data)
+
+
+async def cancel_task(task_to_cancel):
+ task_to_cancel.cancel()
+ await task_to_cancel
+
+
+if __name__ == "__main__":
+ Controller = FoldingAtHomeController("localhost")
+ Controller.register_callback(callback)
+ loop = asyncio.get_event_loop()
+ task = loop.create_task(Controller.start())
+ try:
+ loop.run_until_complete(task)
+ except KeyboardInterrupt:
+ pass
+ finally:
+ print("Cancelling task")
+ try:
+ loop.run_until_complete(cancel_task(task))
+ except asyncio.CancelledError:
+ print("Closing Loop")
+ loop.close()
+```
+
+
+
+%package -n python3-pyfoldingathomecontrol
+Summary: Python library to get stats from your Folding@Home Clients
+Provides: python-pyfoldingathomecontrol
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-pyfoldingathomecontrol
+# PyFoldingAtHomeControl
+
+Python library to get stats from your Folding@Home Clients
+
+[![GitHub Actions](https://github.com/eifinger/PyFoldingAtHomeControl/workflows/Python%20package/badge.svg)](https://github.com/eifinger/PyFoldingAtHomeControl/actions?workflow=Python+package)
+[![PyPi](https://img.shields.io/pypi/v/PyFoldingAtHomeControl.svg)](https://pypi.python.org/pypi/PyFoldingAtHomeControl)
+[![PyPi](https://img.shields.io/pypi/l/PyFoldingAtHomeControl.svg)](https://github.com/eifinger/PyFoldingAtHomeControl/blob/master/LICENSE)
+[![codecov](https://codecov.io/gh/eifinger/PyFoldingAtHomeControl/branch/master/graph/badge.svg)](https://codecov.io/gh/eifinger/PyFoldingAtHomeControl)
+[![Downloads](https://pepy.tech/badge/pyfoldingathomecontrol)](https://pepy.tech/project/pyfoldingathomecontrol)
+
+## Installation
+
+```bash
+pip install PyFoldingAtHomeControl
+```
+
+## Usage
+
+```python
+import asyncio
+from FoldingAtHomeControl import FoldingAtHomeController
+from FoldingAtHomeControl import PyOnMessageTypes
+
+
+def callback(message_type, data):
+ print(f"callback for: {message_type}: ", data)
+
+
+async def cancel_task(task_to_cancel):
+ task_to_cancel.cancel()
+ await task_to_cancel
+
+
+if __name__ == "__main__":
+ Controller = FoldingAtHomeController("localhost")
+ Controller.register_callback(callback)
+ loop = asyncio.get_event_loop()
+ task = loop.create_task(Controller.start())
+ try:
+ loop.run_until_complete(task)
+ except KeyboardInterrupt:
+ pass
+ finally:
+ print("Cancelling task")
+ try:
+ loop.run_until_complete(cancel_task(task))
+ except asyncio.CancelledError:
+ print("Closing Loop")
+ loop.close()
+```
+
+
+
+%package help
+Summary: Development documents and examples for pyfoldingathomecontrol
+Provides: python3-pyfoldingathomecontrol-doc
+%description help
+# PyFoldingAtHomeControl
+
+Python library to get stats from your Folding@Home Clients
+
+[![GitHub Actions](https://github.com/eifinger/PyFoldingAtHomeControl/workflows/Python%20package/badge.svg)](https://github.com/eifinger/PyFoldingAtHomeControl/actions?workflow=Python+package)
+[![PyPi](https://img.shields.io/pypi/v/PyFoldingAtHomeControl.svg)](https://pypi.python.org/pypi/PyFoldingAtHomeControl)
+[![PyPi](https://img.shields.io/pypi/l/PyFoldingAtHomeControl.svg)](https://github.com/eifinger/PyFoldingAtHomeControl/blob/master/LICENSE)
+[![codecov](https://codecov.io/gh/eifinger/PyFoldingAtHomeControl/branch/master/graph/badge.svg)](https://codecov.io/gh/eifinger/PyFoldingAtHomeControl)
+[![Downloads](https://pepy.tech/badge/pyfoldingathomecontrol)](https://pepy.tech/project/pyfoldingathomecontrol)
+
+## Installation
+
+```bash
+pip install PyFoldingAtHomeControl
+```
+
+## Usage
+
+```python
+import asyncio
+from FoldingAtHomeControl import FoldingAtHomeController
+from FoldingAtHomeControl import PyOnMessageTypes
+
+
+def callback(message_type, data):
+ print(f"callback for: {message_type}: ", data)
+
+
+async def cancel_task(task_to_cancel):
+ task_to_cancel.cancel()
+ await task_to_cancel
+
+
+if __name__ == "__main__":
+ Controller = FoldingAtHomeController("localhost")
+ Controller.register_callback(callback)
+ loop = asyncio.get_event_loop()
+ task = loop.create_task(Controller.start())
+ try:
+ loop.run_until_complete(task)
+ except KeyboardInterrupt:
+ pass
+ finally:
+ print("Cancelling task")
+ try:
+ loop.run_until_complete(cancel_task(task))
+ except asyncio.CancelledError:
+ print("Closing Loop")
+ loop.close()
+```
+
+
+
+%prep
+%autosetup -n pyfoldingathomecontrol-3.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-pyfoldingathomecontrol -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Mon May 15 2023 Python_Bot <Python_Bot@openeuler.org> - 3.0.1-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..c3071d3
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+b38e5a864136c878e1b6a9c406e2afdb pyfoldingathomecontrol-3.0.1.tar.gz