virtualenv/res/lib/lib_create_env.py
changeset 2 aaa8629d42c9
parent 0 81e7900b06a7
child 3 63c5437a9b7d
--- a/virtualenv/res/lib/lib_create_env.py	Tue Aug 27 18:09:55 2013 +0200
+++ b/virtualenv/res/lib/lib_create_env.py	Tue Aug 27 22:18:57 2013 +0200
@@ -27,8 +27,14 @@
     'ISODATE': {'setup': 'isodate','url':'https://pypi.python.org/packages/source/i/isodate/isodate-0.4.9.tar.gz', 'local': 'isodate-0.4.9.tar.gz', 'install' : {'method':'pip', 'option_str': None, 'dict_extra_env': None}},
     'PYPARSING': {'setup': 'pyparsing','url':'http://downloads.sourceforge.net/project/pyparsing/pyparsing/pyparsing-1.5.7/pyparsing-1.5.7.tar.gz', 'local': 'pyparsing-1.5.7.tar.gz', 'install' : {'method':'pip', 'option_str': None, 'dict_extra_env': None}},
     'SPARQLWRAPPER': {'setup': 'sparqlwrapper','url':'http://downloads.sourceforge.net/project/sparql-wrapper/sparql-wrapper-python/1.5.2/SPARQLWrapper-1.5.2.tar.gz', 'local': 'SPARQLWrapper-1.5.2.tar.gz', 'install' : {'method':'pip', 'option_str': None, 'dict_extra_env': None}},
-    'HTML5LIB': {'setup': 'html5lib','url':'https://github.com/html5lib/html5lib-python/archive/1.0b1.tar.gz', 'local': 'html5lib-python-1.0b1.tar.gz', 'install' : {'method':'pip', 'option_str': None, 'dict_extra_env': None}},
+    'HTML5LIB': {'setup': 'html5lib','url':'https://github.com/html5lib/html5lib-python/archive/1.0b3.tar.gz', 'local': 'html5lib-1.0b3.tar.gz', 'install' : {'method':'pip', 'option_str': None, 'dict_extra_env': None}},
     'PSYCOPG2': {'setup': 'psycopg2','url': 'http://initd.org/psycopg/tarballs/PSYCOPG-2-5/psycopg2-2.5.tar.gz', 'local':"psycopg2-2.5.tar.gz", 'install': {'method': 'pip', 'option_str': None, 'dict_extra_env': None}},
+    'DEFUSEDXML': {'setup': 'defusedxml','url': 'https://pypi.python.org/packages/source/d/defusedxml/defusedxml-0.4.1.tar.gz', 'local':"defusedxml-0.4.1.tar.gz", 'install': {'method': 'pip', 'option_str': None, 'dict_extra_env': None}},
+    'DJANGO-CORS-HEADERS': {'setup': 'django-cors-headers','url': 'https://pypi.python.org/packages/source/d/django-cors-headers/django-cors-headers-0.11.tar.gz', 'local':"django-cors-headers-0.11.tar.gz", 'install': {'method': 'pip', 'option_str': None, 'dict_extra_env': None}},
+    'DJANGO-FILTER': {'setup': 'django-filter','url': 'https://github.com/alex/django-filter/archive/v0.7.tar.gz', 'local':"django-filter-0.7.tar.gz", 'install': {'method': 'pip', 'option_str': None, 'dict_extra_env': None}},
+    'DJANGO-REST-FRAMEWORK': {'setup': 'djangorestframework','url': 'https://pypi.python.org/packages/source/d/djangorestframework/djangorestframework-2.3.7.tar.gz', 'local':"djangorestframework-2.3.7.tar.gz", 'install': {'method': 'pip', 'option_str': None, 'dict_extra_env': None}},
+    'MARKDOWN': {'setup': 'markdown','url': 'https://pypi.python.org/packages/source/M/Markdown/Markdown-2.3.1.tar.gz', 'local':"Markdown-2.3.1.tar.gz", 'install': {'method': 'pip', 'option_str': None, 'dict_extra_env': None}},
+    'WSGIREF': {'setup': 'wsgiref','url': 'https://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}},
 }
 
 class ResourcesEnv(object):
@@ -205,11 +211,15 @@
             else:
                 args = [os.path.abspath(os.path.join(home_dir, 'bin', 'pip')), 'install', res_env.URLS[key][res_source_key]]
             if option_str :
-                args.insert(4,option_str)
-            if key == 'local':
+                args.append(option_str)
+            if res_source_key == 'local':
                 if extra_env is None:
                     extra_env = {}
-                extra_env.append("PIP_DOWNLOAD_CACHE", res_env.get_src_base_path(""))
+                extra_env["PIP_DOWNLOAD_CACHE"] = res_env.get_src_base_path("")
+                args.insert(2, '-f')
+                args.insert(3, res_env.get_src_base_path(""))
+                args.insert(4, '--no-index')
+            logger.notify("Install %s from %s with %s args %s " % (key,res_env.URLS[key][res_source_key],method, repr(args)))
             call_subprocess(args,
                     cwd=os.path.abspath(tmp_dir),
                     filter_stdout=filter_python_develop,