-
Notifications
You must be signed in to change notification settings - Fork 26
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 converting of editable package #288
Conversation
src/npe2/__main__.py
Outdated
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 have added this file to simplify debugging my allow run by python -m npe2
Codecov Report
@@ Coverage Diff @@
## main #288 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 37 37
Lines 2813 2818 +5
=========================================
+ Hits 2813 2818 +5
|
for f_path in dist.files: | ||
if "__editable__" in f_path.name: | ||
path = Path(f_path.read_text().strip()) / top_module | ||
break |
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.
@Czaki I have zero context here so take my review with a grain of salt, but if there are no tests here, could you at least add comments about why these lines are needed? eg "if the given npe1 plugin is installed in editable mode, then X doesn't work so we must do Y"
Yes @Czaki, this is the weird editable mode used by setuptools for a pyproject only package |
@tlambert03 partseg has How did you think? Should I implement some simple package to write a test for it, or just add comments? |
Would be great to test it. I can't remember, did I make a test case for a setup.cfg repo here? If so, could you use it as a template to copy? |
@tlambert03 @jni I have finally created the proper test. |
When I try to convert PartSeg to npe2 I found that there is a problem with the proper finding path to the module when the package is installed in editable mode.
Maybe it is somehow connected to changes to setuptools mentioned by @tlambert03 in the past.