#22 Use bundled Python 2 libraries during build
Merged 4 years ago by spot. Opened 4 years ago by churchyard.
rpms/ churchyard/chromium bundlepylibs  into  master

file modified
+14 -3
@@ -105,6 +105,10 @@ 

  # 2017-06-08.

  %global bundlelibxml 1

  

+ # Fedora's Python 2 stack is being removed, we use the bundled Python libraries

+ # This can be revisited once we upgrade to Python 3

+ %global bundlepylibs 1

+ 

  # Chromium used to break on wayland, hidpi, and colors with gtk3 enabled.

  # Hopefully it does not anymore.

  %global gtk3 1
@@ -515,8 +519,11 @@ 

  %else

  BuildRequires:	pkgconfig(gtk+-2.0)

  %endif

- BuildRequires:	python2-devel

- %if 0%{?fedora} > 27

+ BuildRequires:	/usr/bin/python2

+ %if 0%{?bundlepylibs}

+ # Using bundled bits, do nothing.

+ %else

+ %if 0%{?fedora}

  BuildRequires:	python2-beautifulsoup4

  BuildRequires:	python2-beautifulsoup

  BuildRequires:	python2-html5lib
@@ -530,6 +537,8 @@ 

  BuildRequires:	python-ply

  %endif

  BuildRequires:	python2-simplejson

+ BuildRequires:	python2-devel

+ %endif

  %if 0%{?bundlere2}

  # Using bundled bits, do nothing.

  %else
@@ -1257,7 +1266,7 @@ 

  %endif

  	'third_party/lss' \

  	'third_party/lzma_sdk' \

- %if 0

+ %if 0%{?bundlepylibs}

  	'third_party/markupsafe' \

  %endif

  	'third_party/mesa' \
@@ -1345,10 +1354,12 @@ 

  	'v8/third_party/inspector_protocol' \

  	--do-remove

  

+ %if ! 0%{?bundlepylibs}

  # Look, I don't know. This package is spit and chewing gum. Sorry.

  rm -rf third_party/markupsafe

  ln -s %{python2_sitearch}/markupsafe third_party/markupsafe

  # We should look on removing other python2 packages as well i.e. ply

+ %endif

  

  # Fix hardcoded path in remoting code

  sed -i 's|/opt/google/chrome-remote-desktop|%{crd_path}|g' remoting/host/setup/daemon_controller_delegate_linux.cc

This removes the dependency on a small stack of Python 2 libraries.

There is a %global flag to control this, however only markupsafe is handled
differently when %bundlepylibs is set, other libraries seem to have been bundled
already.

rebased onto ec9d075

4 years ago

This works. I've rebased it now, hopefully it will work again. It looks like the BuildRequired libraries were not used at all, except markupsafe.

Pull-Request has been merged by spot

4 years ago