Skip to content
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

Run a specific command after installation on a library #1578

Closed
2 tasks done
MuhmdRaouf opened this issue Nov 13, 2019 · 9 comments
Closed
2 tasks done

Run a specific command after installation on a library #1578

MuhmdRaouf opened this issue Nov 13, 2019 · 9 comments
Labels
kind/feature Feature requests/implementations

Comments

@MuhmdRaouf
Copy link

  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have searched the documentation and believe that my question is not covered.

Feature Request

I was trying to install pre-commit library and I found out that every time I pass the project to a friend I need to tell him to run the command pre-commit install --hook-type={pre-commit,pre-push} so we can use the hooks, is that a way that I can make a post-install command so I make sure to run the hooks

@MuhmdRaouf MuhmdRaouf added the kind/feature Feature requests/implementations label Nov 13, 2019
@brno32
Copy link

brno32 commented Nov 14, 2019

I agree this would be useful.

@whoizit
Copy link

whoizit commented Dec 16, 2019

I need it after installation 'spacy' by official manual if i check any Model https://spacy.io/usage
python -m spacy download en_core_web_sm

@TheButlah
Copy link
Contributor

This is my exact use case. Maybe tool.poetry.scripts is related? #241

@talarari
Copy link

same use case for me, anything that can be done here?

@a-recknagel
Copy link

a-recknagel commented Mar 15, 2021

Isn't this a duplicate of #265? If that is the case, the answer would unfortunately be "won't do"

@abdullah-abid-dev
Copy link

Maybe this answer will be helpful.

@joaoe
Copy link

joaoe commented Oct 14, 2022

Isn't this a duplicate of #265? If that is the case, the answer would unfortunately be "won't do"

Not really. #265 is about extending poetry with custom code.

This issue is about running a post-install command hook, which I agree is a very valid use case for a development setup, e.g., setup external tools and other stuff after running poetry install.
In my case, I'd like to populate some links to external tools in the virtualenv bin folder or PATH variable. This post-install command would not be in any way added to a built wheel to run in some third party. It would be just something to run locally.

@finswimmer
Copy link
Member

There are no plans for a build-in functionality for this. But it should be possible to create a poetry plugin for it: https://python-poetry.org/docs/plugins/#event-handler

@finswimmer finswimmer closed this as not planned Won't fix, can't repro, duplicate, stale Oct 20, 2022
Copy link

github-actions bot commented Mar 1, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/feature Feature requests/implementations
Projects
None yet
Development

No branches or pull requests

9 participants