%global srcname bitcoin %global sum Python Bitcoin Tools Name: python-%{srcname} Version: 1.1.42 Release: 1%{?dist} Summary: %{sum} License: MIT URL: http://github.com/vbuterin/pybitcointools Source0: https://files.pythonhosted.org/packages/source/b/%{srcname}/%{srcname}-%{version}.tar.gz #Fixes that the following files will not be installed: #/usr/LICENSE #/usr/bitcoin/english.txt Patch0: disable-data-files.patch BuildArch: noarch #Broken on python3, will fail in runtime. BuildRequires: python2-devel %description Pybitcointools, Python library for Bitcoin signatures and transactions. %package -n python2-%{srcname} Summary: %{sum} %{?python_provide:%python_provide python2-%{srcname}} %description -n python2-%{srcname} Pybitcointools, Python library for Bitcoin signatures and transactions. %prep %autosetup -n %{srcname}-%{version} rm -rf %{srcname}.egg-info %build %py2_build %install %py2_install # Remove shebang lines from .py files that aren't executable, and # remove executability from .py files that don't have a shebang line: # Source: dmalcolm.fedorapeople.org/python3.spec find %{buildroot} -name \*.py \ \( \( \! -perm /u+x,g+x,o+x -exec sed -e '/^#!/Q 0' -e 'Q 1' {} \; \ -print -exec sed -i '1d' {} \; \) -o \( \ -perm /u+x,g+x,o+x ! -exec grep -m 1 -q '^#!' {} \; \ -exec chmod a-x {} \; \) \) %check %{__python2} setup.py test %files -n python2-%{srcname} %{_bindir}/pybtctool %doc PKG-INFO %doc README.txt %license LICENSE %{python2_sitelib}/* %changelog * Tue Sep 05 2017 Jonny Heggheim - 1.1.42-1 - Inital packaging