summaryrefslogtreecommitdiff
path: root/python-bech32.spec
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2023-04-11 12:32:58 +0000
committerCoprDistGit <infra@openeuler.org>2023-04-11 12:32:58 +0000
commitcc0985faccdc83cd0390da1962702fc29c7bd365 (patch)
treed7b7d7a63a8c723b55d2aab8b011126eb09d2589 /python-bech32.spec
parent33c2ca4ed77db2392fd3aca67034d75765468e74 (diff)
automatic import of python-bech32
Diffstat (limited to 'python-bech32.spec')
-rw-r--r--python-bech32.spec75
1 files changed, 75 insertions, 0 deletions
diff --git a/python-bech32.spec b/python-bech32.spec
new file mode 100644
index 0000000..aa06918
--- /dev/null
+++ b/python-bech32.spec
@@ -0,0 +1,75 @@
+%global _empty_manifest_terminate_build 0
+Name: python-bech32
+Version: 1.2.0
+Release: 1
+Summary: Reference implementation for Bech32 and segwit addresses.
+License: MIT
+URL: https://github.com/fiatjaf/bech32
+Source0: https://mirrors.nju.edu.cn/pypi/web/packages/ab/fe/b67ac9b123e25a3c1b8fc3f3c92648804516ab44215adb165284e024c43f/bech32-1.2.0.tar.gz
+BuildArch: noarch
+
+
+%description
+Since this implementation wasn't in a place that was easy to use for Python programmers I took it from from https://github.com/rustyrussell/lightning-payencode and published [on GitHub](https://github.com/fiatjaf/bech32) and [on PyPI](https://pypi.org/project/bech32/).
+The original version of this package is probably the one at https://github.com/sipa/bech32/tree/master/ref/python, but apparently Rusty Russel commented out the 90-length limit of bech32-encoded stuff so it could be used for Lightning invoices. Let's keep that change.
+
+%package -n python3-bech32
+Summary: Reference implementation for Bech32 and segwit addresses.
+Provides: python-bech32
+BuildRequires: python3-devel
+BuildRequires: python3-setuptools
+BuildRequires: python3-pip
+%description -n python3-bech32
+Since this implementation wasn't in a place that was easy to use for Python programmers I took it from from https://github.com/rustyrussell/lightning-payencode and published [on GitHub](https://github.com/fiatjaf/bech32) and [on PyPI](https://pypi.org/project/bech32/).
+The original version of this package is probably the one at https://github.com/sipa/bech32/tree/master/ref/python, but apparently Rusty Russel commented out the 90-length limit of bech32-encoded stuff so it could be used for Lightning invoices. Let's keep that change.
+
+%package help
+Summary: Development documents and examples for bech32
+Provides: python3-bech32-doc
+%description help
+Since this implementation wasn't in a place that was easy to use for Python programmers I took it from from https://github.com/rustyrussell/lightning-payencode and published [on GitHub](https://github.com/fiatjaf/bech32) and [on PyPI](https://pypi.org/project/bech32/).
+The original version of this package is probably the one at https://github.com/sipa/bech32/tree/master/ref/python, but apparently Rusty Russel commented out the 90-length limit of bech32-encoded stuff so it could be used for Lightning invoices. Let's keep that change.
+
+%prep
+%autosetup -n bech32-1.2.0
+
+%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-bech32 -f filelist.lst
+%dir %{python3_sitelib}/*
+
+%files help -f doclist.lst
+%{_docdir}/*
+
+%changelog
+* Tue Apr 11 2023 Python_Bot <Python_Bot@openeuler.org> - 1.2.0-1
+- Package Spec generated