You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It would be great for Poetry to allow developers to implement a "pre-install" script. As of now, the scripts of Poetry are available after running "poetry install" once. Sometimes, users will need to run a script before running "poetry install", as the example below shows.
Impact
In our company, we use local packages references like the following in a pyproject.toml:
my_local_package = { path = "./packages/my_local_package", develop = true }
But our local package is not actually in the given path : we have to copy it beforehand. We did this so that production packages are decoupled from other parts of the code and only code that is being actively used by our production packages are on our docker images.
So we have something that looks like this:
root_of_our_project
packages
local_package_A
local_package_B
local_package_C
production
production_package_A
src
<some_code_files_that_use_local_packages_A_and_C>
packages
local_package_A
local_package_C
production_package_B
src
<some_code_files_that_use_local_package_B>
packages
local_package_B
Therefore, a step that we have to do before doing "poetry install" on our production packages is to copy our local packages in the related "packages" folders via bash scripts.
It would be great to add a "pre-install" script implementation system so that we could just run "poetry install" and the copy of packages would be done under the hood before actually installing.
Workarounds
We currently run a bash file that will do the copy before doing "poetry install".
The text was updated successfully, but these errors were encountered:
@dimbleby I am not sure it is. If I'm not mistaken, PoeThePoet, and other elements discussed in #2496, describe scripts that would work after running "poetry install" at least once, which resolves dependencies and creates a virtual environment if necessary. I'm talking about a pre-install script, e.g a script that we could run right before the "poetry install" command, when the dependencies have not yet been resolved by Poetry.
In my example, I believe the kind of scripts described in #2496 would not work, as the local packages would not have been processed yet.
Issue Kind
Brand new capability
Description
It would be great for Poetry to allow developers to implement a "pre-install" script. As of now, the scripts of Poetry are available after running "poetry install" once. Sometimes, users will need to run a script before running "poetry install", as the example below shows.
Impact
In our company, we use local packages references like the following in a pyproject.toml:
my_local_package = { path = "./packages/my_local_package", develop = true }
But our local package is not actually in the given path : we have to copy it beforehand. We did this so that production packages are decoupled from other parts of the code and only code that is being actively used by our production packages are on our docker images.
So we have something that looks like this:
Therefore, a step that we have to do before doing "poetry install" on our production packages is to copy our local packages in the related "packages" folders via bash scripts.
It would be great to add a "pre-install" script implementation system so that we could just run "poetry install" and the copy of packages would be done under the hood before actually installing.
Workarounds
We currently run a bash file that will do the copy before doing "poetry install".
The text was updated successfully, but these errors were encountered: