diff options
| author | CoprDistGit <infra@openeuler.org> | 2023-05-05 13:07:38 +0000 |
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2023-05-05 13:07:38 +0000 |
| commit | 6e14e2d2658e60d981f2a0bffb1723bc8c38c645 (patch) | |
| tree | c6ba2c58f5b7b7d158a3a5ebd489f1cca5e61597 | |
| parent | 358067eac6762de9f342aa856e6c399fafa36d40 (diff) | |
automatic import of python-uuoskitopeneuler20.03
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | python-uuoskit.spec | 495 | ||||
| -rw-r--r-- | sources | 1 |
3 files changed, 497 insertions, 0 deletions
@@ -0,0 +1 @@ +/uuoskit-1.0.4.tar.gz diff --git a/python-uuoskit.spec b/python-uuoskit.spec new file mode 100644 index 0000000..aa4e086 --- /dev/null +++ b/python-uuoskit.spec @@ -0,0 +1,495 @@ +%global _empty_manifest_terminate_build 0 +Name: python-uuoskit +Version: 1.0.4 +Release: 1 +Summary: Python Toolkit for EOSIO +License: MIT +URL: https://github.com/uuosio/uuoskit +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/0d/ef/3fc6418c22f8e109b6c90e82accb8f571c09f9c663257f91391631dba122/uuoskit-1.0.4.tar.gz + +Requires: python3-urllib3 +Requires: python3-certifi +Requires: python3-toolz +Requires: python3-funcy +Requires: python3-prettytable +Requires: python3-requests-unixsocket +Requires: python3-httpx + +%description +Python Toolkit for EOSIO + +<h3> + <a + target="_blank" + href="https://mybinder.org/v2/gh/uuosio/UUOSKit/master?filepath=notebooks%2Fhelloworld.ipynb" + > + Quick Start + <img alt="Binder" valign="bottom" height="25px" + src="https://mybinder.org/badge_logo.svg" + /> + </a> +</h3> + +# Latest Release + +[uuoskit v1.0.2](https://github.com/uuosio/uuoskit/releases) + +# Installation + +```bash +pip install uuoskit +``` + +# [Docs](https://uuosio.github.io/UUOSKit) + +# Building from Source Code + +### Installing Prerequisites + +``` +python3 -m pip install scikit-build +python3 -m pip install cython +``` + +For Windows platform + +``` +python -m pip install scikit-build +python -m pip install cython +``` + +1. Download and Install gcc compiler from [tdm-gcc](https://jmeubank.github.io/tdm-gcc) +2. Install Go compiler from [download](https://golang.org/doc/install#download) +3. Install cmake from [download](https://cmake.org/download) +4. Install python3 from [downloads](https://www.python.org/downloads/windows/) + +Press Win+R to open Run Dialog, input the following command +``` +cmd -k /path/to/gcc/mingwvars.bat +``` + +### Downloading Source Code + +``` +git clone https://www.github.com/uuosio/uuoskit +cd uuoskit +git submodule update --init --recursive +``` + +### Build +``` +./build.sh +``` + +For Windows platform +In the cmd dialog, enter the following command: +``` +python setup.py sdist bdist_wheel +``` + +### Installation + +``` +./install.sh +``` + +For Windows platform +``` +python -m pip uninstall uuoskit -y;python -m pip install .\dist\uuoskit-[SUFFIX].whl +``` + +### Example1 +```python +import os +from uuoskit import uuosapi, wallet + +if os.path.exists('mywallet.wallet'): + os.remove('mywallet.wallet') +psw = wallet.create('mywallet') +#import your account private key here +wallet.import_key('mywallet', '5K463ynhZoCDDa4RDcr63cUwWLTnKqmdcoTKTHBjqoKfv4u5V7p') + +uuosapi.set_node('https://eos.greymass.com') +info = uuosapi.get_info() +print(info) +args = { + 'from': 'test1', + 'to': 'test2', + 'quantity': '1.0000 EOS', + 'memo': 'hello,world' +} +uuosapi.push_action('eosio.token', 'transfer', args, {'test1':'active'}) +``` + +### Async Example +```python +import os +import asyncio +from uuoskit import wallet +from uuoskit.chainapi import ChainApiAsync + +if os.path.exists('mywallet.wallet'): + os.remove('mywallet.wallet') +psw = wallet.create('mywallet') +#import your account private key here +wallet.import_key('mywallet', '5K463ynhZoCDDa4RDcr63cUwWLTnKqmdcoTKTHBjqoKfv4u5V7p') + +async def test(): + uuosapi = ChainApiAsync('https://eos.greymass.com') + info = await uuosapi.get_info() + print(info) + args = { + 'from': 'test1', + 'to': 'test2', + 'quantity': '1.0000 EOS', + 'memo': 'hello,world' + } + r = await uuosapi.push_action('eosio.token', 'transfer', args, {'test1':'active'}) + print(r) + +asyncio.run(test()) +``` + +### License +[MIT](./LICENSE) + + + + +%package -n python3-uuoskit +Summary: Python Toolkit for EOSIO +Provides: python-uuoskit +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +BuildRequires: python3-cffi +BuildRequires: gcc +BuildRequires: gdb +%description -n python3-uuoskit +Python Toolkit for EOSIO + +<h3> + <a + target="_blank" + href="https://mybinder.org/v2/gh/uuosio/UUOSKit/master?filepath=notebooks%2Fhelloworld.ipynb" + > + Quick Start + <img alt="Binder" valign="bottom" height="25px" + src="https://mybinder.org/badge_logo.svg" + /> + </a> +</h3> + +# Latest Release + +[uuoskit v1.0.2](https://github.com/uuosio/uuoskit/releases) + +# Installation + +```bash +pip install uuoskit +``` + +# [Docs](https://uuosio.github.io/UUOSKit) + +# Building from Source Code + +### Installing Prerequisites + +``` +python3 -m pip install scikit-build +python3 -m pip install cython +``` + +For Windows platform + +``` +python -m pip install scikit-build +python -m pip install cython +``` + +1. Download and Install gcc compiler from [tdm-gcc](https://jmeubank.github.io/tdm-gcc) +2. Install Go compiler from [download](https://golang.org/doc/install#download) +3. Install cmake from [download](https://cmake.org/download) +4. Install python3 from [downloads](https://www.python.org/downloads/windows/) + +Press Win+R to open Run Dialog, input the following command +``` +cmd -k /path/to/gcc/mingwvars.bat +``` + +### Downloading Source Code + +``` +git clone https://www.github.com/uuosio/uuoskit +cd uuoskit +git submodule update --init --recursive +``` + +### Build +``` +./build.sh +``` + +For Windows platform +In the cmd dialog, enter the following command: +``` +python setup.py sdist bdist_wheel +``` + +### Installation + +``` +./install.sh +``` + +For Windows platform +``` +python -m pip uninstall uuoskit -y;python -m pip install .\dist\uuoskit-[SUFFIX].whl +``` + +### Example1 +```python +import os +from uuoskit import uuosapi, wallet + +if os.path.exists('mywallet.wallet'): + os.remove('mywallet.wallet') +psw = wallet.create('mywallet') +#import your account private key here +wallet.import_key('mywallet', '5K463ynhZoCDDa4RDcr63cUwWLTnKqmdcoTKTHBjqoKfv4u5V7p') + +uuosapi.set_node('https://eos.greymass.com') +info = uuosapi.get_info() +print(info) +args = { + 'from': 'test1', + 'to': 'test2', + 'quantity': '1.0000 EOS', + 'memo': 'hello,world' +} +uuosapi.push_action('eosio.token', 'transfer', args, {'test1':'active'}) +``` + +### Async Example +```python +import os +import asyncio +from uuoskit import wallet +from uuoskit.chainapi import ChainApiAsync + +if os.path.exists('mywallet.wallet'): + os.remove('mywallet.wallet') +psw = wallet.create('mywallet') +#import your account private key here +wallet.import_key('mywallet', '5K463ynhZoCDDa4RDcr63cUwWLTnKqmdcoTKTHBjqoKfv4u5V7p') + +async def test(): + uuosapi = ChainApiAsync('https://eos.greymass.com') + info = await uuosapi.get_info() + print(info) + args = { + 'from': 'test1', + 'to': 'test2', + 'quantity': '1.0000 EOS', + 'memo': 'hello,world' + } + r = await uuosapi.push_action('eosio.token', 'transfer', args, {'test1':'active'}) + print(r) + +asyncio.run(test()) +``` + +### License +[MIT](./LICENSE) + + + + +%package help +Summary: Development documents and examples for uuoskit +Provides: python3-uuoskit-doc +%description help +Python Toolkit for EOSIO + +<h3> + <a + target="_blank" + href="https://mybinder.org/v2/gh/uuosio/UUOSKit/master?filepath=notebooks%2Fhelloworld.ipynb" + > + Quick Start + <img alt="Binder" valign="bottom" height="25px" + src="https://mybinder.org/badge_logo.svg" + /> + </a> +</h3> + +# Latest Release + +[uuoskit v1.0.2](https://github.com/uuosio/uuoskit/releases) + +# Installation + +```bash +pip install uuoskit +``` + +# [Docs](https://uuosio.github.io/UUOSKit) + +# Building from Source Code + +### Installing Prerequisites + +``` +python3 -m pip install scikit-build +python3 -m pip install cython +``` + +For Windows platform + +``` +python -m pip install scikit-build +python -m pip install cython +``` + +1. Download and Install gcc compiler from [tdm-gcc](https://jmeubank.github.io/tdm-gcc) +2. Install Go compiler from [download](https://golang.org/doc/install#download) +3. Install cmake from [download](https://cmake.org/download) +4. Install python3 from [downloads](https://www.python.org/downloads/windows/) + +Press Win+R to open Run Dialog, input the following command +``` +cmd -k /path/to/gcc/mingwvars.bat +``` + +### Downloading Source Code + +``` +git clone https://www.github.com/uuosio/uuoskit +cd uuoskit +git submodule update --init --recursive +``` + +### Build +``` +./build.sh +``` + +For Windows platform +In the cmd dialog, enter the following command: +``` +python setup.py sdist bdist_wheel +``` + +### Installation + +``` +./install.sh +``` + +For Windows platform +``` +python -m pip uninstall uuoskit -y;python -m pip install .\dist\uuoskit-[SUFFIX].whl +``` + +### Example1 +```python +import os +from uuoskit import uuosapi, wallet + +if os.path.exists('mywallet.wallet'): + os.remove('mywallet.wallet') +psw = wallet.create('mywallet') +#import your account private key here +wallet.import_key('mywallet', '5K463ynhZoCDDa4RDcr63cUwWLTnKqmdcoTKTHBjqoKfv4u5V7p') + +uuosapi.set_node('https://eos.greymass.com') +info = uuosapi.get_info() +print(info) +args = { + 'from': 'test1', + 'to': 'test2', + 'quantity': '1.0000 EOS', + 'memo': 'hello,world' +} +uuosapi.push_action('eosio.token', 'transfer', args, {'test1':'active'}) +``` + +### Async Example +```python +import os +import asyncio +from uuoskit import wallet +from uuoskit.chainapi import ChainApiAsync + +if os.path.exists('mywallet.wallet'): + os.remove('mywallet.wallet') +psw = wallet.create('mywallet') +#import your account private key here +wallet.import_key('mywallet', '5K463ynhZoCDDa4RDcr63cUwWLTnKqmdcoTKTHBjqoKfv4u5V7p') + +async def test(): + uuosapi = ChainApiAsync('https://eos.greymass.com') + info = await uuosapi.get_info() + print(info) + args = { + 'from': 'test1', + 'to': 'test2', + 'quantity': '1.0000 EOS', + 'memo': 'hello,world' + } + r = await uuosapi.push_action('eosio.token', 'transfer', args, {'test1':'active'}) + print(r) + +asyncio.run(test()) +``` + +### License +[MIT](./LICENSE) + + + + +%prep +%autosetup -n uuoskit-1.0.4 + +%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-uuoskit -f filelist.lst +%dir %{python3_sitearch}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Fri May 05 2023 Python_Bot <Python_Bot@openeuler.org> - 1.0.4-1 +- Package Spec generated @@ -0,0 +1 @@ +9a05c6f14f81b1f3de5cde09720bf138 uuoskit-1.0.4.tar.gz |
