Mock the actual setup provider defined in setup.py#120
Mock the actual setup provider defined in setup.py#120pombredanne merged 4 commits intoaboutcode-org:mainfrom
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 |
|
@pombredanne please suggest if any further modifications is require or if we can proceed to merge the changes? |
pombredanne
left a comment
There was a problem hiding this comment.
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.
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.
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 <stefano.bennati@here.com>
Signed-off-by: Bennati, Stefano <stefano.bennati@here.com>
d049c1b to
cfdcedf
Compare
Signed-off-by: Bennati, Stefano <stefano.bennati@here.com>
Signed-off-by: Bennati, Stefano <stefano.bennati@here.com>
|
Done, we can squash all commits |
|
Another week has passed |
Currently.
setupis always mocked usingdistutils.corebut this might cause issues with certain packages. Fix this behavior by parsing thesetup.pyfile for the correct module to import.Closes: #116
Signed-off-by: Bennati, Stefano stefano.bennati@here.com