summaryrefslogtreecommitdiff
path: root/python-bugout.spec
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-10 05:57:59 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-10 05:57:59 +0000
commit56f071428707473c5cdc6db7fe4afc0bdea0ec1b (patch)
tree9be477e38c6026430e0e301c64b234f55f0000e9 /python-bugout.spec
parentf3770266e3681787b373be9cc4625b5339028054 (diff)
automatic import of python-bugoutopeneuler20.03
Diffstat (limited to 'python-bugout.spec')
-rw-r--r--python-bugout.spec197
1 files changed, 197 insertions, 0 deletions
diff --git a/python-bugout.spec b/python-bugout.spec
new file mode 100644
index 0000000..a294ece
--- /dev/null
+++ b/python-bugout.spec
@@ -0,0 +1,197 @@
+%global _empty_manifest_terminate_build 0
+Name: python-bugout
+Version: 0.2.6
+Release: 1
+Summary: Python client library for Bugout API
+License: MIT
+URL: https://github.com/bugout-dev/bugout-python
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/3b/62/5449d3d16f226b10e8765220f45de9f9cf788e58b8ba16ae59243809b241/bugout-0.2.6.tar.gz
+BuildArch: noarch
+
+Requires: python3-pydantic
+Requires: python3-requests
+Requires: python3-black
+Requires: python3-mypy
+Requires: python3-types-requests
+Requires: python3-setuptools
+Requires: python3-twine
+Requires: python3-wheel
+
+%description
+# bugout-python
+Python client library for Bugout API
+
+## Setup
+- Add variables from `sample.env` in you development environment
+```bash
+export BUGOUT_TIMEOUT_SECONDS=5
+```
+
+- Example of usage, just fill `token`, `group_id`, `journal_id` and `entry_id` with proper values from your account. Or remove unnecessary variables and API calls.
+```python
+from bugout.app import Bugout
+
+
+def main():
+ bugout = Bugout()
+
+ token = ""
+ group_id = ""
+ journal_id = ""
+ entry_id = ""
+
+ user = bugout.get_user(token=token)
+ print(f"User name is {user.username}")
+
+ group = bugout.get_group(token=token, group_id=group_id)
+
+ journal = bugout.get_journal(token=token, journal_id=journal_id)
+ entry = bugout.get_entry(token=token, journal_id=journal.id, entry_id=entry_id)
+
+ search_res = bugout.search(
+ token=token, journal_id=journal.id, query="your query", content=False
+ )
+ print(f"Search results: {search_res}")
+
+
+if __name__ == "__main__":
+ main()
+```
+
+
+%package -n python3-bugout
+Summary: Python client library for Bugout API
+Provides: python-bugout
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-bugout
+# bugout-python
+Python client library for Bugout API
+
+## Setup
+- Add variables from `sample.env` in you development environment
+```bash
+export BUGOUT_TIMEOUT_SECONDS=5
+```
+
+- Example of usage, just fill `token`, `group_id`, `journal_id` and `entry_id` with proper values from your account. Or remove unnecessary variables and API calls.
+```python
+from bugout.app import Bugout
+
+
+def main():
+ bugout = Bugout()
+
+ token = ""
+ group_id = ""
+ journal_id = ""
+ entry_id = ""
+
+ user = bugout.get_user(token=token)
+ print(f"User name is {user.username}")
+
+ group = bugout.get_group(token=token, group_id=group_id)
+
+ journal = bugout.get_journal(token=token, journal_id=journal_id)
+ entry = bugout.get_entry(token=token, journal_id=journal.id, entry_id=entry_id)
+
+ search_res = bugout.search(
+ token=token, journal_id=journal.id, query="your query", content=False
+ )
+ print(f"Search results: {search_res}")
+
+
+if __name__ == "__main__":
+ main()
+```
+
+
+%package help
+Summary: Development documents and examples for bugout
+Provides: python3-bugout-doc
+%description help
+# bugout-python
+Python client library for Bugout API
+
+## Setup
+- Add variables from `sample.env` in you development environment
+```bash
+export BUGOUT_TIMEOUT_SECONDS=5
+```
+
+- Example of usage, just fill `token`, `group_id`, `journal_id` and `entry_id` with proper values from your account. Or remove unnecessary variables and API calls.
+```python
+from bugout.app import Bugout
+
+
+def main():
+ bugout = Bugout()
+
+ token = ""
+ group_id = ""
+ journal_id = ""
+ entry_id = ""
+
+ user = bugout.get_user(token=token)
+ print(f"User name is {user.username}")
+
+ group = bugout.get_group(token=token, group_id=group_id)
+
+ journal = bugout.get_journal(token=token, journal_id=journal_id)
+ entry = bugout.get_entry(token=token, journal_id=journal.id, entry_id=entry_id)
+
+ search_res = bugout.search(
+ token=token, journal_id=journal.id, query="your query", content=False
+ )
+ print(f"Search results: {search_res}")
+
+
+if __name__ == "__main__":
+ main()
+```
+
+
+%prep
+%autosetup -n bugout-0.2.6
+
+%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-bugout -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Wed May 10 2023 Python_Bot <Python_Bot@openeuler.org> - 0.2.6-1
+- Package Spec generated