From 92e192afdfcacc1f1cf8ec0713746e16f6bf9e3d Mon Sep 17 00:00:00 2001 From: antialias Date: Mon, 17 Sep 2012 14:45:17 -0400 Subject: ignore pep8 errors in src/leap/_version.py because it is autogenerated. --- run_tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run_tests.sh b/run_tests.sh index 96121d3e..6505dd54 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -77,7 +77,7 @@ function run_pep8 { echo "Running pep8 ..." srcfiles="src/leap tests" # Just run PEP8 in current environment - pep8_opts="--ignore=E202,W602 --exclude=*_rc.py --repeat" + pep8_opts="--ignore=E202,W602 --exclude=*_rc.py,_version.py --repeat" ${wrapper} pep8 ${pep8_opts} ${srcfiles} } -- cgit v1.2.3 From 5343d884d0ad6efd4f3b24826361773675842c4d Mon Sep 17 00:00:00 2001 From: antialias Date: Mon, 17 Sep 2012 17:22:33 -0400 Subject: 1) changed src to pkg in the path to successfully create .venv environ. 2) uses distribute instead of setuptools. 3) creates symlinks to PyQT and sip.so. --- pkg/install_venv.py | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/pkg/install_venv.py b/pkg/install_venv.py index 15385beb..17dfb984 100644 --- a/pkg/install_venv.py +++ b/pkg/install_venv.py @@ -29,8 +29,8 @@ import sys ROOT = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) VENV = os.path.join(ROOT, '.venv') -PIP_REQUIRES = os.path.join(ROOT, 'setup', 'requirements.pip') -TEST_REQUIRES = os.path.join(ROOT, 'setup', 'test-requirements.pip') +PIP_REQUIRES = os.path.join(ROOT, 'pkg', 'requirements.pip') +TEST_REQUIRES = os.path.join(ROOT, 'pkg', 'test-requirements.pip') PY_VERSION = "python%s.%s" % (sys.version_info[0], sys.version_info[1]) @@ -108,6 +108,10 @@ class Debian(Distro): def apply_patch(self, originalfile, patchfile): run_command(['patch', originalfile, patchfile]) + def post_process(self): + #symlink qt in virtualenv + run_command(['pkg/tools/with_venv.sh', 'pkg/postmkvenv.sh']) + def install_virtualenv(self): if self.check_cmd('virtualenv'): return @@ -163,19 +167,22 @@ def create_virtualenv(venv=VENV, no_site_packages=True): """ print 'Creating venv...', if no_site_packages: - run_command(['virtualenv', '-q', '--no-site-packages', VENV]) + #setuptools and virtualenv don't play nicely together, + #so we create the virtualenv with the distribute package instead. + #See: view-source:http://pypi.python.org/pypi/distribute + run_command(['virtualenv', '-q', '--distribute', '--no-site-packages', VENV]) else: - run_command(['virtualenv', '-q', VENV]) + run_command(['virtualenv', '-q', '--distribute', VENV]) print 'done.' print 'Installing pip in virtualenv...', - if not run_command(['setup/tools/with_venv.sh', 'easy_install', + if not run_command(['pkg/tools/with_venv.sh', 'easy_install', 'pip>1.0']).strip(): die("Failed to install pip.") print 'done.' def pip_install(*args): - run_command(['setup/tools/with_venv.sh', + run_command(['pkg/tools/with_venv.sh', 'pip', 'install', '--upgrade'] + list(args), redirect_output=False) @@ -211,7 +218,7 @@ def print_help(): Or, if you prefer, you can run commands in the virtualenv on a case by case basis by running: - $ setup/tools/with_venv.sh + $ pkg/tools/with_venv.sh Also, make test will automatically use the virtualenv. """ -- cgit v1.2.3