Skip to content

Commit

Permalink
Move embedded .py files to virtualenv_embedded_support
Browse files Browse the repository at this point in the history
Create new top level directory: virtualenv_embedded_support to hold
embedded .py files, so that they can be distributed in the source
tarball.

Fixes #199
  • Loading branch information
stefanor committed Dec 13, 2011
1 parent 6742e68 commit 6742d92
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 3 deletions.
3 changes: 2 additions & 1 deletion MANIFEST.in
@@ -1,9 +1,10 @@
recursive-include docs *.txt
recursive-include scripts *
recursive-include virtualenv_support *.egg *.tar.gz
recursive-include virtualenv_embedded_support *.py
recursive-exclude virtualenv_support *.py
recursive-exclude docs/_templates *.*
include virtualenv_support/__init__.py
include *.py
include AUTHORS.txt
include LICENSE.txt
include LICENSE.txt
7 changes: 6 additions & 1 deletion bin/rebuild-script.py
Expand Up @@ -29,7 +29,12 @@ def rebuild():
varname = match.group(2)
data = match.group(3)
print('Found reference to file %s' % filename)
f = open(os.path.join(here, '..', 'virtualenv_support', filename), 'rb')
if filename.endswith('.py'):
pathname = os.path.join(here, '..', 'virtualenv_embedded_support',
filename)
else:
pathname = os.path.join(here, '..', 'virtualenv_support', filename)
f = open(pathname, 'rb')
c = f.read()
f.close()
new_data = c.encode('zlib').encode('base64')
Expand Down
6 changes: 5 additions & 1 deletion bin/refresh-support-files.py
Expand Up @@ -12,6 +12,7 @@

here = os.path.dirname(__file__)
support_files = os.path.join(here, '..', 'virtualenv_support')
embedded_support_files = os.path.join(here, '..', 'virtualenv_embedded_support')

files = [
('http://peak.telecommunity.com/dist/ez_setup.py', 'ez_setup.py'),
Expand All @@ -31,7 +32,10 @@ def main():
content = f.read()
f.close()
print('done.')
filename = os.path.join(support_files, filename)
if filename.endswith('.py'):
filename = os.path.join(embedded_support_files, filename)
else:
filename = os.path.join(support_files, filename)
if os.path.exists(filename):
f = open(filename, 'rb')
cur_content = f.read()
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 6742d92

Please sign in to comment.