%global _empty_manifest_terminate_build 0 Name: python-pyeoskit Version: 1.1.12 Release: 1 Summary: Python Toolkit for EOS License: MIT URL: https://github.com/learnforpractice/pyeoskit Source0: https://mirrors.nju.edu.cn/pypi/web/packages/08/8f/e0cd654cf3eb376923cce7f699729819d28cce3a312f59f2d827d871275f/pyeoskit-1.1.12.tar.gz Requires: python3-requests-unixsocket Requires: python3-httpx Requires: python3-base58 Requires: python3-asn1 Requires: python3-ledgerblue %description Python Toolkit for EOS [![PyPi](https://img.shields.io/pypi/v/pyeoskit.svg)](https://pypi.org/project/pyeoskit) [![PyPi](https://img.shields.io/pypi/dm/pyeoskit.svg)](https://pypi.org/project/pyeoskit) # Installation ## On Linux platform ```bash python3 -m pip install -U pip python3 -m pip install pyeoskit ``` ## On Windows platform: ```bash python -m pip install -U pip python -m pip install pyeoskit ``` ## On Apple M1 hardware pyeoskit does not have pre-built versions available for ARM chips. in order to build it from source code, you need to install `cmake`, `go`, `scikit-build`, `cython`. ```bash brew install go brew install cython xcode-select --install python3 -m pip install -U pip python3 -m pip install cmake python3 -m pip install scikit-build python3 -m pip install pyeoskit ``` # Code Examples ## Example1 ```python import os from pyeoskit import eosapi, wallet #import your account private key here wallet.import_key('mywallet', '5K463ynhZoCDDa4RDcr63cUwWLTnKqmdcoTKTHBjqoKfv4u5V7p') eosapi.set_node('https://eos.greymass.com') info = eosapi.get_info() print(info) args = { 'from': 'test1', 'to': 'test2', 'quantity': '1.0000 EOS', 'memo': 'hello,world' } eosapi.push_action('eosio.token', 'transfer', args, {'test1':'active'}) ``` ## Async Example ```python import os import asyncio from pyeoskit import wallet from pyeoskit.chainapi import ChainApiAsync #import your account private key here wallet.import_key('mywallet', '5K463ynhZoCDDa4RDcr63cUwWLTnKqmdcoTKTHBjqoKfv4u5V7p') async def test(): eosapi = ChainApiAsync('https://eos.greymass.com') info = await eosapi.get_info() print(info) args = { 'from': 'test1', 'to': 'test2', 'quantity': '1.0000 EOS', 'memo': 'hello,world' } r = await eosapi.push_action('eosio.token', 'transfer', args, {'test1':'active'}) print(r) asyncio.run(test()) ``` ## Sign With Ledger Hardware Wallet Example ```python import os from pyeoskit import eosapi eosapi.set_node('https://eos.greymass.com') args = { 'from': 'test1', 'to': 'test2', 'quantity': '1.0000 EOS', 'memo': 'hello,world' } #indices is an array of ledger signing key indices eosapi.push_action('eosio.token', 'transfer', args, {'test1':'active'}, indices=[0]) ``` # [Docs](https://learnforpractice.github.io/pyeoskit/#/MODULES?id=pyeoskit-modules) # 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/learnforpractice/pyeoskit cd pyeoskit 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 pyeoskit -y;python -m pip install .\dist\pyeoskit-[SUFFIX].whl ``` ### License [MIT](./LICENSE) %package -n python3-pyeoskit Summary: Python Toolkit for EOS Provides: python-pyeoskit BuildRequires: python3-devel BuildRequires: python3-setuptools BuildRequires: python3-pip BuildRequires: python3-cffi BuildRequires: gcc BuildRequires: gdb %description -n python3-pyeoskit Python Toolkit for EOS [![PyPi](https://img.shields.io/pypi/v/pyeoskit.svg)](https://pypi.org/project/pyeoskit) [![PyPi](https://img.shields.io/pypi/dm/pyeoskit.svg)](https://pypi.org/project/pyeoskit) # Installation ## On Linux platform ```bash python3 -m pip install -U pip python3 -m pip install pyeoskit ``` ## On Windows platform: ```bash python -m pip install -U pip python -m pip install pyeoskit ``` ## On Apple M1 hardware pyeoskit does not have pre-built versions available for ARM chips. in order to build it from source code, you need to install `cmake`, `go`, `scikit-build`, `cython`. ```bash brew install go brew install cython xcode-select --install python3 -m pip install -U pip python3 -m pip install cmake python3 -m pip install scikit-build python3 -m pip install pyeoskit ``` # Code Examples ## Example1 ```python import os from pyeoskit import eosapi, wallet #import your account private key here wallet.import_key('mywallet', '5K463ynhZoCDDa4RDcr63cUwWLTnKqmdcoTKTHBjqoKfv4u5V7p') eosapi.set_node('https://eos.greymass.com') info = eosapi.get_info() print(info) args = { 'from': 'test1', 'to': 'test2', 'quantity': '1.0000 EOS', 'memo': 'hello,world' } eosapi.push_action('eosio.token', 'transfer', args, {'test1':'active'}) ``` ## Async Example ```python import os import asyncio from pyeoskit import wallet from pyeoskit.chainapi import ChainApiAsync #import your account private key here wallet.import_key('mywallet', '5K463ynhZoCDDa4RDcr63cUwWLTnKqmdcoTKTHBjqoKfv4u5V7p') async def test(): eosapi = ChainApiAsync('https://eos.greymass.com') info = await eosapi.get_info() print(info) args = { 'from': 'test1', 'to': 'test2', 'quantity': '1.0000 EOS', 'memo': 'hello,world' } r = await eosapi.push_action('eosio.token', 'transfer', args, {'test1':'active'}) print(r) asyncio.run(test()) ``` ## Sign With Ledger Hardware Wallet Example ```python import os from pyeoskit import eosapi eosapi.set_node('https://eos.greymass.com') args = { 'from': 'test1', 'to': 'test2', 'quantity': '1.0000 EOS', 'memo': 'hello,world' } #indices is an array of ledger signing key indices eosapi.push_action('eosio.token', 'transfer', args, {'test1':'active'}, indices=[0]) ``` # [Docs](https://learnforpractice.github.io/pyeoskit/#/MODULES?id=pyeoskit-modules) # 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/learnforpractice/pyeoskit cd pyeoskit 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 pyeoskit -y;python -m pip install .\dist\pyeoskit-[SUFFIX].whl ``` ### License [MIT](./LICENSE) %package help Summary: Development documents and examples for pyeoskit Provides: python3-pyeoskit-doc %description help Python Toolkit for EOS [![PyPi](https://img.shields.io/pypi/v/pyeoskit.svg)](https://pypi.org/project/pyeoskit) [![PyPi](https://img.shields.io/pypi/dm/pyeoskit.svg)](https://pypi.org/project/pyeoskit) # Installation ## On Linux platform ```bash python3 -m pip install -U pip python3 -m pip install pyeoskit ``` ## On Windows platform: ```bash python -m pip install -U pip python -m pip install pyeoskit ``` ## On Apple M1 hardware pyeoskit does not have pre-built versions available for ARM chips. in order to build it from source code, you need to install `cmake`, `go`, `scikit-build`, `cython`. ```bash brew install go brew install cython xcode-select --install python3 -m pip install -U pip python3 -m pip install cmake python3 -m pip install scikit-build python3 -m pip install pyeoskit ``` # Code Examples ## Example1 ```python import os from pyeoskit import eosapi, wallet #import your account private key here wallet.import_key('mywallet', '5K463ynhZoCDDa4RDcr63cUwWLTnKqmdcoTKTHBjqoKfv4u5V7p') eosapi.set_node('https://eos.greymass.com') info = eosapi.get_info() print(info) args = { 'from': 'test1', 'to': 'test2', 'quantity': '1.0000 EOS', 'memo': 'hello,world' } eosapi.push_action('eosio.token', 'transfer', args, {'test1':'active'}) ``` ## Async Example ```python import os import asyncio from pyeoskit import wallet from pyeoskit.chainapi import ChainApiAsync #import your account private key here wallet.import_key('mywallet', '5K463ynhZoCDDa4RDcr63cUwWLTnKqmdcoTKTHBjqoKfv4u5V7p') async def test(): eosapi = ChainApiAsync('https://eos.greymass.com') info = await eosapi.get_info() print(info) args = { 'from': 'test1', 'to': 'test2', 'quantity': '1.0000 EOS', 'memo': 'hello,world' } r = await eosapi.push_action('eosio.token', 'transfer', args, {'test1':'active'}) print(r) asyncio.run(test()) ``` ## Sign With Ledger Hardware Wallet Example ```python import os from pyeoskit import eosapi eosapi.set_node('https://eos.greymass.com') args = { 'from': 'test1', 'to': 'test2', 'quantity': '1.0000 EOS', 'memo': 'hello,world' } #indices is an array of ledger signing key indices eosapi.push_action('eosio.token', 'transfer', args, {'test1':'active'}, indices=[0]) ``` # [Docs](https://learnforpractice.github.io/pyeoskit/#/MODULES?id=pyeoskit-modules) # 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/learnforpractice/pyeoskit cd pyeoskit 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 pyeoskit -y;python -m pip install .\dist\pyeoskit-[SUFFIX].whl ``` ### License [MIT](./LICENSE) %prep %autosetup -n pyeoskit-1.1.12 %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-pyeoskit -f filelist.lst %dir %{python3_sitearch}/* %files help -f doclist.lst %{_docdir}/* %changelog * Tue May 30 2023 Python_Bot - 1.1.12-1 - Package Spec generated