-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Install: option to skip current project package #757
Install: option to skip current project package #757
Conversation
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.
@seleem1337 Thanks for addressing this issue. Its a blocking my workplace from requiring use of poetry in a large corporate environment.
I just tried out this fix and it didn't seem to work. I got this error:
{path to my package} does not contain any element
I made the following change and then it worked as expected:
return_code = installer.run()
if return_code != 0:
return return_code
if self.option("no-root"):
return 0
try:
builder = SdistBuilder(self.poetry, NullEnv(), NullIO())
except ModuleOrPackageNotFound:
# This is likely due to the fact that the project is an application
# not following the structure expected by Poetry
# If this is a true error it will be picked up later by build anyway.
return 0
self.line(
" - Installing <info>{}</info> (<comment>{}</comment>)".format(
self.poetry.package.pretty_name, self.poetry.package.pretty_version
)
)
if self.option("dry-run"):
return 0
ea621bb
to
30a8cb1
Compare
30a8cb1
to
1ff6a95
Compare
@brycedrennan @sdispater thanks for the feedback! I've applied the changes. |
Thanks! |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Add
--no-root
option to theinstall
command to avoid the installation of the project's root package.Fixes #730.
Pull Request Check List
This is just a reminder about the most common mistakes. Please make sure that you tick all appropriate boxes. But please read our contribution guide at least once, it will save you unnecessary review cycles!
Note: If your Pull Request introduces a new feature or changes the current behavior, it should be based
on the
develop
branch. If it's a bug fix or only a documentation update, it should be based on themaster
branch.If you have any questions to any of the points above, just submit and ask! This checklist is here to help you, not to deter you from contributing!