Browse code

Add hack to fix ply installation on opensuse

The python3-ply package is indirectly a dependency of dhcp-client, which
is not exactly an optional package. Pip >=10 refuses to install ply from
global-requirements with this distro package is installed, so our only
option is to remove it manually.

Change-Id: I377fdd4a581eb4b6275584d92cafc0b783fe3b84

Colleen Murphy authored on 2019/03/01 07:44:14
Showing 1 changed files
... ...
@@ -228,6 +228,14 @@ function fixup_suse {
228 228
         sudo systemctl disable apparmor
229 229
         sudo /usr/sbin/aa-teardown
230 230
     fi
231
+
232
+    # Since pip10, pip will refuse to uninstall files from packages
233
+    # that were created with distutils (rather than more modern
234
+    # setuptools).  This is because it technically doesn't have a
235
+    # manifest of what to remove.  However, in most cases, simply
236
+    # overwriting works.  So this hacks around those packages that
237
+    # have been dragged in by some other system dependency
238
+    sudo rm -rf /usr/lib/python3.6/site-packages/ply-*.egg-info
231 239
 }
232 240
 
233 241
 # The version of pip(1.5.4) supported by python-virtualenv(1.11.4) has