Commit f8d08c39 authored by Jason R. Coombs's avatar Jason R. Coombs

Avoid hanging indents

parent 169639bd
...@@ -64,9 +64,11 @@ class Wheel(object): ...@@ -64,9 +64,11 @@ class Wheel(object):
def tags(self): def tags(self):
'''List tags (py_version, abi, platform) supported by this wheel.''' '''List tags (py_version, abi, platform) supported by this wheel.'''
return itertools.product(self.py_version.split('.'), return itertools.product(
self.py_version.split('.'),
self.abi.split('.'), self.abi.split('.'),
self.platform.split('.')) self.platform.split('.'),
)
def is_compatible(self): def is_compatible(self):
'''Is the wheel is compatible with the current platform?''' '''Is the wheel is compatible with the current platform?'''
...@@ -139,20 +141,27 @@ class Wheel(object): ...@@ -139,20 +141,27 @@ class Wheel(object):
} }
egg_info = os.path.join(destination_eggdir, 'EGG-INFO') egg_info = os.path.join(destination_eggdir, 'EGG-INFO')
os.rename(dist_info, egg_info) os.rename(dist_info, egg_info)
os.rename(os.path.join(egg_info, 'METADATA'), os.rename(
os.path.join(egg_info, 'PKG-INFO')) os.path.join(egg_info, 'METADATA'),
setup_dist = SetuptoolsDistribution(attrs=dict( os.path.join(egg_info, 'PKG-INFO'),
)
setup_dist = SetuptoolsDistribution(
attrs=dict(
install_requires=install_requires, install_requires=install_requires,
extras_require=extras_require, extras_require=extras_require,
)) ),
write_requirements(setup_dist.get_command_obj('egg_info'), )
None, os.path.join(egg_info, 'requires.txt')) write_requirements(
setup_dist.get_command_obj('egg_info'),
None,
os.path.join(egg_info, 'requires.txt'),
)
# Move data entries to their correct location. # Move data entries to their correct location.
dist_data = os.path.join(destination_eggdir, dist_data) dist_data = os.path.join(destination_eggdir, dist_data)
dist_data_scripts = os.path.join(dist_data, 'scripts') dist_data_scripts = os.path.join(dist_data, 'scripts')
if os.path.exists(dist_data_scripts): if os.path.exists(dist_data_scripts):
egg_info_scripts = os.path.join(destination_eggdir, egg_info_scripts = os.path.join(
'EGG-INFO', 'scripts') destination_eggdir, 'EGG-INFO', 'scripts')
os.mkdir(egg_info_scripts) os.mkdir(egg_info_scripts)
for entry in os.listdir(dist_data_scripts): for entry in os.listdir(dist_data_scripts):
# Remove bytecode, as it's not properly handled # Remove bytecode, as it's not properly handled
...@@ -160,8 +169,10 @@ class Wheel(object): ...@@ -160,8 +169,10 @@ class Wheel(object):
if entry.endswith('.pyc'): if entry.endswith('.pyc'):
os.unlink(os.path.join(dist_data_scripts, entry)) os.unlink(os.path.join(dist_data_scripts, entry))
else: else:
os.rename(os.path.join(dist_data_scripts, entry), os.rename(
os.path.join(egg_info_scripts, entry)) os.path.join(dist_data_scripts, entry),
os.path.join(egg_info_scripts, entry),
)
os.rmdir(dist_data_scripts) os.rmdir(dist_data_scripts)
for subdir in filter(os.path.exists, ( for subdir in filter(os.path.exists, (
os.path.join(dist_data, d) os.path.join(dist_data, d)
......
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