Skip to content

Commit

Permalink
dist info folder follows dist name if one is supplied
Browse files Browse the repository at this point in the history
  • Loading branch information
takluyver committed Apr 1, 2015
1 parent c336b29 commit 639e622
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion flit/install.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,8 +120,9 @@ def write_dist_info(self, site_pkgs):
# Record metadata about installed files to give pip a fighting chance of
# uninstalling it correctly.
module_info = common.get_info_from_module(self.module)
dist_name = self.ini_info['metadata'].get('name', self.module.name)
egg_info = pathlib.Path(site_pkgs) / '{}-{}.egg-info'.format(
self.module.name, module_info['version'])
dist_name, module_info['version'])
try:
egg_info.mkdir()
except FileExistsError:
Expand Down

4 comments on commit 639e622

@dholth
Copy link
Member

@dholth dholth commented on 639e622 Apr 2, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may be possible to write .dist-info always and never bother with .egg-info

@takluyver
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had a look at a few dist-info and egg-info folders on my own machine, and it looked easier to create the installed-files.txt file in a .egg-info folder than the RECORD file in a .dist-info. E.g. RECORD includes sha256 hashes and file sizes, and I'm not sure what to do with those for a symlink. But I would like to write .dist-info directories if we can work it out.

@dholth
Copy link
Member

@dholth dholth commented on 639e622 Apr 2, 2015

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be OK to just leave the hash and file sizes empty. https://www.python.org/dev/peps/pep-0376/#record

@takluyver
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, that PEP was the reference I was missing. I've had a go at implementing it: 1f4c9e4

Please sign in to comment.