diff options
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() |