summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-05-10 09:29:29 +0000
committerCoprDistGit <infra@openeuler.org>2023-05-10 09:29:29 +0000
commit8b5593494f36ee0313ca3fbff0ffcd4b9af375b6 (patch)
tree51c47bbb6ba3896777bb2bf68d0606a78db4b7d2
parent14d241aec288c3138a34dca252a95fa39fb73e0f (diff)
automatic import of python-diem
-rw-r--r--.gitignore1
-rw-r--r--python-diem.spec360
-rw-r--r--sources1
3 files changed, 362 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..d1ea4e5 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/diem-1.7.1.tar.gz
diff --git a/python-diem.spec b/python-diem.spec
new file mode 100644
index 0000000..9659374
--- /dev/null
+++ b/python-diem.spec
@@ -0,0 +1,360 @@
+%global _empty_manifest_terminate_build 0
+Name: python-diem
+Version: 1.7.1
+Release: 1
+Summary: The Python Client SDK for Diem
+License: Apache-2.0
+URL: https://github.com/diem/client-sdk-python
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/81/d2/399e995c3d22f048a5d2d5452d8f9b7b27e1a8d6071013de6d0167280bc2/diem-1.7.1.tar.gz
+BuildArch: noarch
+
+Requires: python3-requests
+Requires: python3-cryptography
+Requires: python3-numpy
+Requires: python3-protobuf
+Requires: python3-aiohttp
+Requires: python3-falcon
+Requires: python3-waitress
+Requires: python3-pytest
+Requires: python3-click
+
+%description
+# The official Diem Client SDK for Python.
+
+[![pypi](https://img.shields.io/pypi/v/diem)](https://pypi.org/project/diem/)
+![Apache V2 License](https://img.shields.io/pypi/l/diem)
+![Python versoins](https://img.shields.io/pypi/pyversions/diem)
+
+[API Reference](https://diem.github.io/client-sdk-python/diem)
+
+## Pypi package
+
+https://pypi.org/project/diem/
+
+## Examples
+
+```python3
+
+>>> from diem import jsonrpc, testnet
+>>> client = jsonrpc.Client(testnet.JSON_RPC_URL)
+>>> client.get_metadata()
+version: 3300304
+timestamp: 1601492912847973
+chain_id: 2
+
+```
+
+You can find more examples under the [`examples`](./examples/) directory:
+
+* [Create Child VASP account](./examples/create_child_vasp.py)
+* [All Types Peer To Peer Transfer](./examples/p2p_transfer.py)
+* [Intent Identifier](./examples/intent_identifier.py)
+
+Note: `make test` runs all examples too, see the Makefile for details.
+
+### Off-chain service example
+
+Checkout [MiniWallet](./src/diem/testing/miniwallet/app) implementation for off-chain service implementation example.
+
+## MiniWallet and MiniWallet Test Suite
+
+See [mini_wallet.md](mini-wallet.md)
+
+
+## Build & Test
+
+```
+make init
+make test
+```
+
+run specific test:
+
+```
+make test t=<test file / test name match pattern>
+```
+
+run with local docker testnet (requires initializing diem submodule):
+
+```
+make test t=<test file / test name match pattern> dt=1
+```
+
+## Re-generate diem_types, stdlib, jsonrpc response data structures
+
+```
+git submodule update --init diem
+cd diem
+git pull origin main
+cd ..
+make gen
+```
+
+## Modules Overview
+
+> SPEC = specification
+
+> DIP-X = Diem Improvement Protocol
+
+Root module name: `diem`
+
+Sub-modules:
+
+- `jsonrpc`: diem JSON-RPC APIs client and API response types. [SPEC](https://github.com/diem/diem/blob/master/json-rpc/json-rpc-spec.md)
+- `stdlib`: generated code, move stdlib script utils for constructing transaction script playload.
+- `diem_types`: generated code, Diem on-chain data structure types for encoding and decoding [BCS](https://crates.io/crates/bcs) data.
+- `utils`: utility functions, account address utils, currency code, hashing, hex encoding / decoding, transaction utils.
+- `AuthKey` | `auth_key`: auth key utils
+- `identifier`: Diem Account Identifier and Diem Intent Identifier. [DIP-5](https://dip.diem.com/dip-5/)
+- `txnmetadata`: utils for creating peer to peer transaction metadata. [DIP-4](https://dip.diem.com/dip-4/)
+- `testnet`: Testnet utility, minting coins, create Testnet client, chain id, Testnet JSON-RPC URL.
+- `testing`: Testing utility, MiniWallet application, MiniWallet test suites, `LocalAccount` for managing local account keys and generating random local account.
+- `chain_ids`: list of static chain ids
+
+
+
+
+%package -n python3-diem
+Summary: The Python Client SDK for Diem
+Provides: python-diem
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-diem
+# The official Diem Client SDK for Python.
+
+[![pypi](https://img.shields.io/pypi/v/diem)](https://pypi.org/project/diem/)
+![Apache V2 License](https://img.shields.io/pypi/l/diem)
+![Python versoins](https://img.shields.io/pypi/pyversions/diem)
+
+[API Reference](https://diem.github.io/client-sdk-python/diem)
+
+## Pypi package
+
+https://pypi.org/project/diem/
+
+## Examples
+
+```python3
+
+>>> from diem import jsonrpc, testnet
+>>> client = jsonrpc.Client(testnet.JSON_RPC_URL)
+>>> client.get_metadata()
+version: 3300304
+timestamp: 1601492912847973
+chain_id: 2
+
+```
+
+You can find more examples under the [`examples`](./examples/) directory:
+
+* [Create Child VASP account](./examples/create_child_vasp.py)
+* [All Types Peer To Peer Transfer](./examples/p2p_transfer.py)
+* [Intent Identifier](./examples/intent_identifier.py)
+
+Note: `make test` runs all examples too, see the Makefile for details.
+
+### Off-chain service example
+
+Checkout [MiniWallet](./src/diem/testing/miniwallet/app) implementation for off-chain service implementation example.
+
+## MiniWallet and MiniWallet Test Suite
+
+See [mini_wallet.md](mini-wallet.md)
+
+
+## Build & Test
+
+```
+make init
+make test
+```
+
+run specific test:
+
+```
+make test t=<test file / test name match pattern>
+```
+
+run with local docker testnet (requires initializing diem submodule):
+
+```
+make test t=<test file / test name match pattern> dt=1
+```
+
+## Re-generate diem_types, stdlib, jsonrpc response data structures
+
+```
+git submodule update --init diem
+cd diem
+git pull origin main
+cd ..
+make gen
+```
+
+## Modules Overview
+
+> SPEC = specification
+
+> DIP-X = Diem Improvement Protocol
+
+Root module name: `diem`
+
+Sub-modules:
+
+- `jsonrpc`: diem JSON-RPC APIs client and API response types. [SPEC](https://github.com/diem/diem/blob/master/json-rpc/json-rpc-spec.md)
+- `stdlib`: generated code, move stdlib script utils for constructing transaction script playload.
+- `diem_types`: generated code, Diem on-chain data structure types for encoding and decoding [BCS](https://crates.io/crates/bcs) data.
+- `utils`: utility functions, account address utils, currency code, hashing, hex encoding / decoding, transaction utils.
+- `AuthKey` | `auth_key`: auth key utils
+- `identifier`: Diem Account Identifier and Diem Intent Identifier. [DIP-5](https://dip.diem.com/dip-5/)
+- `txnmetadata`: utils for creating peer to peer transaction metadata. [DIP-4](https://dip.diem.com/dip-4/)
+- `testnet`: Testnet utility, minting coins, create Testnet client, chain id, Testnet JSON-RPC URL.
+- `testing`: Testing utility, MiniWallet application, MiniWallet test suites, `LocalAccount` for managing local account keys and generating random local account.
+- `chain_ids`: list of static chain ids
+
+
+
+
+%package help
+Summary: Development documents and examples for diem
+Provides: python3-diem-doc
+%description help
+# The official Diem Client SDK for Python.
+
+[![pypi](https://img.shields.io/pypi/v/diem)](https://pypi.org/project/diem/)
+![Apache V2 License](https://img.shields.io/pypi/l/diem)
+![Python versoins](https://img.shields.io/pypi/pyversions/diem)
+
+[API Reference](https://diem.github.io/client-sdk-python/diem)
+
+## Pypi package
+
+https://pypi.org/project/diem/
+
+## Examples
+
+```python3
+
+>>> from diem import jsonrpc, testnet
+>>> client = jsonrpc.Client(testnet.JSON_RPC_URL)
+>>> client.get_metadata()
+version: 3300304
+timestamp: 1601492912847973
+chain_id: 2
+
+```
+
+You can find more examples under the [`examples`](./examples/) directory:
+
+* [Create Child VASP account](./examples/create_child_vasp.py)
+* [All Types Peer To Peer Transfer](./examples/p2p_transfer.py)
+* [Intent Identifier](./examples/intent_identifier.py)
+
+Note: `make test` runs all examples too, see the Makefile for details.
+
+### Off-chain service example
+
+Checkout [MiniWallet](./src/diem/testing/miniwallet/app) implementation for off-chain service implementation example.
+
+## MiniWallet and MiniWallet Test Suite
+
+See [mini_wallet.md](mini-wallet.md)
+
+
+## Build & Test
+
+```
+make init
+make test
+```
+
+run specific test:
+
+```
+make test t=<test file / test name match pattern>
+```
+
+run with local docker testnet (requires initializing diem submodule):
+
+```
+make test t=<test file / test name match pattern> dt=1
+```
+
+## Re-generate diem_types, stdlib, jsonrpc response data structures
+
+```
+git submodule update --init diem
+cd diem
+git pull origin main
+cd ..
+make gen
+```
+
+## Modules Overview
+
+> SPEC = specification
+
+> DIP-X = Diem Improvement Protocol
+
+Root module name: `diem`
+
+Sub-modules:
+
+- `jsonrpc`: diem JSON-RPC APIs client and API response types. [SPEC](https://github.com/diem/diem/blob/master/json-rpc/json-rpc-spec.md)
+- `stdlib`: generated code, move stdlib script utils for constructing transaction script playload.
+- `diem_types`: generated code, Diem on-chain data structure types for encoding and decoding [BCS](https://crates.io/crates/bcs) data.
+- `utils`: utility functions, account address utils, currency code, hashing, hex encoding / decoding, transaction utils.
+- `AuthKey` | `auth_key`: auth key utils
+- `identifier`: Diem Account Identifier and Diem Intent Identifier. [DIP-5](https://dip.diem.com/dip-5/)
+- `txnmetadata`: utils for creating peer to peer transaction metadata. [DIP-4](https://dip.diem.com/dip-4/)
+- `testnet`: Testnet utility, minting coins, create Testnet client, chain id, Testnet JSON-RPC URL.
+- `testing`: Testing utility, MiniWallet application, MiniWallet test suites, `LocalAccount` for managing local account keys and generating random local account.
+- `chain_ids`: list of static chain ids
+
+
+
+
+%prep
+%autosetup -n diem-1.7.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-diem -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Wed May 10 2023 Python_Bot <Python_Bot@openeuler.org> - 1.7.1-1
+- Package Spec generated
diff --git a/sources b/sources
new file mode 100644
index 0000000..4bed877
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+b07ee946d469cc19451b1b756dd6c226 diem-1.7.1.tar.gz