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
Added subdirectory editable option, small refactoring. #1082
Conversation
niedbalski
commented
Jul 24, 2013
- Small refactoring on pip/req.py.
- Added _strip_postfix, _build_req_from_url, _build_editable_options functions.
- Added test for install a package from a subdirectory.
…options. Not parse_editable returns package,url, options
@@ -37,7 +37,8 @@ | |||
class InstallRequirement(object): | |||
|
|||
def __init__(self, req, comes_from, source_dir=None, editable=False, | |||
url=None, as_egg=False, update=True, prereleases=None): | |||
url=None, as_egg=False, update=True, prereleases=None, | |||
editable_options={}): |
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.
Passing mutable objects as default values can lead to bugs, better to pass None and create the empty dict in the method.
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.
Corrected.
Hey @pnasrat , merge? |
This is a pretty useful feature for my current use case, we have a single repository for several python packages, the layout looks like this:
Being foo and bar python packages., it would be great to install them using pip. |
Sorry been caught up with life stuff - can you make sure this is mergable then I'll take another look. |
Hey @pnasrat: Synced changes from upstream. Ready to merge. |
+1 for this awesome feature! |
""" | ||
Strip req postfix ( -dev, 0.2, etc ) | ||
""" | ||
## FIXME: use package_to_requirement? |
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.
Out of curiosity what's stopping you use that? Not a blocker from me but just curious
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.
Oh I see it's an extracted method keeping the original comment.
I think this is pretty much ready but can you: Add a description of the change to CHANGES.txt and also add documentation for the feature in docs/usage.rst |
@pnasrat done. |
Hey @pnasrat, any news on this merge? |
Sorry I missed the last few updates in my inbox for this bug somehow. It looks like it's not mergable atm. I know this has taken longer than I like if you have time to get it mergable now do it and I'll merge otherwise I can try pull and fix up myself on the weekend. |
Any update on this? |
Looking at merging here https://github.com/pnasrat/pip/tree/subdirectory-editable Currently running tests. |