-
Notifications
You must be signed in to change notification settings - Fork 22
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
Mock the actual setup provider defined in setup.py #120
Conversation
2139cd6
to
b3b27e5
Compare
@bennati thanks! please provide a few tests with the files you faced this issue. |
@bennati you need to regenerate the test outputs, the dependencies have been updated for the tests so for fixing tests in test_cli use this command:
for fixing tests in test_resolution, please compare the changes from the expected output. |
Is there anything left to do before we can merge this? |
Thanks. Let me check! there seems to be something weird with your latest commit as make valid should not have changed |
@pombredanne should I just refactor the last commit and remove the changes to the unrelated files? |
@pombredanne Please suggest if there is anything left or a blocker to merge this MR? |
@bennati please remove the changes to unrelated files. |
fa3a091
to
3447f9e
Compare
Removed the unrelated changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@pombredanne please suggest if any further modifications is require or if we can proceed to merge the changes? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, LGTM overall! but I have a few nitpickings for your consideration.
"defaulting to 'distutils.core'." | ||
) | ||
setup_provider = "distutils.core" | ||
exec(f"import {setup_provider}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure that we can get something that's safe to work here. In particular importing setuptools since version 66 has several possible problems... Could we do better and not need to import this? If we really need to import it, we should IMHO vendor a version of setuptools that before version 66?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed it and imported both libraries
a40a70a
to
a4e60d9
Compare
The tests keep failing despite all my attempts, help is appreciated! |
b82cdb1
to
a57af53
Compare
Tests are now successful, can we merge this? |
@bennati Would you mind to:
And may review your commit streams for good message and a possible squash? |
Currently `setup` is always mocked using `distutils.core` but this might cause issues with certain packages. Fix this behavior by parsing the `setup.py` file for the correct module to import. Closes: aboutcode-org#116 Signed-off-by: Bennati, Stefano <[email protected]>
Signed-off-by: Bennati, Stefano <[email protected]>
d049c1b
to
cfdcedf
Compare
Signed-off-by: Bennati, Stefano <[email protected]>
Signed-off-by: Bennati, Stefano <[email protected]>
Done, we can squash all commits |
Another week has passed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks. Merging
Currently.
setup
is always mocked usingdistutils.core
but this might cause issues with certain packages. Fix this behavior by parsing thesetup.py
file for the correct module to import.Closes: #116
Signed-off-by: Bennati, Stefano [email protected]