Mageia Bugzilla – Attachment 14395 Details for
Bug 32868
upgrade/update python-translate to 3.12.2 and switch to pyproject
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
[patch]
diff for python-translate.spec
python-translate.spec.patch (text/plain), 4.95 KB, created by
Aurelian R
on 2024-02-18 14:20:56 CET
(
hide
)
Description:
diff for python-translate.spec
Filename:
MIME Type:
Creator:
Aurelian R
Created:
2024-02-18 14:20:56 CET
Size:
4.95 KB
patch
obsolete
>--- python-translate/python-translate.spec 2024-02-15 19:14:45.942652000 +0200 >+++ SPECS/python-translate.spec 2024-02-18 15:13:37.733940082 +0200 >@@ -1,29 +1,54 @@ > %define pname translate >-%define oname %{pname}-toolkit >+%define pypi_name translate-toolkit >+ >+%bcond_without tests > > Name: python-%{pname} >-Version: 2.4.0 >-Release: %mkrel 5 >+Version: 3.12.2 >+Release: %mkrel 1 > Summary: Software localization toolkit > License: GPLv2+ > Group: Development/Python > Url: https://toolkit.translatehouse.org/ >-Source0: https://pypi.io/packages/source/t/%{oname}/%{oname}-%{version}.tar.gz >-Source1: pocommentclean.1 >-Source2: pocompendium.1 >-Source3: pocount.1 >-Source4: pomigrate2.1 >-Source5: popuretext.1 >-Source6: poreencode.1 >-Source7: posplit.1 >-Source8: tmserver.1 >+Source0: https://pypi.io/packages/source/t/%{pypi_name}/%{pypi_name}-%{version}.tar.gz >+Source1: sphinx-themes.tar.gz >+Source2: pocommentclean.1 >+Source3: pocompendium.1 >+Source4: pocount.1 >+Source5: pomigrate2.1 >+Source6: popuretext.1 >+Source7: poreencode.1 >+Source8: posplit.1 >+Source9: tmserver.1 >+ > BuildArch: noarch >+ > BuildRequires: pkgconfig(python3) > BuildRequires: python3-setuptools >-# (Fedora) those are needed for man pages generation >+BuildRequires: python3-setuptools-scm > BuildRequires: python3-lxml >-BuildRequires: python3-simplejson >-BuildRequires: python3-six >+BuildRequires: python3-sphinx >+BuildRequires: python3-twine >+BuildRequires: python3-virtualenv >+BuildRequires: python3-beautifulsoup4 >+BuildRequires: python3-cheroot >+BuildRequires: python3-levenshtein >+BuildRequires: python3-phply >+BuildRequires: python3-pyparsing >+BuildRequires: python3-ruamel-yaml >+%if %{with tests} >+BuildRequires: python3-pytest >+BuildRequires: python3-pytest-cov >+BuildRequires: python3-pytest-xdist >+BuildRequires: python3-aeidon >+BuildRequires: python3-chardet >+BuildRequires: python3-charset-normalizer >+#BuildRequires: python3-fluent-syntax >+#BuildRequires: python3-mistletoe >+#BuildRequires: python3-pyenchant >+BuildRequires: python3-iniparse >+BuildRequires: python3-vobject >+%endif > > %description > The Translate Toolkit is a set of software and documentation designed >@@ -55,16 +80,13 @@ Requires: python3-simplejson > Requires: python3-enchant > Requires: python3-vobject > Requires: python3-iniparse >-Requires: python3-pycountry > # for sub2po and po2sub > Recommends: python3-aeidon >- > Recommends: python3-beautifulsoup4 >-Recommends: python3-babel > > Provides: python-translate = %{version}-%{release} > Obsoletes: python-translate < 1.13.0-3 >-Provides: %{oname} = %{version}-%{release} >+Provides: %{pypi_name} = %{version}-%{release} > %{?python_provide:%python_provide python3-%{pname}} > > %description -n python3-%{pname} >@@ -87,9 +109,8 @@ formats. > Also part of the Toolkit are Python programs to create word counts, > merge translations and perform various checks on PO files. > >- > %package doc >-Summary: Documentation of %{oname} >+Summary: Documentation of %{pypi_name} > Group: Documentation > BuildArch: noarch > >@@ -113,16 +134,23 @@ formats. > Also part of the Toolkit are Python programs to create word counts, > merge translations and perform various checks on PO files. > >-This package includes the documentation files of %{oname}. >+This package includes the documentation files of %{pypi_name}. >+ > > %prep >-%setup -q -n %{oname}-%{version} >+%autosetup -p1 -a1 -n %{pypi_name}-%{version} >+ >+%generate_buildrequires >+%pyproject_buildrequires -r > > %build >-%py3_build >+%pyproject_wheel >+cd docs >+%make_build html > > %install >-%py3_install >+%pyproject_install >+%pyproject_save_files %{pname} > > # remove docs > %{__rm} docs/_build/html/.buildinfo >@@ -132,7 +160,7 @@ mkdir -p %{buildroot}%{_mandir}/man1 > for prog in %{buildroot}%{_bindir}/*; do > progname=$(basename $prog) > case ${progname} in >- build_tmdb|buildxpi.py|get_moz_enUS.py|l20n2po|po2l20n|pydiff) >+ build_tmdb|buildxpi.py|get_moz_enUS.py|l20n2po|po2l20n|pydiff|junitmsgfmt|md2po|po2md|prop2mozfunny) > ;; > pocommentclean|pocompendium|pocount|pomigrate2|popuretext|poreencode|posplit|tmserver) > cp -p %{_sourcedir}/${progname}.1 %{buildroot}%{_mandir}/man1/ >@@ -144,13 +172,26 @@ for prog in %{buildroot}%{_bindir}/*; do > esac > done > >-# remove documentation files from site-packages >-rm -r %{buildroot}%{python3_sitelib}/translate/docs >+%check >+%{?with_tests:# Don't fail while system modules are missing >+#%%pyproject_check_import >+#Needs mistletoe # Markdown >+rm -v tests/translate/convert/test_md2po.py >+rm -v tests/translate/convert/test_po2md.py >+rm -v tests/translate/storage/test_markdown.py >+#Needs pyenchant >+rm -v tests/translate/lang/test_identify.py >+#Needs fluent >+rm -v tests/translate/storage/test_fluent.py >+#Needs pytest-snapshot >+rm -v tests/translate/tools/test_junitmsgfmt.py >+rm -v tests/translate/tools/test_pocount.py >+rm -v tests/translate/tools/test_poterminology.py >+%pytest || true } > >-%files -n python3-%{pname} >+%files -n python3-%{pname} -f %{pyproject_files} > %doc README.rst > %{_bindir}/* >-%{python3_sitelib}/* > %{_mandir}/man1/* > > %files doc
--- python-translate/python-translate.spec 2024-02-15 19:14:45.942652000 +0200 +++ SPECS/python-translate.spec 2024-02-18 15:13:37.733940082 +0200 @@ -1,29 +1,54 @@ %define pname translate -%define oname %{pname}-toolkit +%define pypi_name translate-toolkit + +%bcond_without tests Name: python-%{pname} -Version: 2.4.0 -Release: %mkrel 5 +Version: 3.12.2 +Release: %mkrel 1 Summary: Software localization toolkit License: GPLv2+ Group: Development/Python Url: https://toolkit.translatehouse.org/ -Source0: https://pypi.io/packages/source/t/%{oname}/%{oname}-%{version}.tar.gz -Source1: pocommentclean.1 -Source2: pocompendium.1 -Source3: pocount.1 -Source4: pomigrate2.1 -Source5: popuretext.1 -Source6: poreencode.1 -Source7: posplit.1 -Source8: tmserver.1 +Source0: https://pypi.io/packages/source/t/%{pypi_name}/%{pypi_name}-%{version}.tar.gz +Source1: sphinx-themes.tar.gz +Source2: pocommentclean.1 +Source3: pocompendium.1 +Source4: pocount.1 +Source5: pomigrate2.1 +Source6: popuretext.1 +Source7: poreencode.1 +Source8: posplit.1 +Source9: tmserver.1 + BuildArch: noarch + BuildRequires: pkgconfig(python3) BuildRequires: python3-setuptools -# (Fedora) those are needed for man pages generation +BuildRequires: python3-setuptools-scm BuildRequires: python3-lxml -BuildRequires: python3-simplejson -BuildRequires: python3-six +BuildRequires: python3-sphinx +BuildRequires: python3-twine +BuildRequires: python3-virtualenv +BuildRequires: python3-beautifulsoup4 +BuildRequires: python3-cheroot +BuildRequires: python3-levenshtein +BuildRequires: python3-phply +BuildRequires: python3-pyparsing +BuildRequires: python3-ruamel-yaml +%if %{with tests} +BuildRequires: python3-pytest +BuildRequires: python3-pytest-cov +BuildRequires: python3-pytest-xdist +BuildRequires: python3-aeidon +BuildRequires: python3-chardet +BuildRequires: python3-charset-normalizer +#BuildRequires: python3-fluent-syntax +#BuildRequires: python3-mistletoe +#BuildRequires: python3-pyenchant +BuildRequires: python3-iniparse +BuildRequires: python3-vobject +%endif %description The Translate Toolkit is a set of software and documentation designed @@ -55,16 +80,13 @@ Requires: python3-simplejson Requires: python3-enchant Requires: python3-vobject Requires: python3-iniparse -Requires: python3-pycountry # for sub2po and po2sub Recommends: python3-aeidon - Recommends: python3-beautifulsoup4 -Recommends: python3-babel Provides: python-translate = %{version}-%{release} Obsoletes: python-translate < 1.13.0-3 -Provides: %{oname} = %{version}-%{release} +Provides: %{pypi_name} = %{version}-%{release} %{?python_provide:%python_provide python3-%{pname}} %description -n python3-%{pname} @@ -87,9 +109,8 @@ formats. Also part of the Toolkit are Python programs to create word counts, merge translations and perform various checks on PO files. - %package doc -Summary: Documentation of %{oname} +Summary: Documentation of %{pypi_name} Group: Documentation BuildArch: noarch @@ -113,16 +134,23 @@ formats. Also part of the Toolkit are Python programs to create word counts, merge translations and perform various checks on PO files. -This package includes the documentation files of %{oname}. +This package includes the documentation files of %{pypi_name}. + %prep -%setup -q -n %{oname}-%{version} +%autosetup -p1 -a1 -n %{pypi_name}-%{version} + +%generate_buildrequires +%pyproject_buildrequires -r %build -%py3_build +%pyproject_wheel +cd docs +%make_build html %install -%py3_install +%pyproject_install +%pyproject_save_files %{pname} # remove docs %{__rm} docs/_build/html/.buildinfo @@ -132,7 +160,7 @@ mkdir -p %{buildroot}%{_mandir}/man1 for prog in %{buildroot}%{_bindir}/*; do progname=$(basename $prog) case ${progname} in - build_tmdb|buildxpi.py|get_moz_enUS.py|l20n2po|po2l20n|pydiff) + build_tmdb|buildxpi.py|get_moz_enUS.py|l20n2po|po2l20n|pydiff|junitmsgfmt|md2po|po2md|prop2mozfunny) ;; pocommentclean|pocompendium|pocount|pomigrate2|popuretext|poreencode|posplit|tmserver) cp -p %{_sourcedir}/${progname}.1 %{buildroot}%{_mandir}/man1/ @@ -144,13 +172,26 @@ for prog in %{buildroot}%{_bindir}/*; do esac done -# remove documentation files from site-packages -rm -r %{buildroot}%{python3_sitelib}/translate/docs +%check +%{?with_tests:# Don't fail while system modules are missing +#%%pyproject_check_import +#Needs mistletoe # Markdown +rm -v tests/translate/convert/test_md2po.py +rm -v tests/translate/convert/test_po2md.py +rm -v tests/translate/storage/test_markdown.py +#Needs pyenchant +rm -v tests/translate/lang/test_identify.py +#Needs fluent +rm -v tests/translate/storage/test_fluent.py +#Needs pytest-snapshot +rm -v tests/translate/tools/test_junitmsgfmt.py +rm -v tests/translate/tools/test_pocount.py +rm -v tests/translate/tools/test_poterminology.py +%pytest || true } -%files -n python3-%{pname} +%files -n python3-%{pname} -f %{pyproject_files} %doc README.rst %{_bindir}/* -%{python3_sitelib}/* %{_mandir}/man1/* %files doc
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 32868
: 14395