Commit a2053433 authored by Reinout van Rees's avatar Reinout van Rees

Removed unused/deprecated wheel_to_egg() function

parent f40fc8d7
...@@ -89,9 +89,6 @@ setuptools_path = buildout_and_setuptools_path ...@@ -89,9 +89,6 @@ setuptools_path = buildout_and_setuptools_path
FILE_SCHEME = re.compile('file://', re.I).match FILE_SCHEME = re.compile('file://', re.I).match
DUNDER_FILE_PATTERN = re.compile(r"__file__ = '(?P<filename>.+)'$") DUNDER_FILE_PATTERN = re.compile(r"__file__ = '(?P<filename>.+)'$")
def wheel_to_egg(dist, dest):
raise zc.buildout.UserError("Wheels are not supported")
class _Monkey(object): class _Monkey(object):
def __init__(self, module, **kw): def __init__(self, module, **kw):
mdict = self._mdict = module.__dict__ mdict = self._mdict = module.__dict__
......
...@@ -3144,53 +3144,6 @@ def test_buildout_doesnt_keep_adding_itself_to_versions(): ...@@ -3144,53 +3144,6 @@ def test_buildout_doesnt_keep_adding_itself_to_versions():
if sys.platform == 'win32': if sys.platform == 'win32':
del buildout_honors_umask # umask on dohs is academic del buildout_honors_umask # umask on dohs is academic
class UnitTests(unittest.TestCase):
@property
def globs(self):
return self.__dict__
def setUp(self):
easy_install_SetUp(self)
import setuptools.package_index
setuptools.package_index.EXTENSIONS.append('.whl')
import zc.buildout.easy_install
self.orig_wheel_to_egg = zc.buildout.easy_install.wheel_to_egg
def tearDown(self):
import zc.buildout.easy_install
zc.buildout.testing.buildoutTearDown(self)
import setuptools.package_index
setuptools.package_index.EXTENSIONS.remove('.whl')
zc.buildout.easy_install.wheel_to_egg = self.orig_wheel_to_egg
def test_wheel_to_egg(self):
[egg_name] = [n for n in os.listdir(self.sample_eggs)
if n.startswith('demo-0.3-')]
path = os.path.join(self.sample_eggs, egg_name)
os.rename(path, os.path.join(self.sample_eggs,
'demo-0.3-py2.py3-none-any.whl'))
import zc.buildout.easy_install
installer = zc.buildout.easy_install.Installer(
os.path.join(self.sample_buildout, 'eggs'),
index = self.sample_eggs)
# Can't install because the original hook is in place:
with self.assertRaises(zc.buildout.UserError):
installer.install(['demo'])
def wheel_to_egg(dist, dest):
newloc = os.path.join(dest, egg_name)
shutil.copy(dist.location, newloc)
return pkg_resources.Distribution.from_filename(newloc)
zc.buildout.easy_install.wheel_to_egg = wheel_to_egg
egg_dir = os.path.join(self.sample_buildout, 'eggs')
self.assertFalse(egg_name in os.listdir(egg_dir))
installer.install(['demo'])
self.assertTrue(egg_name in os.listdir(egg_dir))
###################################################################### ######################################################################
def create_sample_eggs(test, executable=sys.executable): def create_sample_eggs(test, executable=sys.executable):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment