mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 776046 - Add a pth file in virtualenv site-packages for $topsrcdir/build and $topsrcdir/config. r=ted
This commit is contained in:
parent
bc952222ea
commit
15394ba7bd
@ -7,3 +7,5 @@ setup.py:testing/mozbase/mozprocess:develop
|
||||
setup.py:testing/mozbase/mozprofile:develop
|
||||
setup.py:testing/mozbase/mozrunner:develop
|
||||
setup.py:python/blessings:develop
|
||||
mozilla.pth:build
|
||||
mozilla.pth:config
|
||||
|
@ -5,9 +5,11 @@
|
||||
# This file contains code for populating the virtualenv environment for
|
||||
# Mozilla's build system. It is typically called as part of configure.
|
||||
|
||||
from __future__ import with_statement
|
||||
import os.path
|
||||
import subprocess
|
||||
import sys
|
||||
import distutils.sysconfig
|
||||
|
||||
def populate_virtualenv(top_source_directory, manifest_filename):
|
||||
"""Populate the virtualenv from the contents of a manifest.
|
||||
@ -38,6 +40,11 @@ def populate_virtualenv(top_source_directory, manifest_filename):
|
||||
|
||||
call_setup(os.path.join(top_source_directory, package[1]),
|
||||
package[2:])
|
||||
if package[0].endswith('.pth'):
|
||||
assert len(package) == 2
|
||||
|
||||
with open(os.path.join(distutils.sysconfig.get_python_lib(), package[0]), 'a') as f:
|
||||
f.write("%s\n" % os.path.join(top_source_directory, package[1]))
|
||||
|
||||
def call_setup(directory, arguments):
|
||||
"""Calls setup.py in a directory."""
|
||||
|
Loading…
Reference in New Issue
Block a user