[packages/python3-babel] Up to 2.17.0 (python3 only)

arekm arekm at pld-linux.org
Fri Feb 7 17:33:40 CET 2025


commit e5e54359114e64164af7edf6147af773cba045ef
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Fri Feb 7 17:03:36 2025 +0100

    Up to 2.17.0 (python3 only)

 python-babel.spec => python3-babel.spec | 98 ++++-----------------------------
 1 file changed, 10 insertions(+), 88 deletions(-)
---
diff --git a/python-babel.spec b/python3-babel.spec
similarity index 50%
rename from python-babel.spec
rename to python3-babel.spec
index 546c9b9..a6fe372 100644
--- a/python-babel.spec
+++ b/python3-babel.spec
@@ -2,38 +2,22 @@
 # Conditional build:
 %bcond_without	doc	# Sphinx documentation
 %bcond_without	tests	# unit tests
-%bcond_without	python2	# CPython 2.x module
-%bcond_without	python3	# CPython 3.x module
 
 %define		module	babel
-%define		pypi_name	Babel
+%define		pypi_name	babel
 Summary:	Babel - internationalization library for Python 2
 Summary(pl.UTF-8):	Babel - biblioteka umiędzynaradawiająca dla Pythona 2
-Name:		python-%{module}
-# keep 2.9.x here for python2 support
-Version:	2.9.1
-Release:	4
+Name:		python3-%{module}
+Version:	2.17.0
+Release:	1
 License:	BSD-like
 Group:		Development/Languages/Python
 #Source0Download: https://pypi.org/simple/babel/
-Source0:	https://files.pythonhosted.org/packages/source/B/Babel/%{pypi_name}-%{version}.tar.gz
-# Source0-md5:	7166099733d78aa857d74fa50d8ff58c
+Source0:	https://pypi.debian.net/babel/%{pypi_name}-%{version}.tar.gz
+# Source0-md5:	726d2ed119255a011d248ac0c9caa24a
 URL:		http://babel.pocoo.org/
 BuildRequires:	rpm-pythonprov
 BuildRequires:	rpmbuild(macros) >= 1.714
-%if %{with python2}
-BuildRequires:	python-devel >= 1:2.7
-BuildRequires:	python-devel-tools >= 1:2.7
-BuildRequires:	python-modules >= 1:2.7
-BuildRequires:	python-setuptools
-BuildRequires:	python-pytz >= 2015.7
-%if %{with tests}
-BuildRequires:	python-freezegun
-BuildRequires:	python-pytest
-BuildRequires:	python-pytest-cov
-%endif
-%endif
-%if %{with python3}
 BuildRequires:	python3-devel >= 1:3.4
 BuildRequires:	python3-devel-tools >= 1:3.4
 BuildRequires:	python3-modules >= 1:3.4
@@ -44,7 +28,6 @@ BuildRequires:	python3-freezegun
 BuildRequires:	python3-pytest
 BuildRequires:	python3-pytest-cov
 %endif
-%endif
 %{?with_doc:BuildRequires:	sphinx-pdg}
 Requires:	python-modules >= 1:2.7
 Obsoletes:	python-Babel < 0.9.5-2
@@ -61,22 +44,6 @@ Babel to biblioteka Pythona zawierająca zintegrowany zbiór narzędzi
 pomagających przy umiędzynaradawianiu i lokalizowaniu aplikacji w
 Pythonie (w szczególności aplikacji WWW).
 
-%package -n python3-%{module}
-Summary:	Babel - internationalization library for Python 3
-Summary(pl.UTF-8):	Babel - biblioteka umiędzynaradawiająca dla Pythona 3
-Group:		Libraries/Python
-Requires:	python3-modules >= 1:3.4
-
-%description -n python3-%{module}
-Babel is a Python library that provides an integrated collection of
-utilities that assist with internationalizing and localizing Python
-applications (in particular web-based applications).
-
-%description -n python3-%{module} -l pl.UTF-8
-Babel to biblioteka Pythona zawierająca zintegrowany zbiór narzędzi
-pomagających przy umiędzynaradawianiu i lokalizowaniu aplikacji w
-Pythonie (w szczególności aplikacji WWW).
-
 %package apidocs
 Summary:	Python Babel API documentation
 Summary(pl.UTF-8):	Dokumentacja API biblioteki Pythona Babel
@@ -89,21 +56,9 @@ Python Babel API documentation.
 Dokumentacja API biblioteki Pythona Babel.
 
 %prep
-%setup -q -n Babel-%{version}
+%setup -q -n babel-%{version}
 
 %build
-%if %{with python2}
-%py_build
-
-%if %{with tests}
-# few frontend tests have some (DST-related?) issues with local timezones
-PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
-TZ=UTC \
-%{__python} -m pytest tests
-%endif
-%endif
-
-%if %{with python3}
 %py3_build
 
 %if %{with tests}
@@ -111,7 +66,6 @@ PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
 TZ=UTC \
 %{__python3} -m pytest tests
 %endif
-%endif
 
 %if %{with doc}
 %{__make} -C docs -j1 html
@@ -120,21 +74,9 @@ TZ=UTC \
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%if %{with python3}
 %py3_install
 
 %{__mv} $RPM_BUILD_ROOT%{_bindir}/{pybabel,pybabel3}
-%endif
-
-%if %{with python2}
-%py_install
-
-%py_postclean
-%endif
-
-find $RPM_BUILD_ROOT%{py_sitescriptdir}/babel/locale-data -name '*.dat' | \
-	sed -e "s#^$RPM_BUILD_ROOT##" | \
-	sed -ne 's,.*/\([a-z][a-z][a-z]\?\)\(_[0-9][0-9][0-9]\|_[A-Z][a-z][a-z][a-z]\)\?\(_[A-Z][A-Z]\)\?\(_POSIX\)\?\.dat$,&,p' > py2.lang
 
 find $RPM_BUILD_ROOT%{py3_sitescriptdir}/babel/locale-data -name '*.dat' | \
 	sed -e "s#^$RPM_BUILD_ROOT##" | \
@@ -143,28 +85,9 @@ find $RPM_BUILD_ROOT%{py3_sitescriptdir}/babel/locale-data -name '*.dat' | \
 %clean
 rm -rf $RPM_BUILD_ROOT
 
-%if %{with python2}
-%files -f py2.lang
+%files -f py3.lang
 %defattr(644,root,root,755)
-%doc AUTHORS CHANGES LICENSE
-%attr(755,root,root) %{_bindir}/pybabel
-%dir %{py_sitescriptdir}/babel
-%{py_sitescriptdir}/babel/global.dat
-%{py_sitescriptdir}/babel/*.py[co]
-%dir %{py_sitescriptdir}/babel/localtime
-%{py_sitescriptdir}/babel/localtime/*.py[co]
-%dir %{py_sitescriptdir}/babel/locale-data
-%{py_sitescriptdir}/babel/locale-data/root.dat
-%lang(ca_ES at valencia) %{py_sitescriptdir}/babel/locale-data/ca_ES_VALENCIA.dat
-%dir %{py_sitescriptdir}/babel/messages
-%{py_sitescriptdir}/babel/messages/*.py[co]
-%{py_sitescriptdir}/Babel-%{version}-py*.egg-info
-%endif
-
-%if %{with python3}
-%files -n python3-%{module} -f py3.lang
-%defattr(644,root,root,755)
-%doc AUTHORS CHANGES LICENSE
+%doc AUTHORS CHANGES.rst LICENSE
 %attr(755,root,root) %{_bindir}/pybabel3
 %dir %{py3_sitescriptdir}/babel
 %{py3_sitescriptdir}/babel/__pycache__
@@ -175,8 +98,7 @@ rm -rf $RPM_BUILD_ROOT
 %{py3_sitescriptdir}/babel/locale-data/root.dat
 %lang(ca_ES at valencia) %{py3_sitescriptdir}/babel/locale-data/ca_ES_VALENCIA.dat
 %{py3_sitescriptdir}/babel/messages
-%{py3_sitescriptdir}/Babel-%{version}-py*.egg-info
-%endif
+%{py3_sitescriptdir}/babel-%{version}-py*.egg-info
 
 %if %{with doc}
 %files apidocs
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python3-babel.git/commitdiff/e5e54359114e64164af7edf6147af773cba045ef



More information about the pld-cvs-commit mailing list