mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-29 21:21:12 +00:00
uninstalled: Avoid failling while setting up PyGObject env hack files
This commit is contained in:
parent
5fd196b3d1
commit
4ef0584295
1 changed files with 4 additions and 0 deletions
|
@ -1,6 +1,7 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import argparse
|
import argparse
|
||||||
|
import contextlib
|
||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
import platform
|
import platform
|
||||||
|
@ -186,6 +187,9 @@ def python_env(options, unset_env=False):
|
||||||
elif not os.path.exists(sitepackages):
|
elif not os.path.exists(sitepackages):
|
||||||
os.makedirs(sitepackages)
|
os.makedirs(sitepackages)
|
||||||
|
|
||||||
|
with contextlib.suppress(FileNotFoundError):
|
||||||
|
os.remove(sitecustomize)
|
||||||
|
os.remove(mesonconfig_link)
|
||||||
os.symlink(overrides_hack, sitecustomize)
|
os.symlink(overrides_hack, sitecustomize)
|
||||||
os.symlink(mesonconfig, mesonconfig_link)
|
os.symlink(mesonconfig, mesonconfig_link)
|
||||||
return os.path.realpath(sitecustomize) == overrides_hack
|
return os.path.realpath(sitecustomize) == overrides_hack
|
||||||
|
|
Loading…
Reference in a new issue