diff options
| author | Stefano Rivera <stefano@rivera.za.net> | 2011-12-14 00:49:18 +0200 |
|---|---|---|
| committer | Stefano Rivera <stefano@rivera.za.net> | 2011-12-14 00:49:18 +0200 |
| commit | 2e7cb5692d1b721c6be49a36b873fffe88cbd2fc (patch) | |
| tree | 3565cc4486a01622cb773d49fdee96389e83fceb /bin | |
| parent | 47ee1ebaf45c23da35676bf2493fad880f7be0da (diff) | |
| download | virtualenv-2e7cb5692d1b721c6be49a36b873fffe88cbd2fc.tar.gz | |
Move all embedded files to virtualenv_embedded
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/rebuild-script.py | 6 | ||||
| -rwxr-xr-x | bin/refresh-support-files.py | 24 |
2 files changed, 16 insertions, 14 deletions
diff --git a/bin/rebuild-script.py b/bin/rebuild-script.py index 184eb5c..44fb129 100755 --- a/bin/rebuild-script.py +++ b/bin/rebuild-script.py @@ -29,11 +29,7 @@ def rebuild(): varname = match.group(2) data = match.group(3) print('Found reference to file %s' % filename) - if filename.endswith('.py'): - pathname = os.path.join(here, '..', 'virtualenv_embedded', - filename) - else: - pathname = os.path.join(here, '..', 'virtualenv_support', filename) + pathname = os.path.join(here, '..', 'virtualenv_embedded', filename) f = open(pathname, 'rb') c = f.read() f.close() diff --git a/bin/refresh-support-files.py b/bin/refresh-support-files.py index 1838938..539df7e 100755 --- a/bin/refresh-support-files.py +++ b/bin/refresh-support-files.py @@ -11,20 +11,24 @@ except ImportError: import sys here = os.path.dirname(__file__) -support_files = os.path.join(here, '..', 'virtualenv_support') -embedded_files = os.path.join(here, '..', 'virtualenv_embedded') +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'), ] -def main(): + +def refresh_files(files, location): for url, filename in files: sys.stdout.write('fetching %s ... ' % url) sys.stdout.flush() @@ -32,10 +36,7 @@ def main(): content = f.read() f.close() print('done.') - if filename.endswith('.py'): - filename = os.path.join(embedded_files, filename) - else: - 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() @@ -50,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() |
