Add sdist support - #31
Conversation
4766526 to
4acf8ce
Compare
|
@TG1999 thanks! This looks great. Btw, which of the issues opened in scancode-toolkit does this fix, all of them? i.e. aboutcode-org/scancode-toolkit#3011 aboutcode-org/scancode-toolkit#3008 aboutcode-org/scancode-toolkit#3009? |
4acf8ce to
726d8a8
Compare
@AyanSinhaMahapatra Yes! |
7c99106 to
fd73eed
Compare
pombredanne
left a comment
There was a problem hiding this comment.
Thanks!
IMHO we need some more unit tests and try to see where you can use objects or object attributes rather than dictionaries
Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
|
The PR title "Add failing test" is likely outdated now? |
pombredanne
left a comment
There was a problem hiding this comment.
The changes to "src/_packagedcode/pypi.py" should be applied also to ScanCode TK.
You can refine them here alright, but in the end you must add the changes back to SCTK and also have tests in SCTK for the changes. The tests for your "src/_packagedcode/pypi.py" changes should all be in SCTK IMHO.
The current situation where we vendor and copy of pypi.py from SCTK is temporary and we need to be careful to keep the two in sync by hand for now.
e3e4253 to
ce9d58a
Compare
Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
ce9d58a to
a04a634
Compare
pombredanne
left a comment
There was a problem hiding this comment.
Thanks for the updates. See some comments for your review.
IMHO we could also use a different design rather than the "Wheel" and "Sdist" formats data you use for now.
| parser.read_file(f) | ||
|
|
||
| for section in parser.values(): | ||
| if section.name == 'options': |
There was a problem hiding this comment.
You likely want to add also the legacy "setup_requires" and "test_requires" as well as the "python_requires"
There was a problem hiding this comment.
@pombredanne can you provide me some sample setup.cfg file with legacy "setup_requires", "test_requires", "python_requires"
There was a problem hiding this comment.
See https://github.com/search?l=INI&q="setup_requires"&type=Code and https://github.com/karpierz/QQt/blob/930e22d9612f814fa242b1547ad037037ef6b5c7/setup.cfg
And also https://github.com/search?l=INI&q="test_requires"&type=Code for test_requires
Other notes:
- use
pythonas a scope for the "python_requires" and use a Package URL ofpkg:generic/pythonsuch that this is clear that this is not a PyPI package. That way you can spot this special package and scope as needed to use it in your processing - make sure these fixes are also applied to setup.py parsing as well as other PyPI metadata ... the important part is mostly for python_requires ... setup/test requires are legacy and could only be seen in setup.py/setup.cfg
- you need tests also on the SCTK side... you may want to start there instead
- for setup_requires, use
setupas scope.
Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
I have changed the design please check if this looks good |
pombredanne
left a comment
There was a problem hiding this comment.
Thanks. See my comments for your consideration.
| parser.read_file(f) | ||
|
|
||
| for section in parser.values(): | ||
| if section.name == 'options': |
There was a problem hiding this comment.
See https://github.com/search?l=INI&q="setup_requires"&type=Code and https://github.com/karpierz/QQt/blob/930e22d9612f814fa242b1547ad037037ef6b5c7/setup.cfg
And also https://github.com/search?l=INI&q="test_requires"&type=Code for test_requires
Other notes:
- use
pythonas a scope for the "python_requires" and use a Package URL ofpkg:generic/pythonsuch that this is clear that this is not a PyPI package. That way you can spot this special package and scope as needed to use it in your processing - make sure these fixes are also applied to setup.py parsing as well as other PyPI metadata ... the important part is mostly for python_requires ... setup/test requires are legacy and could only be seen in setup.py/setup.cfg
- you need tests also on the SCTK side... you may want to start there instead
- for setup_requires, use
setupas scope.
2f31bdf to
cbde1d7
Compare
090db29 to
b69630e
Compare
Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
b69630e to
2b8134a
Compare
pombredanne
left a comment
There was a problem hiding this comment.
Thanks!
Please see some nitpickings for your review
Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
Signed-off-by: Tushar Goel tushar.goel.dav@gmail.com