- update virtualenv
authorymh <ymh.work@gmail.com>
Wed, 27 Feb 2013 00:19:02 +0100
changeset 59 4671c9fd69b5
parent 58 80317ff7192b
child 60 10e4b6eae0e5
- update virtualenv - change platform_base_url to src_base_url
sbin/sync/config.py.tmpl
sbin/sync/fabfile.py
src/ldtplatform/config.py.tmpl
src/ldtplatform/settings.py
virtualenv/res/lib/lib_create_env.py
virtualenv/res/src/Django-1.4.2.tar.gz
virtualenv/res/src/Django-1.5c2.tar.gz
virtualenv/res/src/Imaging-1.1.7.tar.gz
virtualenv/res/src/Pillow-1.7.8.tar.gz
virtualenv/res/src/django-extensions-0.8.tar.gz
virtualenv/res/src/django-extensions-1.0.2.tar.gz
virtualenv/res/src/django-haystack-V2.0.0-beta.tar.gz
virtualenv/res/src/django-haystack-v2.0.0.tar.gz
virtualenv/res/src/psycopg2-2.4.5.tar.gz
virtualenv/res/src/psycopg2-2.4.5.win32-py2.7-pg9.1.3-release.zip
virtualenv/res/src/psycopg2-2.4.6.tar.gz
virtualenv/res/src/psycopg2-2.4.6.win32-py2.7-pg9.2.2-release.exe
virtualenv/res/src/pyelasticsearch-0.3.tar.gz
virtualenv/res/src/pyelasticsearch.tar.gz
virtualenv/res/src/requests-1.1.0.tar.gz
virtualenv/res/src/requests-v1.0.2.tar.gz
virtualenv/res/src/simplejson-3.0.7.tar.gz
virtualenv/res/src/six-1.2.0.tar.gz
virtualenv/res/src/sorl-thumbnail-v10.12.1.tar.gz
virtualenv/res/src/sorl-thumbnail-v11.12.tar.gz
virtualenv/res/src/whoosh-2.5.tar.gz
virtualenv/web/res/res_create_env.py
--- a/sbin/sync/config.py.tmpl	Fri Feb 15 12:06:30 2013 +0100
+++ b/sbin/sync/config.py.tmpl	Wed Feb 27 00:19:02 2013 +0100
@@ -1,4 +1,5 @@
 from fabric.api import env
+from random import choice
 
 env.hosts = ['iri@web.iri.centrepompidou.fr']
 
@@ -66,7 +67,8 @@
         'email_host_user' : "",
         'email_host_user' : "",
         'email_port' : 0,
-        'forbidden_stream_url' : "rtmp://media.iri.centrepompidou.fr/ddc_player/mp4:video/forbidden_stream.mp4?old_path="
+        'forbidden_stream_url' : "rtmp://media.iri.centrepompidou.fr/ddc_player/mp4:video/forbidden_stream.mp4?old_path=",
+        'secret_key' : ''.join([choice('abcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*(-_=+)') for i in range(50)]),         
     },
 }
 
--- a/sbin/sync/fabfile.py	Fri Feb 15 12:06:30 2013 +0100
+++ b/sbin/sync/fabfile.py	Wed Feb 27 00:19:02 2013 +0100
@@ -1,3 +1,4 @@
+import config
 from fabric.api import task, env, sudo
 from fabric.colors import green
 from ldt_fablib import (check_folder_access, syncdb, collectstatic, 
--- a/src/ldtplatform/config.py.tmpl	Fri Feb 15 12:06:30 2013 +0100
+++ b/src/ldtplatform/config.py.tmpl	Wed Feb 27 00:19:02 2013 +0100
@@ -36,6 +36,9 @@
 # DO NOT forget to do command line ./manage.py collectstatic to gather static media into the web/static folder
 STATIC_ROOT = BASE_STATIC_ROOT + "site/"
 
+# Make this unique, and don't share it with anybody.
+SECRET_KEY = '%(secret_key)s'
+
 # PATH to the ffmpeg executable, used to know automatically the media file duration 
 FFMPEG_PATH = "%(ffmpeg_path)s"
 
@@ -76,6 +79,11 @@
 LOGGING = {
     'version': 1,
     'disable_existing_loggers': False,
+    'filters': {
+        'require_debug_false': {
+            '()': 'django.utils.log.RequireDebugFalse'
+        }
+    },
     'formatters' : {
         'simple' : {
             'format': "%(asctime)s - %(levelname)s : %(message)s",
@@ -87,6 +95,7 @@
     'handlers': {
         'mail_admins': {
             'level': 'ERROR',
+            'filters': ['require_debug_false'],
             'class': 'django.utils.log.AdminEmailHandler'
         },
         'stream_to_console': {
@@ -161,3 +170,5 @@
         #'INDEX_NAME': 'ldt',
     },
 }
+
+LDT_INDEXATION_INSERT_BATCH_SIZE = 5000
\ No newline at end of file
--- a/src/ldtplatform/settings.py	Fri Feb 15 12:06:30 2013 +0100
+++ b/src/ldtplatform/settings.py	Wed Feb 27 00:19:02 2013 +0100
@@ -241,25 +241,29 @@
         'ENGINE': 'haystack.backends.simple_backend.SimpleEngine',
     },
 }
+HAYSTACK_SIGNAL_PROCESSOR = 'ldt.indexation.signals.LdtSignalProcessor'
 
 from config import *
 
-if not "PLATFORM_BASE_URL" in locals():
-    PLATFORM_BASE_URL = BASE_URL + 'ldtplatform/' 
+if not "SRC_BASE_URL" in locals():
+    SRC_BASE_URL = BASE_URL + __name__.split('.')[0] + '/' 
+
+if not "SRC_BASE_URL" in locals():
+    SRC_BASE_URL = BASE_URL + 'ldtplatform/' 
 
 if not "LOGIN_URL" in locals():
-    LOGIN_URL = PLATFORM_BASE_URL + 'accounts/login/'
+    LOGIN_URL = SRC_BASE_URL + 'accounts/login/'
 if not "LOGOUT_URL" in locals():
-    LOGOUT_URL = PLATFORM_BASE_URL + 'accounts/disconnect/'
+    LOGOUT_URL = SRC_BASE_URL + 'accounts/disconnect/'
 if not "LOGIN_REDIRECT_URL" in locals():
-    LOGIN_REDIRECT_URL = PLATFORM_BASE_URL + 'ldt/'
+    LOGIN_REDIRECT_URL = SRC_BASE_URL + 'ldt/'
 if not "LOGOUT_REDIRECT_URL" in locals():
-    LOGOUT_REDIRECT_URL = PLATFORM_BASE_URL + 'accounts/login'
+    LOGOUT_REDIRECT_URL = SRC_BASE_URL + 'accounts/login'
 if not "PROFILE_REDIRECT_URL" in locals():
-    PROFILE_REDIRECT_URL = PLATFORM_BASE_URL + 'auth_accounts/create/profile'
+    PROFILE_REDIRECT_URL = SRC_BASE_URL + 'auth_accounts/create/profile'
 
 if not "LOGIN_ERROR_URL" in locals():
-    LOGIN_ERROR_URL = PLATFORM_BASE_URL + 'accounts/login'
+    LOGIN_ERROR_URL = SRC_BASE_URL + 'accounts/login'
 
 # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a
 # trailing slash.
--- 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']:  
Binary file virtualenv/res/src/Django-1.4.2.tar.gz has changed
Binary file virtualenv/res/src/Django-1.5c2.tar.gz has changed
Binary file virtualenv/res/src/Imaging-1.1.7.tar.gz has changed
Binary file virtualenv/res/src/Pillow-1.7.8.tar.gz has changed
Binary file virtualenv/res/src/django-extensions-0.8.tar.gz has changed
Binary file virtualenv/res/src/django-extensions-1.0.2.tar.gz has changed
Binary file virtualenv/res/src/django-haystack-V2.0.0-beta.tar.gz has changed
Binary file virtualenv/res/src/django-haystack-v2.0.0.tar.gz has changed
Binary file virtualenv/res/src/psycopg2-2.4.5.tar.gz has changed
Binary file virtualenv/res/src/psycopg2-2.4.5.win32-py2.7-pg9.1.3-release.zip has changed
Binary file virtualenv/res/src/psycopg2-2.4.6.tar.gz has changed
Binary file virtualenv/res/src/psycopg2-2.4.6.win32-py2.7-pg9.2.2-release.exe has changed
Binary file virtualenv/res/src/pyelasticsearch-0.3.tar.gz has changed
Binary file virtualenv/res/src/pyelasticsearch.tar.gz has changed
Binary file virtualenv/res/src/requests-1.1.0.tar.gz has changed
Binary file virtualenv/res/src/requests-v1.0.2.tar.gz has changed
Binary file virtualenv/res/src/simplejson-3.0.7.tar.gz has changed
Binary file virtualenv/res/src/six-1.2.0.tar.gz has changed
Binary file virtualenv/res/src/sorl-thumbnail-v10.12.1.tar.gz has changed
Binary file virtualenv/res/src/sorl-thumbnail-v11.12.tar.gz has changed
Binary file virtualenv/res/src/whoosh-2.5.tar.gz has changed
--- a/virtualenv/web/res/res_create_env.py	Fri Feb 15 12:06:30 2013 +0100
+++ b/virtualenv/web/res/res_create_env.py	Wed Feb 27 00:19:02 2013 +0100
@@ -27,6 +27,7 @@
     'SORL_THUMBNAIL',
     'HAYSTACK',
     'REQUESTS',
+    'SIMPLEJSON',
     'PYELASTICSEARCH',
     'WHOOSH',
     'MIMEPARSE',