-
Notifications
You must be signed in to change notification settings - Fork 152
FIX: mixup bet 8000 ween _egg_info and _sdist #342
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
FIX: mixup between _egg_info and _sdist #342
Conversation
This fixes the following error message that appeared when upgrading Numpy from Versioneer 0.19 to 0.26: Traceback (most recent call last): File "setup.py", line 102, in <module> cmdclass = versioneer.get_cmdclass(numpy_cmdclass) File "/cygdrive/d/a/numpy/numpy/versioneer.py", line 1980, in get_cmdclass class cmd_egg_info(_egg_info): UnboundLocalError: local variable '_egg_info' referenced before assignment
Looks correct. I guess we should have a regression test where we prepopulate the cmdclass. |
@DimitriPapadopoulos Are you interested in adding a test? Would you like guidance? |
Yes, some guidance would be nice. I don't know what the modified code is for. I just fixed the obvious to be able to update Versioneer in another project, without really understanding the purpose of the modified code. |
No problem. The idea is that we're subclassing existing cmdclasses so that We have some unit tests, but mostly full integration tests with example projects: https://github.com/python-versioneer/python-versioneer/tree/master/test/ I think probably the easiest way to test this is just to make sure that calling commands = versioneer.get_cmdclass().copy()
+commands = versioneer.get_cmdclass(commands).copy() I think that should fail without your fix and pass with your fix. |
@DimitriPapadopoulos Went ahead and tested the above idea locally, and it does break things with the error you describe. Let's see if everything works with your fix, or if things are more complicated than I thought... |
Looks like it worked. Thanks! |
This fixes the following error message that appeared when upgrading Numpy from Versioneer 0.19 to 0.26: