add django rest framework and its dependencies + improve virtualenv creation
authorymh <ymh.work@gmail.com>
Tue, 27 Aug 2013 22:18:57 +0200
changeset 2 aaa8629d42c9
parent 1 d184767fdd52
child 3 63c5437a9b7d
add django rest framework and its dependencies + improve virtualenv creation
.hgignore
virtualenv/res/lib/lib_create_env.py
virtualenv/res/src/Markdown-2.3.1.tar.gz
virtualenv/res/src/defusedxml-0.4.1.tar.gz
virtualenv/res/src/django-cors-headers-0.11.tar.gz
virtualenv/res/src/django-extensions-1.1.1.tar.gz
virtualenv/res/src/django-filter-0.7.tar.gz
virtualenv/res/src/djangorestframework-2.3.7.tar.gz
virtualenv/res/src/html5lib-1.0b3.tar.gz
virtualenv/res/src/html5lib-python-1.0b1.tar.gz
virtualenv/res/src/pyparsing-1.5.7.tar.gz
virtualenv/res/src/rdflib-4.0.1.tar.gz
virtualenv/res/src/requests-1.2.3.tar.gz
virtualenv/res/src/wsgiref-0.1.2.zip
virtualenv/web/res/requirement.txt
virtualenv/web/res/res_create_env.py
--- a/.hgignore	Tue Aug 27 18:09:55 2013 +0200
+++ b/.hgignore	Tue Aug 27 22:18:57 2013 +0200
@@ -1,19 +1,9 @@
-
 syntax: regexp
 ^run$
-syntax: regexp
 ^\.pydevproject$
-syntax: regexp
 ^src/p4l/config\.py$
-syntax: regexp
 ^\.metadata$
-syntax: regexp
+^virtualenv/web/project-boot\.py$
 ^virtualenv/web/env$
-syntax: regexp
-^virtualenv/web/project-boot\.py$
-syntax: regexp
 ^\.settings$
-syntax: regexp
-^web/static/site$
-syntax: regexp
-^web/static/\.htaccess$
\ No newline at end of file
+^web/static$
\ No newline at end of file
--- 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,
Binary file virtualenv/res/src/Markdown-2.3.1.tar.gz has changed
Binary file virtualenv/res/src/defusedxml-0.4.1.tar.gz has changed
Binary file virtualenv/res/src/django-cors-headers-0.11.tar.gz has changed
Binary file virtualenv/res/src/django-extensions-1.1.1.tar.gz has changed
Binary file virtualenv/res/src/django-filter-0.7.tar.gz has changed
Binary file virtualenv/res/src/djangorestframework-2.3.7.tar.gz has changed
Binary file virtualenv/res/src/html5lib-1.0b3.tar.gz has changed
Binary file virtualenv/res/src/html5lib-python-1.0b1.tar.gz has changed
Binary file virtualenv/res/src/pyparsing-1.5.7.tar.gz has changed
Binary file virtualenv/res/src/rdflib-4.0.1.tar.gz has changed
Binary file virtualenv/res/src/requests-1.2.3.tar.gz has changed
Binary file virtualenv/res/src/wsgiref-0.1.2.zip has changed
--- a/virtualenv/web/res/requirement.txt	Tue Aug 27 18:09:55 2013 +0200
+++ b/virtualenv/web/res/requirement.txt	Tue Aug 27 22:18:57 2013 +0200
@@ -1,8 +1,13 @@
--f ../../res/src/
+-f ../../res/src
 Django==1.5.2.dev20130524113953
+Markdown==2.3.1
 SPARQLWrapper==1.5.2
 South==0.7.6
+defusedxml==0.4.1
+django-cors-headers==0.11
 django-extensions==1.1.1
+django-filter==0.7
+djangorestframework==2.3.7
 html5lib==python-1.0b1
 isodate==0.4.9
 psycopg2==2.5
@@ -11,3 +16,4 @@
 requests==1.2.3
 simplejson==3.3.0
 six==1.3.0
+wsgiref==0.1.2
--- a/virtualenv/web/res/res_create_env.py	Tue Aug 27 18:09:55 2013 +0200
+++ b/virtualenv/web/res/res_create_env.py	Tue Aug 27 22:18:57 2013 +0200
@@ -7,6 +7,7 @@
 
 INSTALLS = [ #(key,method, option_str, dict_extra_env)
     'SIX',
+    'WSGIREF',
     'REQUESTS',
     'SIMPLEJSON',
     'ISODATE',
@@ -16,8 +17,13 @@
     'SOUTH',
     'DJANGO',
     'DJANGO-EXTENSIONS',
+    'RDFLIB',
     'SPARQLWRAPPER',
-    'RDFLIB',
+    'DEFUSEDXML',
+    'DJANGO-CORS-HEADERS',
+    'DJANGO-FILTERS',
+    'MARKDOWN',
+    'DJANGO-REST-FRAMEWORK',    
 ]
 
 if system_str == "Linux":