diff --git a/bitcoinlib-0.6.10.tar.gz b/bitcoinlib-0.6.10.tar.gz deleted file mode 100644 index 53baf56d79f476445af3dc55a23068eeb2523a30..0000000000000000000000000000000000000000 Binary files a/bitcoinlib-0.6.10.tar.gz and /dev/null differ diff --git a/python-bitcoinlib-0.12.2.tar.gz b/python-bitcoinlib-0.12.2.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..9b62594ff179400f94e416d65160c6cd38686734 Binary files /dev/null and b/python-bitcoinlib-0.12.2.tar.gz differ diff --git a/python-bitcoinlib.spec b/python-bitcoinlib.spec index 91b8e034744c2cedab78fc98fc7d4219d419d2a6..cfe76e0dca23e9db92ba2ccf647512ed5f33fce1 100644 --- a/python-bitcoinlib.spec +++ b/python-bitcoinlib.spec @@ -1,11 +1,11 @@ %global _empty_manifest_terminate_build 0 Name: python-bitcoinlib -Version: 0.6.10 +Version: 0.12.2 Release: 1 Summary: Bitcoin and Other cryptocurrency Library License: GPL-3.0-only URL: http://github.com/1200wd/bitcoinlib -Source0: https://files.pythonhosted.org/packages/11/36/2b124a87fbdc32cdf999716d7266c4304702be1e1b7c58938d190cfc67fb/bitcoinlib-0.6.10.tar.gz +Source0: https://files.pythonhosted.org/packages/90/a1/ca9d770094a0bfd0f2ce66b7180f0a7729b1b646d90f37f6debf38b28fab/python-bitcoinlib-0.12.2.tar.gz BuildArch: noarch %description @@ -50,28 +50,41 @@ The BitcoinLib connects to various service providers automatically to update wal blockchain information. It does currently not parse the blockchain itself. %prep -%autosetup -n bitcoinlib-%{version} +%autosetup -n python-bitcoinlib-%{version} %build %pyproject_build %install +# Prevent Python from writing bytecode files during installation +export PYTHONDONTWRITEBYTECODE=1 %pyproject_install +# Remove __pycache__ directories (not needed in package, Python will regenerate them at runtime) +find %{buildroot} -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true +find %{buildroot} -name "*.pyc" -delete 2>/dev/null || true +find %{buildroot} -name "*.pyo" -delete 2>/dev/null || true 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 +# Remove __pycache__ directories before generating filelist +find %{buildroot} -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true +find %{buildroot} -name "*.pyc" -delete 2>/dev/null || true +find %{buildroot} -name "*.pyo" -delete 2>/dev/null || true pushd %{buildroot} touch filelist.lst +if [ -d usr/lib ]; then + find usr/lib -type f ! -path "*/__pycache__/*" -printf "/%h/%f\n" >> filelist.lst +fi if [ -d usr/lib64 ]; then - find usr/lib64 -type f -printf "\"/%h/%f\"\n" >> filelist.lst + find usr/lib64 -type f ! -path "*/__pycache__/*" -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/bin ]; then - find usr/bin -type f -printf "\"/%h/%f\"\n" >> filelist.lst + find usr/bin -type f ! -path "*/__pycache__/*" -printf "/%h/%f\n" >> filelist.lst fi if [ -d usr/sbin ]; then - find usr/sbin -type f -printf "\"/%h/%f\"\n" >> filelist.lst + find usr/sbin -type f ! -path "*/__pycache__/*" -printf "/%h/%f\n" >> filelist.lst fi touch doclist.lst if [ -d usr/share/man ]; then @@ -80,14 +93,32 @@ fi popd mv %{buildroot}/filelist.lst . mv %{buildroot}/doclist.lst . +# Final cleanup of __pycache__ before RPM checks for unpackaged files +rm -rf %{buildroot}%{python3_sitelib}/bitcoin/__pycache__ 2>/dev/null || true +rm -rf %{buildroot}%{python3_sitelib}/bitcoin/*/__pycache__ 2>/dev/null || true +rm -rf %{buildroot}%{python3_sitelib}/bitcoin/*/*/__pycache__ 2>/dev/null || true +find %{buildroot} -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true +find %{buildroot} -name "*.pyc" -delete 2>/dev/null || true +find %{buildroot} -name "*.pyo" -delete 2>/dev/null || true %files -n python3-bitcoinlib -f filelist.lst -%{python3_sitelib}/* +%dir %{python3_sitelib}/* +%exclude %{python3_sitelib}/bitcoin/__pycache__ +%exclude %{python3_sitelib}/bitcoin/__pycache__/* +%exclude %{python3_sitelib}/bitcoin/*/__pycache__ +%exclude %{python3_sitelib}/bitcoin/*/__pycache__/* +%exclude %{python3_sitelib}/bitcoin/*/*/__pycache__ +%exclude %{python3_sitelib}/bitcoin/*/*/__pycache__/* -%files help -f doclist.lst +%files help %{_docdir}/* %changelog +* Wed Nov 12 2025 - 0.12.2-1 +- Update package to version 0.12.2 +- Remove __pycache__ directories from package (Python will regenerate them at runtime) +- Add %exclude for all nested __pycache__ directories (including bitcoin/core/contrib) + * Mon Nov 11 2024 liutao1 - 0.6.10-1 - Update package to version 0.6.10 Allow to encrypt private key fields in database