add Bootstrap for Python 3.10

This commit is contained in:
panxiaohe 2021-12-03 16:11:57 +08:00
parent 1596fcc061
commit d75cac1adc

View File

@ -1,6 +1,10 @@
%global _with_bootstrap 1
%bcond_with bootstrap
Name: babel Name: babel
Version: 2.9.1 Version: 2.9.1
Release: 2 Release: 3
Summary: Tools for internationalizing and localizing Python applications Summary: Tools for internationalizing and localizing Python applications
License: BSD License: BSD
URL: http://babel.pocoo.org/ URL: http://babel.pocoo.org/
@ -9,7 +13,10 @@ Source0: https://files.pythonhosted.org/packages/source/B/Babel/Babel-%{version}
BuildArch: noarch BuildArch: noarch
BuildRequires: gcc make BuildRequires: gcc make
BuildRequires: python3-devel python3-setuptools python3-pytz python3-pytest python3-freezegun python3-sphinx BuildRequires: python3-devel python3-setuptools
%if !%{with bootstrap}
BuildRequires: python3-pytz python3-pytest python3-freezegun python3-sphinx
%endif
Requires: python3-babel python3-setuptools Requires: python3-babel python3-setuptools
@ -26,6 +33,7 @@ Requires: python3-pytz
Babel is an integrated collection of utilities that assist in internationalizing and Babel is an integrated collection of utilities that assist in internationalizing and
localizing Python applications, with an emphasis on web-based applications. localizing Python applications, with an emphasis on web-based applications.
%if !%{with bootstrap}
%package help %package help
Summary: Documentation for Babel Summary: Documentation for Babel
Provides: python-babel-doc = %{version}-%{release} Provides: python-babel-doc = %{version}-%{release}
@ -35,6 +43,7 @@ Obsoletes: babel-doc
%description help %description help
Documentation for Babel Documentation for Babel
%endif
%prep %prep
%autosetup -n Babel-%{version} -p1 %autosetup -n Babel-%{version} -p1
@ -44,6 +53,8 @@ Documentation for Babel
BUILDDIR="$PWD/built-docs" BUILDDIR="$PWD/built-docs"
rm -rf "$BUILDDIR" rm -rf "$BUILDDIR"
%if !%{with bootstrap}
pushd docs pushd docs
make \ make \
SPHINXBUILD=sphinx-build-3 \ SPHINXBUILD=sphinx-build-3 \
@ -51,13 +62,16 @@ make \
html html
popd popd
rm -f "$BUILDDIR/html/.buildinfo" rm -f "$BUILDDIR/html/.buildinfo"
%endif
%install %install
%py3_install %py3_install
%check %check
export TZ=UTC export TZ=UTC
%if !%{with bootstrap}
%{__python3} -m pytest %{__python3} -m pytest
%endif
%pre %pre
@ -76,10 +90,15 @@ export TZ=UTC
%{python3_sitelib}/Babel-%{version}-py*.egg-info %{python3_sitelib}/Babel-%{version}-py*.egg-info
%{python3_sitelib}/babel %{python3_sitelib}/babel
%if !%{with bootstrap}
%files help %files help
%doc built-docs/html/* %doc built-docs/html/*
%endif
%changelog %changelog
* Fri Dec 3 2021 panxiaohe <panxiaohe@huawei.com> - 2.9.1-3
- add Bootstrap for Python 3.10
* Fri Jul 30 2021 chenyanpanHW <chenyanpan@huawei.com> - 2.9.1-2 * Fri Jul 30 2021 chenyanpanHW <chenyanpan@huawei.com> - 2.9.1-2
- DESC: delete -Sgit from %autosetup, and delete BuildRequires git - DESC: delete -Sgit from %autosetup, and delete BuildRequires git