--- a/virtualenv/res/lib/lib_create_env.py Fri Feb 15 12:06:30 2013 +0100
+++ b/virtualenv/res/lib/lib_create_env.py Wed Feb 27 00:19:02 2013 +0100
@@ -17,8 +17,8 @@
URLS = {
#'': {'setup': '', 'url':'', 'local':''},
'DISTRIBUTE': {'setup': 'distribute', 'url':'http://pypi.python.org/packages/source/d/distribute/distribute-0.6.31.tar.gz', 'local':"distribute-0.6.31.tar.gz", 'install': {'method': 'pip', 'option_str': None, 'dict_extra_env': None}},
- 'DJANGO': {'setup': 'django', 'url': 'http://www.djangoproject.com/download/1.4.2/tarball/', 'local':"Django-1.4.2.tar.gz", 'install': {'method': 'pip', 'option_str': None, 'dict_extra_env': None}},
- 'DJANGO-EXTENSIONS': { 'setup': 'django-extensions', 'url':'https://github.com/django-extensions/django-extensions/tarball/0.8', 'local':"django-extensions-0.8.tar.gz", 'install': {'method': 'pip', 'option_str': None, 'dict_extra_env': None}},
+ 'DJANGO': {'setup': 'django', 'url': 'http://www.djangoproject.com/download/1.5c2/tarball/', 'local':"Django-1.5c2.tar.gz", 'install': {'method': 'pip', 'option_str': None, 'dict_extra_env': None}},
+ 'DJANGO-EXTENSIONS': { 'setup': 'django-extensions', 'url':'https://github.com/django-extensions/django-extensions/archive/1.0.2.tar.gz', 'local':"django-extensions-1.0.2.tar.gz", 'install': {'method': 'pip', 'option_str': None, 'dict_extra_env': None}},
'DJANGO-REGISTRATION': { 'setup': 'django-registration', 'url':'https://bitbucket.org/ubernostrum/django-registration/get/v0.8.tar.gz', 'local':"django-registration-0.8.tar.gz", 'install': {'method': 'easy_install', 'option_str': '-Z', 'dict_extra_env': None}},
'DJANGO-TAGGING': { 'setup': 'django-tagging', 'url':'http://django-tagging.googlecode.com/files/django-tagging-0.3.1.tar.gz', 'local':"django-tagging-0.3.1.tar.gz", 'install': {'method': 'pip', 'option_str': None, 'dict_extra_env': None}},
'OAUTH2': { 'setup': 'python-oauth2', 'url':"https://github.com/simplegeo/python-oauth2/tarball/hudson-python-oauth2-211", 'local':"oauth2-1.5.211.tar.gz", 'install': {'method': 'easy_install', 'option_str': None, 'dict_extra_env': None}},
@@ -29,16 +29,17 @@
'SOCIAL_AUTH': {'setup':'social_auth', 'url':'https://github.com/omab/django-social-auth/tarball/v0.3.10', 'local':"omab-django-social-auth-v0.3.10-modified.tar.gz", 'install': {'method': 'easy_install', 'option_str': None, 'dict_extra_env': None}},
'SOUTH': { 'setup': 'South', 'url':'http://www.aeracode.org/releases/south/south-0.7.5.tar.gz', 'local':"south-0.7.5.tar.gz", 'install': {'method': 'pip', 'option_str': None, 'dict_extra_env': None}},
'DJANGO_GUARDIAN' : { 'setup': 'django-guardian', 'url':'http://pypi.python.org/packages/source/d/django-guardian/django-guardian-1.0.3.tar.gz', 'local':"django-guardian-1.0.3.tar.gz", 'install': {'method': 'pip', 'option_str': None, 'dict_extra_env': None}},
- 'SORL_THUMBNAIL' : { 'setup': 'sorl-thumbnail', 'url':'http://pypi.python.org/packages/source/s/sorl-thumbnail/sorl-thumbnail-11.12.tar.gz', 'local':"sorl-thumbnail-v10.12.1.tar.gz", 'install': {'method': 'pip', 'option_str': None, 'dict_extra_env': None}},
- 'LIBJPEG': {'setup': None, 'url':'jpegsrc.v8d.tar.gz', 'local':'jpegsrc.v8d.tar.gz', 'install': {'method': 'install_libjpeg', 'option_str': None, 'dict_extra_env': None}},
+ 'SORL_THUMBNAIL' : { 'setup': 'sorl-thumbnail', 'url':'https://github.com/sorl/sorl-thumbnail/archive/master.tar.gz', 'local':"sorl-thumbnail-v11.12.tar.gz", 'install': {'method': 'pip', 'option_str': None, 'dict_extra_env': None}},
+ 'LIBJPEG': {'setup': None, 'url':'jpegsrc.v9.tar.gz', 'local':'jpegsrc.v9.tar.gz', 'install': {'method': 'install_libjpeg', 'option_str': None, 'dict_extra_env': None}},
'ZLIB': {'setup': None, 'url':'zlib-1.2.7.tar.gz', 'local':'zlib-1.2.7.tar.gz', 'install': {'method': 'install_zlib', 'option_str': None, 'dict_extra_env': None}},
'PYCRYPTO': {'setup': 'pycrypto', 'url':'https://ftp.dlitz.net/pub/dlitz/crypto/pycrypto/pycrypto-2.6.tar.gz', 'local':'pycrypto-2.6.tar.gz', 'install': {'method': 'pip', 'option_str': None, 'dict_extra_env': None}},
'PARAMIKO': {'setup': 'paramiko', 'url':'https://github.com/paramiko/paramiko/archive/v1.9.0.tar.gz', 'local':'paramiko-1.9.0.tar.gz', 'install': {'method': 'pip', 'option_str': None, 'dict_extra_env': None}},
'FABRIC': {'setup': 'fabric', 'url':'https://github.com/fabric/fabric/tarball/1.5.1', 'local':'fabric-1.5.1.tar.gz', 'install': {'method': 'pip', 'option_str': None, 'dict_extra_env': None}},
'MERCURIAL': {'setup': 'mercurial', 'url':'http://mercurial.selenic.com/release/mercurial-2.2.3.tar.gz', 'local':'mercurial-2.2.3.tar.gz', 'install': {'method': 'pip', 'option_str': None, 'dict_extra_env': None}},
- 'HAYSTACK': {'setup': 'django-haystack', 'url': 'https://github.com/toastdriven/django-haystack/tarball/master', 'local': 'django-haystack-v2.0.0.tar.gz', 'install':{'method':'pip', 'option_str': None, 'dict_extra_env': None}},
- 'REQUESTS': {'setup': 'requests', 'url':'https://github.com/kennethreitz/requests/archive/v1.0.2.tar.gz', 'local':'requests-v1.0.2.tar.gz', 'install' : {'method':'pip', 'option_str': None, 'dict_extra_env': None}},
- 'PYELASTICSEARCH': {'setup': 'pyelasticsearch', 'url':'https://github.com/toastdriven/pyelasticsearch/tarball/master', 'local':'pyelasticsearch.tar.gz', 'install' : {'method':'pip', 'option_str': None, 'dict_extra_env': None}},
+ 'HAYSTACK': {'setup': 'django-haystack', 'url': 'https://github.com/toastdriven/django-haystack/tarball/master', 'local': 'django-haystack-V2.0.0-beta.tar.gz', 'install':{'method':'pip', 'option_str': None, 'dict_extra_env': None}},
+ 'REQUESTS': {'setup': 'requests', 'url':'https://github.com/kennethreitz/requests/archive/v1.1.0.tar.gz', 'local':'requests-1.1.0.tar.gz', 'install' : {'method':'pip', 'option_str': None, 'dict_extra_env': None}},
+ 'SIMPLEJSON': {'setup': 'simplejson','url':'https://github.com/simplejson/simplejson/archive/v3.0.7.tar.gz', 'local': 'simplejson-3.0.7.tar.gz', 'install' : {'method':'pip', 'option_str': None, 'dict_extra_env': None}},
+ 'PYELASTICSEARCH': {'setup': 'pyelasticsearch', 'url':'https://github.com/rhec/pyelasticsearch/archive/0.3.tar.gz', 'local':'pyelasticsearch-0.3.tar.gz', 'install' : {'method':'pip', 'option_str': None, 'dict_extra_env': None}},
'WHOOSH': {'setup': 'whoosh', 'url':'https://bitbucket.org/mchaput/whoosh/get/tip.tar.gz', 'local':'whoosh-2.5.tar.gz', 'install' : {'method':'pip', 'option_str': None, 'dict_extra_env': None}},
'SETUPTOOLS_HG' : {'setup':'setuptools_hg', 'url':'http://pypi.python.org/packages/source/s/setuptools_hg/setuptools_hg-0.4.tar.gz', 'local': 'setuptools_hg-0.4.tar.gz', 'install' : {'method':'pip', 'option_str': None, 'dict_extra_env': None}},
'WSGIREF' : {'setup':'wsgiref', 'url':'http://pypi.python.org/packages/source/w/wsgiref/wsgiref-0.1.2.zip', 'local': 'wsgiref-0.1.2.zip', 'install' : {'method':'pip', 'option_str': None, 'dict_extra_env': None}},
@@ -60,7 +61,7 @@
mysqlres = "MySQL-python-1.2.3.win-amd64-py2.7.exe"
URLS.update({
- 'PSYCOPG2': {'setup': 'psycopg2','url': 'psycopg2-2.4.5.win32-py2.7-pg9.1.3-release.zip', 'local':"psycopg2-2.4.5.win32-py2.7-pg9.1.3-release.zip", 'install': {'method': 'install_psycopg2', 'option_str': None, 'dict_extra_env': None}},
+ 'PSYCOPG2': {'setup': 'psycopg2','url': 'psycopg2-2.4.6.win32-py2.7-pg9.2.2-release.exe', 'local':"psycopg2-2.4.6.win32-py2.7-pg9.2.2-release.exe", 'install': {'method': 'install_psycopg2', 'option_str': None, 'dict_extra_env': None}},
'PIL': {'setup': 'pil', 'url': 'http://effbot.org/media/downloads/PIL-1.1.7.win32-py2.7.exe', 'local':"PIL-1.1.7.win32-py2.7.exe", 'install': {'method': 'easy_install', 'option_str': None, 'dict_extra_env': None}},
'LXML': {'setup': 'lxml', 'url': 'http://pypi.python.org/packages/2.7/l/lxml/lxml-2.3-py2.7-win32.egg', 'local':"lxml-2.3-py2.7-win32.egg", 'install': {'method': 'easy_install', 'option_str': None, 'dict_extra_env': None}},
'MYSQL': { 'setup': 'mysql-python', 'url': mysqlres, 'local': mysqlres, 'install': {'method': 'easy_install', 'option_str': None, 'dict_extra_env': None}},
@@ -76,8 +77,8 @@
mysql_method = 'pip'
URLS.update({
- 'PSYCOPG2': {'setup': 'psycopg2','url': 'http://www.psycopg.org/psycopg/tarballs/PSYCOPG-2-4/psycopg2-2.4.5.tar.gz', 'local':"psycopg2-2.4.5.tar.gz", 'install': {'method': 'pip', 'option_str': None, 'dict_extra_env': None}},
- 'PIL': {'setup': 'pil', 'url': 'http://effbot.org/downloads/Imaging-1.1.7.tar.gz', 'local':"Imaging-1.1.7.tar.gz", 'install': {'method': 'easy_install', 'option_str': None, 'dict_extra_env': None}},
+ 'PSYCOPG2': {'setup': 'psycopg2','url': 'http://initd.org/psycopg/tarballs/PSYCOPG-2-4/psycopg2-2.4.6.tar.gz', 'local':"psycopg2-2.4.6.tar.gz", 'install': {'method': 'pip', 'option_str': None, 'dict_extra_env': None}},
+ 'PIL': {'setup': 'pil', 'url': 'https://github.com/python-imaging/Pillow/archive/1.7.8.tar.gz', 'local':"Pillow-1.7.8.tar.gz", 'install': {'method': 'pip', 'option_str': None, 'dict_extra_env': None}},
'LXML': {'setup': 'lxml', 'url':"lxml-2.3.4.tar.bz2", 'local':"lxml-2.3.4.tar.bz2", 'install': {'method': lxml_method, 'option_str': None, 'dict_extra_env': lxml_options}},
#'MYSQL': { 'setup': 'mysql-python', 'url': 'http://sourceforge.net/projects/mysql-python/files/mysql-python/1.2.3/MySQL-python-1.2.3.tar.gz/download', 'local':"MySQL-python-1.2.3.tar.gz", 'install': {'method': mysql_method, 'option_str': None, 'dict_extra_env': None}},
})
@@ -197,6 +198,7 @@
def install_lib(option_str, extra_env, res_source_key, home_dir, lib_dir, tmp_dir, src_dir, res_env, logger, call_subprocess, filter_python_develop):
lib_src = os.path.join(src_dir,lib_name+".tar.gz")
+ logger.notify("Copy %s to %s " % (res_env.URLS[lib_key][res_source_key],lib_src))
shutil.copy(res_env.URLS[lib_key][res_source_key], lib_src)
tf = tarfile.open(lib_src,'r:gz')
lib_base_path = os.path.join(src_dir, lib_name)
@@ -206,30 +208,27 @@
lib_src_path = os.path.join(lib_base_path, os.listdir(lib_base_path)[0])
- logger.notify(libname + " configure")
- call_subprocess(['configure', '--prefix='+os.path.abspath(home_dir)] + configure_options,
+ logger.notify(lib_name + " configure in " + lib_src_path)
+ call_subprocess(['./configure', '--prefix='+os.path.abspath(home_dir)] + configure_options,
cwd=os.path.abspath(lib_src_path),
filter_stdout=filter_python_develop,
show_stdout=True)
- logger.notify(libname + " make")
+ logger.notify(lib_name + " make in " + lib_src_path)
call_subprocess(['make'],
cwd=os.path.abspath(lib_src_path),
filter_stdout=filter_python_develop,
show_stdout=True)
- logger.notify(libname + "make install")
+ logger.notify(lib_name + "make install in " + lib_src_path)
call_subprocess(['make', 'install'],
cwd=os.path.abspath(lib_src_path),
filter_stdout=filter_python_develop,
show_stdout=True)
- return install_lib
+ return install_lib
install_libjpeg = gen_install_comp_lib("libjpeg", "LIBJPEG", ['--enable-shared'])
install_zlib = gen_install_comp_lib("zlib", "ZLIB", [])
-
-
-
def lib_generate_install_methods(path_locations, src_base, Logger, call_subprocess, normal_installs, options_to_add=None, urls= None):
@@ -327,6 +326,7 @@
extra_env['TMPDIR'] = os.path.abspath(tmp_dir)
#isinstance(lst, (list, tuple))
if key not in ignore_packages:
+ logger.notify("install %s with method %s" % (key, repr(method)))
if callable(method):
method(option_str, extra_env, res_source_key, home_dir, lib_dir, tmp_dir, src_dir, res_env, logger, call_subprocess, filter_python_develop)
elif method in globals() and callable(globals()[method]) and method not in ['pip', 'easy_install']: