#9 Disable Python 2 build entirely
Merged 2 years ago by fschwarz. Opened 2 years ago by churchyard.
rpms/ churchyard/babel nopy2  into  master

file modified
+6 -53
@@ -6,18 +6,9 @@ 

  # And pytest is at this point not yet ready

  %bcond_with bootstrap

  

- # There is an exception to ship python2-babel on Fedora, for trac:

- # https://pagure.io/fesco/issue/2260

- %if 0%{?fedora}

- %bcond_without python2

- %else

- %bcond_with python2

- %endif

- 

- 

  Name:           babel

  Version:        2.9.0

- Release:        2%{?dist}

+ Release:        3%{?dist}

  Summary:        Tools for internationalizing Python applications

  

  License:        BSD
@@ -26,10 +17,6 @@ 

  

  BuildArch:      noarch

  

- %if %{with python2}

- BuildRequires:  python2-devel

- BuildRequires:  python2-setuptools

- %endif

  BuildRequires:  python3-devel

  BuildRequires:  python3-setuptools

  %if !%{with bootstrap}
@@ -58,33 +45,9 @@ 

    and date formatting, etc.

  

  

- %if %{with python2}

- %package -n python2-babel

- Summary:        %sum

- 

- Requires:       python2-setuptools

- Requires:       python2-pytz

- 

- %{?python_provide:%python_provide python2-babel}

- 

- %description -n python2-babel

- Babel is composed of two major parts:

- 

- * tools to build and work with gettext message catalogs

- 

- * a Python interface to the CLDR (Common Locale Data Repository),

-   providing access to various locale display names, localized number

-   and date formatting, etc.

- %endif

- 

- 

  %package -n python3-babel

  Summary:        %sum

  

- %if %{without python2}

- Obsoletes:      python2-babel < 2.7.0-6%{?dist}

- %endif

- 

  Requires:       python3-setuptools

  Requires:       python3-pytz

  
@@ -103,7 +66,6 @@ 

  %package doc

  Summary:        Documentation for Babel

  Provides:       python-babel-doc = %{version}-%{release}

- Provides:       python2-babel-doc = %{version}-%{release}

  Provides:       python3-babel-doc = %{version}-%{release}

  

  %description doc
@@ -114,9 +76,6 @@ 

  %autosetup -p1 -n %{srcname}-%{version}

  

  %build

- %if %{with python2}

- %py2_build

- %endif

  %py3_build

  

  BUILDDIR="$PWD/built-docs"
@@ -133,9 +92,6 @@ 

  %endif

  

  %install

- %if %{with python2}

- %py2_install

- %endif

  %py3_install

  

  %check
@@ -149,15 +105,9 @@ 

  %license LICENSE

  %{_bindir}/pybabel

  

- %if %{with python2}

- %files -n python2-babel

- %{python2_sitelib}/Babel-%{version}-py*.egg-info

- %{python2_sitelib}/babel

- %endif

- 

  %files -n python3-babel

- %{python3_sitelib}/Babel-%{version}-py*.egg-info

- %{python3_sitelib}/babel

+ %{python3_sitelib}/Babel-%{version}-py*.egg-info/

+ %{python3_sitelib}/babel/

  

  %if !%{with bootstrap}

  %files doc
@@ -165,6 +115,9 @@ 

  %endif

  

  %changelog

+ * Mon Dec 21 2020 Miro Hrončok <mhroncok@redhat.com> - 2.9.0-3

+ - Disable Python 2 build entirely

+ 

  * Tue Nov 24 2020 Miro Hrončok <mhroncok@redhat.com>

  - Disable Python 2 build on RHEL 9+

  

trac-accountmanager-plugin is currently orphaned and I don't expect that someone will pick it up so we are just waiting on python-jinja2.

This already fails to install, so no point in waiting for jinja2: https://bugzilla.redhat.com/show_bug.cgi?id=1911067

hmm, I expected that pytz would not drop its python2 subpackage before babel so I'm not really happy how this turned out.

anyway, let's move forward assuming jinja2 will also drop python2 support.

Pull-Request has been merged by fschwarz

2 years ago

hmm, I expected that pytz would not drop its python2 subpackage before babel

Same for me, but what's done is done.