6 |
6 |
7 - virtualenv |
7 - virtualenv |
8 - distribute |
8 - distribute |
9 - psycopg2 requires the PostgreSQL libpq libraries and the pg_config utility |
9 - psycopg2 requires the PostgreSQL libpq libraries and the pg_config utility |
10 |
10 |
|
11 - python project-boot.py --distribute --no-site-packages --index-url=http://pypi.websushi.org/ --clear --type-install=local --ignore-packages=MYSQL <path_to_venv> |
11 - python project-boot.py --no-site-packages --clear --ignore-packages=MYSQL --type-install=local <path_to_venv> |
12 - python project-boot.py --no-site-packages --clear --ignore-packages=MYSQL --type-install=local <path_to_venv> |
12 - For Linux : |
13 - For Linux : |
13 python project-boot.py --unzip-setuptools --no-site-packages --ignore-packages=MYSQL --clear --type-install=local <path_to_venv> |
14 python project-boot.py --unzip-setuptools --no-site-packages --index-url=http://pypi.websushi.org/ --clear --type-install=local <path_to_venv> |
|
15 |
|
16 Probleme avec mysql : |
|
17 |
|
18 sudo install_name_tool -change libmysqlclient.18.dylib /usr/local/mysql/lib/libmysqlclient.18.dylib ~/dev/workspace/platform/virtualenv/web/env/venv_platform/lib/python2.7/site-packages/_mysql.so |
14 |
19 |
15 """ |
20 """ |
16 |
21 |
17 import os |
22 import os |
18 import subprocess |
23 import subprocess |
24 base_dir = here |
29 base_dir = here |
25 script_name = os.path.join(base_dir, 'project-boot.py') |
30 script_name = os.path.join(base_dir, 'project-boot.py') |
26 |
31 |
27 import virtualenv |
32 import virtualenv |
28 |
33 |
29 # things to install |
|
30 # - psycopg2 -> pip |
|
31 # - PIL -> pip |
|
32 # - pyxml -> pip |
|
33 # - 4Suite-xml - easy_install ftp://ftp.4suite.org/pub/4Suite/4Suite-XML-1.0.2.tar.bz2 |
|
34 # - pylucene - script |
|
35 |
|
36 src_base = os.path.abspath(os.path.join(here,"..","res","src")).replace("\\","/") |
34 src_base = os.path.abspath(os.path.join(here,"..","res","src")).replace("\\","/") |
37 lib_path = os.path.abspath(os.path.join(here,"..","res","lib")).replace("\\","/") |
35 lib_path = os.path.abspath(os.path.join(here,"..","res","lib")).replace("\\","/") |
38 patch_path = os.path.abspath(os.path.join(here,"res","patch")).replace("\\","/") |
36 patch_path = os.path.abspath(os.path.join(here,"res","patch")).replace("\\","/") |
39 |
37 |
40 |
38 |
41 EXTRA_TEXT = "import sys\n" |
39 EXTRA_TEXT = "import sys\n" |
42 EXTRA_TEXT += "sys.path.append('%s')\n" % (lib_path) |
40 EXTRA_TEXT += "sys.path.append('%s')\n" % (lib_path) |
43 EXTRA_TEXT += "sys.path.append('%s')\n" % (os.path.abspath(os.path.join(here,"res")).replace("\\","/")) |
41 EXTRA_TEXT += "sys.path.append('%s')\n" % (os.path.abspath(os.path.join(here,"res")).replace("\\","/")) |
44 EXTRA_TEXT += "from res_create_env import generate_install_methods\n" |
42 EXTRA_TEXT += "from res_create_env import generate_install_methods\n" |
45 EXTRA_TEXT += "adjust_options, extend_parser, after_install = generate_install_methods(path_locations, '%s', Logger, call_subprocess)\n" % (src_base) |
43 EXTRA_TEXT += "adjust_options, extend_parser, after_install = generate_install_methods(path_locations, '%s', Logger, call_subprocess)\n" % (src_base) |
46 |
|
47 |
|
48 |
|
49 #f = open(os.path.join(os.path. os.path.join(os.path.dirname(os.path.abspath(__file__)),"res"),'res_create_env.py'), 'r') |
|
50 #EXTRA_TEXT += f.read() |
|
51 #EXTRA_TEXT += "\n" |
|
52 #EXTRA_TEXT += "RES_ENV = ResourcesEnv('%s')\n" % (src_base) |
|
53 |
44 |
54 def main(): |
45 def main(): |
55 python_version = ".".join(map(str,sys.version_info[0:2])) |
46 python_version = ".".join(map(str,sys.version_info[0:2])) |
56 text = virtualenv.create_bootstrap_script(EXTRA_TEXT, python_version=python_version) |
47 text = virtualenv.create_bootstrap_script(EXTRA_TEXT, python_version=python_version) |
57 if os.path.exists(script_name): |
48 if os.path.exists(script_name): |