diff options
| author | CoprDistGit <infra@openeuler.org> | 2023-04-10 10:22:07 +0000 |
|---|---|---|
| committer | CoprDistGit <infra@openeuler.org> | 2023-04-10 10:22:07 +0000 |
| commit | 9ee9b294d2c5b95bc9c3af0538b713ea2b0a2a6f (patch) | |
| tree | ef71c9b7bdbeb9c44dee174fb09130329a4d7928 | |
| parent | e2923096dd5e09b5b30e5612d3faf8f4cb67fe80 (diff) | |
automatic import of python-base58
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | python-base58.spec | 261 | ||||
| -rw-r--r-- | sources | 1 |
3 files changed, 263 insertions, 0 deletions
@@ -0,0 +1 @@ +/base58-2.1.1.tar.gz diff --git a/python-base58.spec b/python-base58.spec new file mode 100644 index 0000000..bac32f8 --- /dev/null +++ b/python-base58.spec @@ -0,0 +1,261 @@ +%global _empty_manifest_terminate_build 0 +Name: python-base58 +Version: 2.1.1 +Release: 1 +Summary: Base58 and Base58Check implementation. +License: MIT +URL: https://github.com/keis/base58 +Source0: https://mirrors.nju.edu.cn/pypi/web/packages/7f/45/8ae61209bb9015f516102fa559a2914178da1d5868428bd86a1b4421141d/base58-2.1.1.tar.gz +BuildArch: noarch + +Requires: python3-mypy +Requires: python3-PyHamcrest +Requires: python3-pytest +Requires: python3-pytest-benchmark +Requires: python3-pytest-cov +Requires: python3-pytest-flake8 + +%description +# base58 + +[![PyPI Version][pypi-image]](https://pypi.python.org/pypi?name=base58&:action=display) +[![PyPI Downloads][pypi-downloads-image]](https://pypi.python.org/pypi?name=base58&:action=display) +[![Build Status][travis-image]](https://travis-ci.org/keis/base58) +[![Coverage Status][coveralls-image]](https://coveralls.io/r/keis/base58?branch=master) + +Base58 and Base58Check implementation compatible with what is used by the +bitcoin network. Any other alternative alphabet (like the XRP one) can be used. + +Starting from version 2.0.0 **python2 is no longer supported** the 1.x series +will remain supported but no new features will be added. + + +## Command line usage + + $ printf "hello world" | base58 + StV1DL6CwTryKyV + + $ printf "hello world" | base58 -c + 3vQB7B6MrGQZaxCuFg4oh + + $ printf "3vQB7B6MrGQZaxCuFg4oh" | base58 -dc + hello world + + $ printf "4vQB7B6MrGQZaxCuFg4oh" | base58 -dc + Invalid checksum + + +## Module usage + + >>> import base58 + >>> base58.b58encode(b'hello world') + b'StV1DL6CwTryKyV' + >>> base58.b58decode(b'StV1DL6CwTryKyV') + b'hello world' + >>> base58.b58encode_check(b'hello world') + b'3vQB7B6MrGQZaxCuFg4oh' + >>> base58.b58decode_check(b'3vQB7B6MrGQZaxCuFg4oh') + b'hello world' + >>> base58.b58decode_check(b'4vQB7B6MrGQZaxCuFg4oh') + Traceback (most recent call last): + File "<stdin>", line 1, in <module> + File "base58.py", line 89, in b58decode_check + raise ValueError("Invalid checksum") + ValueError: Invalid checksum + # Use another alphabet. Here, using the built-in XRP/Ripple alphabet. + # RIPPLE_ALPHABET is provided as an option for compatibility with existing code + # It is recommended to use XRP_ALPHABET instead + >>> base58.b58encode(b'hello world', alphabet=base58.XRP_ALPHABET) + b'StVrDLaUATiyKyV' + >>> base58.b58decode(b'StVrDLaUATiyKyV', alphabet=base58.XRP_ALPHABET) + b'hello world' + + +[pypi-image]: https://img.shields.io/pypi/v/base58.svg?style=flat +[pypi-downloads-image]: https://img.shields.io/pypi/dm/base58.svg?style=flat +[travis-image]: https://img.shields.io/travis/keis/base58.svg?style=flat +[coveralls-image]: https://img.shields.io/coveralls/keis/base58.svg?style=flat + + + + +%package -n python3-base58 +Summary: Base58 and Base58Check implementation. +Provides: python-base58 +BuildRequires: python3-devel +BuildRequires: python3-setuptools +BuildRequires: python3-pip +%description -n python3-base58 +# base58 + +[![PyPI Version][pypi-image]](https://pypi.python.org/pypi?name=base58&:action=display) +[![PyPI Downloads][pypi-downloads-image]](https://pypi.python.org/pypi?name=base58&:action=display) +[![Build Status][travis-image]](https://travis-ci.org/keis/base58) +[![Coverage Status][coveralls-image]](https://coveralls.io/r/keis/base58?branch=master) + +Base58 and Base58Check implementation compatible with what is used by the +bitcoin network. Any other alternative alphabet (like the XRP one) can be used. + +Starting from version 2.0.0 **python2 is no longer supported** the 1.x series +will remain supported but no new features will be added. + + +## Command line usage + + $ printf "hello world" | base58 + StV1DL6CwTryKyV + + $ printf "hello world" | base58 -c + 3vQB7B6MrGQZaxCuFg4oh + + $ printf "3vQB7B6MrGQZaxCuFg4oh" | base58 -dc + hello world + + $ printf "4vQB7B6MrGQZaxCuFg4oh" | base58 -dc + Invalid checksum + + +## Module usage + + >>> import base58 + >>> base58.b58encode(b'hello world') + b'StV1DL6CwTryKyV' + >>> base58.b58decode(b'StV1DL6CwTryKyV') + b'hello world' + >>> base58.b58encode_check(b'hello world') + b'3vQB7B6MrGQZaxCuFg4oh' + >>> base58.b58decode_check(b'3vQB7B6MrGQZaxCuFg4oh') + b'hello world' + >>> base58.b58decode_check(b'4vQB7B6MrGQZaxCuFg4oh') + Traceback (most recent call last): + File "<stdin>", line 1, in <module> + File "base58.py", line 89, in b58decode_check + raise ValueError("Invalid checksum") + ValueError: Invalid checksum + # Use another alphabet. Here, using the built-in XRP/Ripple alphabet. + # RIPPLE_ALPHABET is provided as an option for compatibility with existing code + # It is recommended to use XRP_ALPHABET instead + >>> base58.b58encode(b'hello world', alphabet=base58.XRP_ALPHABET) + b'StVrDLaUATiyKyV' + >>> base58.b58decode(b'StVrDLaUATiyKyV', alphabet=base58.XRP_ALPHABET) + b'hello world' + + +[pypi-image]: https://img.shields.io/pypi/v/base58.svg?style=flat +[pypi-downloads-image]: https://img.shields.io/pypi/dm/base58.svg?style=flat +[travis-image]: https://img.shields.io/travis/keis/base58.svg?style=flat +[coveralls-image]: https://img.shields.io/coveralls/keis/base58.svg?style=flat + + + + +%package help +Summary: Development documents and examples for base58 +Provides: python3-base58-doc +%description help +# base58 + +[![PyPI Version][pypi-image]](https://pypi.python.org/pypi?name=base58&:action=display) +[![PyPI Downloads][pypi-downloads-image]](https://pypi.python.org/pypi?name=base58&:action=display) +[![Build Status][travis-image]](https://travis-ci.org/keis/base58) +[![Coverage Status][coveralls-image]](https://coveralls.io/r/keis/base58?branch=master) + +Base58 and Base58Check implementation compatible with what is used by the +bitcoin network. Any other alternative alphabet (like the XRP one) can be used. + +Starting from version 2.0.0 **python2 is no longer supported** the 1.x series +will remain supported but no new features will be added. + + +## Command line usage + + $ printf "hello world" | base58 + StV1DL6CwTryKyV + + $ printf "hello world" | base58 -c + 3vQB7B6MrGQZaxCuFg4oh + + $ printf "3vQB7B6MrGQZaxCuFg4oh" | base58 -dc + hello world + + $ printf "4vQB7B6MrGQZaxCuFg4oh" | base58 -dc + Invalid checksum + + +## Module usage + + >>> import base58 + >>> base58.b58encode(b'hello world') + b'StV1DL6CwTryKyV' + >>> base58.b58decode(b'StV1DL6CwTryKyV') + b'hello world' + >>> base58.b58encode_check(b'hello world') + b'3vQB7B6MrGQZaxCuFg4oh' + >>> base58.b58decode_check(b'3vQB7B6MrGQZaxCuFg4oh') + b'hello world' + >>> base58.b58decode_check(b'4vQB7B6MrGQZaxCuFg4oh') + Traceback (most recent call last): + File "<stdin>", line 1, in <module> + File "base58.py", line 89, in b58decode_check + raise ValueError("Invalid checksum") + ValueError: Invalid checksum + # Use another alphabet. Here, using the built-in XRP/Ripple alphabet. + # RIPPLE_ALPHABET is provided as an option for compatibility with existing code + # It is recommended to use XRP_ALPHABET instead + >>> base58.b58encode(b'hello world', alphabet=base58.XRP_ALPHABET) + b'StVrDLaUATiyKyV' + >>> base58.b58decode(b'StVrDLaUATiyKyV', alphabet=base58.XRP_ALPHABET) + b'hello world' + + +[pypi-image]: https://img.shields.io/pypi/v/base58.svg?style=flat +[pypi-downloads-image]: https://img.shields.io/pypi/dm/base58.svg?style=flat +[travis-image]: https://img.shields.io/travis/keis/base58.svg?style=flat +[coveralls-image]: https://img.shields.io/coveralls/keis/base58.svg?style=flat + + + + +%prep +%autosetup -n base58-2.1.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-base58 -f filelist.lst +%dir %{python3_sitelib}/* + +%files help -f doclist.lst +%{_docdir}/* + +%changelog +* Mon Apr 10 2023 Python_Bot <Python_Bot@openeuler.org> - 2.1.1-1 +- Package Spec generated @@ -0,0 +1 @@ +3595b886f6d57b947fa8d38d4c92e5b3 base58-2.1.1.tar.gz |
