Permalink
Browse files

Moved support-files in a package to get rid of the package_data hack …

…and reliably distribute them
  • Loading branch information...
1 parent feeddc5 commit 8aad93295cfbf73567bd4ba7411b67d62717693c @jezdez jezdez committed Oct 21, 2009
View
@@ -1,2 +1,2 @@
recursive-include docs *.txt
-recursive-include support-files *.egg
+recursive-include virtualenv_support *.egg
View
@@ -1,5 +1,5 @@
"""
-Helper script to rebuild virtualenv.py from support-files
+Helper script to rebuild virtualenv.py from virtualenv_support
"""
import re
@@ -28,7 +28,7 @@ def rebuild():
varname = match.group(2)
data = match.group(3)
print 'Found reference to file %s' % filename
- f = open(os.path.join(here, '..', 'support-files', filename), 'rb')
+ f = open(os.path.join(here, '..', 'virtualenv_support', filename), 'rb')
c = f.read()
f.close()
new_data = c.encode('zlib').encode('base64')
@@ -1,13 +1,13 @@
"""
-Refresh any files in support-files/ that come from elsewhere
+Refresh any files in ../virtualenv_support/ that come from elsewhere
"""
import os
import urllib
import sys
here = os.path.dirname(__file__)
-support_files = os.path.join(here, '..', 'support-files')
+support_files = os.path.join(here, '..', 'virtualenv_support')
files = [
('http://peak.telecommunity.com/dist/ez_setup.py', 'ez_setup.py'),
View
@@ -26,10 +26,8 @@
url='http://pypi.python.org/pypi/virtualenv',
license='MIT',
py_modules=['virtualenv'],
- ## Hacks to get the package data installed:
- packages=[''],
- package_dir={'': '.'},
- package_data={'': ['support-files/*-py%s.egg' % sys.version[:3]]},
+ packages=['virtualenv_support'],
+ package_data={'virtualenv_support': ['*-py%s.egg' % sys.version[:3]]},
zip_safe=False,
entry_points="""
[console_scripts]
View
@@ -244,16 +244,16 @@ def make_exe(fn):
logger.info('Changed mode of %s to %s', fn, oct(newmode))
def install_setuptools(py_executable, unzip=False):
- setup_fn = 'setuptools-0.6c9-py%s.egg' % sys.version[:3]
- search_dirs = ['.', os.path.dirname(__file__), join(os.path.dirname(__file__), 'support-files')]
+ setup_fn = 'setuptools-0.6c11-py%s.egg' % sys.version[:3]
+ search_dirs = ['.', os.path.dirname(__file__), join(os.path.dirname(__file__), 'virtualenv_support')]
if os.path.splitext(os.path.dirname(__file__))[0] != 'virtualenv':
# Probably some boot script; just in case virtualenv is installed...
try:
import virtualenv
except ImportError:
pass
else:
- search_dirs.append(os.path.join(os.path.dirname(virtualenv.__file__), 'support-files'))
+ search_dirs.append(os.path.join(os.path.dirname(virtualenv.__file__), 'virtualenv_support'))
for dir in search_dirs:
if os.path.exists(join(dir, setup_fn)):
setup_fn = join(dir, setup_fn)
No changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 8aad932

Please sign in to comment.