Commit e2e15d52 authored by xoviat's avatar xoviat Committed by GitHub

dist_info: create the egg_info in the same location

This change is a small simplification that simply creates the
egg_info directory in the egg_base location; it's a minor
cleanup that results in some read and it helps with
read-only directories (the egg_info directory is uncontrollable).
parent ffb2e699
......@@ -4,7 +4,6 @@ As defined in the wheel specification
"""
import os
import shutil
from distutils.core import Command
from distutils import log
......@@ -27,14 +26,10 @@ class dist_info(Command):
def run(self):
egg_info = self.get_finalized_command('egg_info')
egg_info.egg_base = self.egg_base
egg_info.run()
dist_info_dir = egg_info.egg_info[:-len('.egg-info')] + '.dist-info'
log.info("creating '{}'".format(os.path.abspath(dist_info_dir)))
bdist_wheel = self.get_finalized_command('bdist_wheel')
bdist_wheel.egg2dist(egg_info.egg_info, dist_info_dir)
if self.egg_base:
destination = os.path.join(self.egg_base, dist_info_dir)
log.info("creating '{}'".format(os.path.abspath(destination)))
shutil.move(dist_info_dir, destination)
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