diff options
author | Jannis Leidel <jannis@leidel.info> | 2012-02-16 21:46:37 +0100 |
---|---|---|
committer | Jannis Leidel <jannis@leidel.info> | 2012-02-16 21:46:37 +0100 |
commit | 7c5e2af85f567c50e15ab65745327207f3b62e08 (patch) | |
tree | 5dacbc0b3321d9f26ef57aa4793cc15b6376d63f /bin/refresh-support-files.py | |
parent | 1405b48b1d6347ed350e40f5cd5df96c0836eb9e (diff) | |
parent | 1607c9b632e39453bcca214af02be4c9cdba3799 (diff) | |
download | virtualenv-1.7.1.tar.gz |
Merge branch 'release/1.7.1'1.7.1
Diffstat (limited to 'bin/refresh-support-files.py')
-rwxr-xr-x | bin/refresh-support-files.py | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/bin/refresh-support-files.py b/bin/refresh-support-files.py index 866b9d5..66274b4 100755 --- a/bin/refresh-support-files.py +++ b/bin/refresh-support-files.py @@ -11,19 +11,24 @@ except ImportError: import sys here = os.path.dirname(__file__) -support_files = os.path.join(here, '..', 'virtualenv_support') +support_location = os.path.join(here, '..', 'virtualenv_support') +embedded_location = os.path.join(here, '..', 'virtualenv_embedded') -files = [ +embedded_files = [ ('http://peak.telecommunity.com/dist/ez_setup.py', 'ez_setup.py'), + ('http://python-distribute.org/distribute_setup.py', 'distribute_setup.py'), +] + +support_files = [ ('http://pypi.python.org/packages/2.6/s/setuptools/setuptools-0.6c11-py2.6.egg', 'setuptools-0.6c11-py2.6.egg'), ('http://pypi.python.org/packages/2.5/s/setuptools/setuptools-0.6c11-py2.5.egg', 'setuptools-0.6c11-py2.5.egg'), ('http://pypi.python.org/packages/2.4/s/setuptools/setuptools-0.6c11-py2.4.egg', 'setuptools-0.6c11-py2.4.egg'), - ('http://python-distribute.org/distribute_setup.py', 'distribute_setup.py'), ('http://pypi.python.org/packages/source/d/distribute/distribute-0.6.24.tar.gz', 'distribute-0.6.24.tar.gz'), - ('http://pypi.python.org/packages/source/p/pip/pip-1.0.2.tar.gz', 'pip-1.0.2.tar.gz'), + ('http://pypi.python.org/packages/source/p/pip/pip-1.1.tar.gz', 'pip-1.1.tar.gz'), ] -def main(): + +def refresh_files(files, location): for url, filename in files: sys.stdout.write('fetching %s ... ' % url) sys.stdout.flush() @@ -31,7 +36,7 @@ def main(): content = f.read() f.close() print('done.') - filename = os.path.join(support_files, filename) + filename = os.path.join(location, filename) if os.path.exists(filename): f = open(filename, 'rb') cur_content = f.read() @@ -46,6 +51,11 @@ def main(): f.write(content) f.close() + +def main(): + refresh_files(embedded_files, embedded_location) + refresh_files(support_files, support_location) + if __name__ == '__main__': main() |