diff --git a/python-sphinx-intl.spec b/python-sphinx-intl.spec index 8fc965b69e197d82d34d29ac57c44c6163a6a2c1..3978756bc5eafea55500936d8f812a0cb34ca15b 100644 --- a/python-sphinx-intl.spec +++ b/python-sphinx-intl.spec @@ -1,11 +1,11 @@ %global _empty_manifest_terminate_build 0 Name: python-sphinx-intl -Version: 2.1.0 +Version: 2.3.2 Release: 1 Summary: Sphinx utility that make it easy to translate and to apply translation. License: BSD URL: https://github.com/sphinx-doc/sphinx-intl -Source0: https://files.pythonhosted.org/packages/3f/49/9229216d3fdce197912e4756e044f3d3fbac73326ef8a49af186d7c2832b/sphinx-intl-2.1.0.tar.gz +Source0: https://files.pythonhosted.org/packages/7a/21/eb12016ecb0b52861762b0d227dff75622988f238776a5ee4c75bade507e/sphinx_intl-2.3.2.tar.gz BuildArch: noarch @@ -18,6 +18,9 @@ Summary: Sphinx utility that make it easy to translate and to apply translation. Provides: python-sphinx-intl BuildRequires: python3-devel BuildRequires: python3-setuptools +BuildRequires: python3-setuptools_scm +BuildRequires: python3-pip +BuildRequires: python3-wheel %description -n python3-sphinx-intl sphinx-intl is a utility tool that provides several features that make it easy to translate and to apply translation to Sphinx generated document. @@ -30,30 +33,41 @@ sphinx-intl is a utility tool that provides several features that make it easy to translate and to apply translation to Sphinx generated document. %prep -%autosetup -n sphinx-intl-2.1.0 +%autosetup -n sphinx_intl-%{version} %build -%py3_build +export SETUPTOOLS_SCM_PRETEND_VERSION='%{version}' +%pyproject_build %install -%py3_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} if [ -d usr/lib ]; then - find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst + 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 @@ -62,14 +76,25 @@ 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}/sphinx_intl/__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-sphinx-intl -f filelist.lst %dir %{python3_sitelib}/* +%exclude %{python3_sitelib}/sphinx_intl/__pycache__ +%exclude %{python3_sitelib}/sphinx_intl/__pycache__/* -%files help -f doclist.lst +%files help %{_docdir}/* %changelog +* Wed Nov 12 2025 - 2.3.2-1 +- Update package to version 2.3.2 +- Remove __pycache__ directories from package (Python will regenerate them at runtime) + * Wed Jul 12 2023 niuyaru - 2.1.0-1 - Update package to version 2.1.0 diff --git a/sphinx-intl-2.1.0.tar.gz b/sphinx-intl-2.1.0.tar.gz deleted file mode 100644 index b4a999b8898531e047d8139532bbe8ded4cff3bd..0000000000000000000000000000000000000000 Binary files a/sphinx-intl-2.1.0.tar.gz and /dev/null differ diff --git a/sphinx_intl-2.3.2.tar.gz b/sphinx_intl-2.3.2.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..435c8416ebbcd9173b309a0d5fb24d72b8b349c8 Binary files /dev/null and b/sphinx_intl-2.3.2.tar.gz differ