fix attribute error module distutils has no attribute sysconfig

Signed-off-by: cherry530 <xuping33@huawei.com>
This commit is contained in:
cherry530 2022-07-21 15:10:41 +08:00
parent 5614317c88
commit 0ce4abcf4d
2 changed files with 28 additions and 1 deletions

View File

@ -88,7 +88,7 @@
Summary: Mozilla Firefox Web browser Summary: Mozilla Firefox Web browser
Name: firefox Name: firefox
Version: 79.0 Version: 79.0
Release: 12 Release: 13
URL: https://www.mozilla.org/firefox/ URL: https://www.mozilla.org/firefox/
License: MPLv1.1 or GPLv2+ or LGPLv2+ License: MPLv1.1 or GPLv2+ or LGPLv2+
Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}/source/firefox-%{version}.source.tar.xz Source0: https://archive.mozilla.org/pub/firefox/releases/%{version}/source/firefox-%{version}.source.tar.xz
@ -188,6 +188,7 @@ Patch643: firefox-crashreporter-build.patch
Patch644: Deny-clone3-to-force-glibc-fallback.patch Patch644: Deny-clone3-to-force-glibc-fallback.patch
Patch645: 0001-fix-wl_proxy_marshal_flags.patch Patch645: 0001-fix-wl_proxy_marshal_flags.patch
Patch646: 0002-fix-from-collections-import-Iterable.patch Patch646: 0002-fix-from-collections-import-Iterable.patch
Patch647: fix-attribute-error-module-distutils-has-no-attribute-sysconfig.patch
%if %{?system_nss} %if %{?system_nss}
BuildRequires: pkgconfig(nspr) >= %{nspr_version} pkgconfig(nss) >= %{nss_version} BuildRequires: pkgconfig(nspr) >= %{nspr_version} pkgconfig(nss) >= %{nss_version}
@ -369,6 +370,7 @@ tar -xf %{SOURCE3}
%patch644 -p1 %patch644 -p1
%patch645 -p1 %patch645 -p1
%patch646 -p1 %patch646 -p1
%patch647 -p1
%{__rm} -f .mozconfig %{__rm} -f .mozconfig
%{__cp} %{SOURCE10} .mozconfig %{__cp} %{SOURCE10} .mozconfig
@ -811,6 +813,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
%endif %endif
%changelog %changelog
* Thu Jul 21 2022 xu_ping <xuping33@h-partners.com> - 79.0-13
- Fix attribute error module distutils has no attribute sysconfig
* Fri May 6 2022 liyanan <liyanan32@h-partners.com> - 79.0-12 * Fri May 6 2022 liyanan <liyanan32@h-partners.com> - 79.0-12
- Fix compilation failure by python3.10 and wayland 1.20 - Fix compilation failure by python3.10 and wayland 1.20

View File

@ -0,0 +1,22 @@
diff --git a/build/moz.configure/init.configure b/build/moz.configure/init.configure
index e87d59f..9b5413e 100644
--- a/build/moz.configure/init.configure
+++ b/build/moz.configure/init.configure
@@ -245,7 +245,7 @@ option(env='PYTHON3', nargs=1, help='Python 3 interpreter (3.6 or later)')
@imports('os')
@imports('sys')
@imports('subprocess')
-@imports('distutils.sysconfig')
+@imports(_from='distutils.sysconfig', _import='get_python_lib')
@imports(_from='mozbuild.configure.util', _import='LineIO')
@imports(_from='mozbuild.virtualenv', _import='VirtualenvManager')
@imports(_from='mozbuild.virtualenv', _import='verify_python_version')
@@ -376,7 +376,7 @@ def virtualenv_python3(env_python, build_env, mozconfig, help):
sys.exit(subprocess.call([python] + sys.argv))
# We are now in the virtualenv
- if not distutils.sysconfig.get_python_lib():
+ if not get_python_lib():
die('Could not determine python site packages directory')
str_version = '.'.join(str(v) for v in version)