Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix: Do the same transformation to egg-info dirs that pkg_resources does #1051

Merged
merged 3 commits into from
Oct 11, 2018

Conversation

hashbrowncipher
Copy link

I noticed that my hyphenated project name is not using the develop-inst-noop action, instead using the develop-inst-nodeps (cf. #910). This is because it uses a hyphenated project name, and tox was looking at the mtime of a nonexistent myproject-name.egg-info directory, when distutils/setuptools instead create a directory called myproject_name.egg-info. I don't know why they behave this way.

I've added a test for this behavior, and also made it so that initproj can take hyphenated strings for project names. Then, to fix the failing test, I added a call to to_filename, the function which pkg_resources uses for the same transformation.

To determine whether we should re-install an egg, we look for an .egg-info
directory based on the output of `setup.py --name`, but .egg-info directories
have their dashes transformed into underscores by pkg_resources.to_filename.

When we look for an .egg-info directory, we should apply the same
transformation.
@hashbrowncipher hashbrowncipher changed the title Bugfix: Do the same transformation to egg_info dirs that pkg_resources does Bugfix: Do the same transformation to egg-info dirs that pkg_resources does Oct 10, 2018
@gaborbernat
Copy link
Member

Interesting that this did not generate a CI run, will need to investigate. Will follow up tomorrow. Thanks for the PR.

@gaborbernat gaborbernat merged commit ea53afd into tox-dev:master Oct 11, 2018
@gaborbernat
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants