diff options
author | CoprDistGit <infra@openeuler.org> | 2023-05-05 07:24:22 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-05-05 07:24:22 +0000 |
commit | 836f49ac74fc5f4ee9cf12d45ed060fff725a61f (patch) | |
tree | 686ec63b663849b9ca8fd9b6c094fa18cddfd37a /python-pythonpancakes.spec | |
parent | 68f4a98be226b6c8c6635d73547f488063de8026 (diff) |
automatic import of python-pythonpancakesopeneuler20.03
Diffstat (limited to 'python-pythonpancakes.spec')
-rw-r--r-- | python-pythonpancakes.spec | 184 |
1 files changed, 184 insertions, 0 deletions
diff --git a/python-pythonpancakes.spec b/python-pythonpancakes.spec new file mode 100644 index 0000000..d41fe5c --- /dev/null +++ b/python-pythonpancakes.spec @@ -0,0 +1,184 @@ +%global _empty_manifest_terminate_build 0 +Name: python-pythonpancakes +Version: 1.0.1 +Release: 1 +Summary: A basic request wrapper for the PancakeSwap API +License: MIT +URL: https://github.com/scottburlovich/pythonpancakes +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/9d/40/a97f4822a6c5afe1794d04090e3ddcd7fa81757b981bc75c9fcfe65be36e/pythonpancakes-1.0.1.tar.gz +BuildArch: noarch + +Requires: python3-requests + +%description +## `tokens(address)` +If address parameter is specified, returns the token information, based on address. Otherwise, +returns the tokens in the top ~1000 pairs on PancakeSwap, sorted by reserves. +Example invocation without address: +```python +tokens = ps.tokens() +``` +Example output without address: +```python +{ + "updated_at": 1234567, // UNIX timestamp + "data": { + "0x...": { // the address of the BEP20 token + "name": "...", // not necessarily included for BEP20 tokens + "symbol": "...", // not necessarily included for BEP20 tokens + "price": "...", // price denominated in USD + "price_BNB": "...", // price denominated in BNB + }, + // ... + } +} +``` +Example invocation with address: +```python +token = ps.tokens('0x00000000000...') +``` +Example output with address: +```python +# output +{ + "updated_at": 1234567, // UNIX timestamp + "data": { + "name": "...", // not necessarily included for BEP20 tokens + "symbol": "...", // not necessarily included for BEP20 tokens + "price": "...", // price denominated in USD + "price_BNB": "...", // price denominated in BNB + } +} + +%package -n python3-pythonpancakes +Summary: A basic request wrapper for the PancakeSwap API +Provides: python-pythonpancakes +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-pythonpancakes +## `tokens(address)` +If address parameter is specified, returns the token information, based on address. Otherwise, +returns the tokens in the top ~1000 pairs on PancakeSwap, sorted by reserves. +Example invocation without address: +```python +tokens = ps.tokens() +``` +Example output without address: +```python +{ + "updated_at": 1234567, // UNIX timestamp + "data": { + "0x...": { // the address of the BEP20 token + "name": "...", // not necessarily included for BEP20 tokens + "symbol": "...", // not necessarily included for BEP20 tokens + "price": "...", // price denominated in USD + "price_BNB": "...", // price denominated in BNB + }, + // ... + } +} +``` +Example invocation with address: +```python +token = ps.tokens('0x00000000000...') +``` +Example output with address: +```python +# output +{ + "updated_at": 1234567, // UNIX timestamp + "data": { + "name": "...", // not necessarily included for BEP20 tokens + "symbol": "...", // not necessarily included for BEP20 tokens + "price": "...", // price denominated in USD + "price_BNB": "...", // price denominated in BNB + } +} + +%package help +Summary: Development documents and examples for pythonpancakes +Provides: python3-pythonpancakes-doc +%description help +## `tokens(address)` +If address parameter is specified, returns the token information, based on address. Otherwise, +returns the tokens in the top ~1000 pairs on PancakeSwap, sorted by reserves. +Example invocation without address: +```python +tokens = ps.tokens() +``` +Example output without address: +```python +{ + "updated_at": 1234567, // UNIX timestamp + "data": { + "0x...": { // the address of the BEP20 token + "name": "...", // not necessarily included for BEP20 tokens + "symbol": "...", // not necessarily included for BEP20 tokens + "price": "...", // price denominated in USD + "price_BNB": "...", // price denominated in BNB + }, + // ... + } +} +``` +Example invocation with address: +```python +token = ps.tokens('0x00000000000...') +``` +Example output with address: +```python +# output +{ + "updated_at": 1234567, // UNIX timestamp + "data": { + "name": "...", // not necessarily included for BEP20 tokens + "symbol": "...", // not necessarily included for BEP20 tokens + "price": "...", // price denominated in USD + "price_BNB": "...", // price denominated in BNB + } +} + +%prep +%autosetup -n pythonpancakes-1.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-pythonpancakes -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Fri May 05 2023 Python_Bot <Python_Bot@openeuler.org> - 1.0.1-1 +- Package Spec generated |