Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
gst-python
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
26
Issues
26
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GStreamer
gst-python
Commits
08d0d09f
Commit
08d0d09f
authored
Nov 03, 2016
by
Thibault Saunier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Play nicely with gst-build uninstalled
As overrides_hack is being used as user sitecustomize script
parent
490028ba
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
testsuite/overrides_hack.py
testsuite/overrides_hack.py
+9
-1
No files found.
testsuite/overrides_hack.py
View file @
08d0d09f
import
os
import
os
import
gi.overrides
import
gi.overrides
FILE
=
os
.
path
.
realpath
(
__file__
)
if
not
gi
.
overrides
.
__path__
[
0
].
endswith
(
"gst-python/gi/overrides"
):
if
not
gi
.
overrides
.
__path__
[
0
].
endswith
(
"gst-python/gi/overrides"
):
local_overrides
=
None
local_overrides
=
None
# our overrides don't take precedence, let's fix it
# our overrides don't take precedence, let's fix it
...
@@ -11,6 +12,13 @@ if not gi.overrides.__path__[0].endswith("gst-python/gi/overrides"):
...
@@ -11,6 +12,13 @@ if not gi.overrides.__path__[0].endswith("gst-python/gi/overrides"):
if
local_overrides
:
if
local_overrides
:
gi
.
overrides
.
__path__
.
remove
(
local_overrides
)
gi
.
overrides
.
__path__
.
remove
(
local_overrides
)
else
:
else
:
local_overrides
=
os
.
path
.
abspath
(
os
.
path
.
join
(
__file__
,
"../"
,
"../"
,
"gi"
,
"overrides"
))
local_overrides
=
os
.
path
.
abspath
(
os
.
path
.
join
(
FILE
,
"../"
,
"../"
,
"gi"
,
"overrides"
))
gi
.
overrides
.
__path__
.
insert
(
0
,
local_overrides
)
gi
.
overrides
.
__path__
.
insert
(
0
,
local_overrides
)
# Execute previously set sitecustomize.py script if it existed
if
os
.
environ
.
get
(
"GST_ENV"
):
old_sitecustomize
=
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
"old.sitecustomize.gstuninstalled.py"
)
if
os
.
path
.
exists
(
old_sitecustomize
):
exec
(
compile
(
open
(
old_sitecustomize
).
read
(),
old_sitecustomize
,
'exec'
))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment