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

Feature: allow customising export params (e.g. installing with extras) #35

Closed
alex-grover opened this issue Sep 27, 2021 · 4 comments · Fixed by #50
Closed

Feature: allow customising export params (e.g. installing with extras) #35

alex-grover opened this issue Sep 27, 2021 · 4 comments · Fixed by #50

Comments

@alex-grover
Copy link

Hello - thanks for this buildpack, we are successfully using it in production!

My issue: I'd like to have a dependency that's only installed in production, and not in development. In particular, it's recommended to use psycopg2-binary in development and build psycopg2 from source for production.

Based on this issue it seems that the Poetry recommendation for this use case is to install the prod dependency as an extra and then do poetry install/export -E production when you want to install the prod version.

My ideal solution would be to set an environment variable in Heroku that sets the -E in for the export step in this buildpack. If this is something you'd be willing to accept I can take a stab at implementing and open a PR, let me know!

@marns93
Copy link
Contributor

marns93 commented Feb 18, 2022

Hi @alex-grover
thanks for participating and sorry for the late response... :(

Yes sure, you can provide a PR for this. :)

@zyv
Copy link
Contributor

zyv commented Feb 22, 2022

Hi @alex-grover , maybe we could introduce a generic option like POETRY_EXPORT_PARAMS ? This will basically expose EXPORT_PARAMETERS to the outside - if not set, it will use our defaults (--without-hashes --with-credentials), if set, it will override them. This way users will be able to user --with-hashes if they don't use git dependencies for example.

I have made a TAP-based test suite for this buildpack to make meaningful local development possible, if you make a nice PR and cover it with tests, we will be happy to accept it.

@alex-grover
Copy link
Author

That sounds like a good solution. Since opening this issue, my company has moved to a Docker-based local dev setup so I don’t have the need/time to make the PR myself unfortunately

@zyv zyv changed the title Feature request: allow installing with extras Feature: allow customising Poetry export params (e.g. installing with extras) Feb 23, 2022
@zyv zyv changed the title Feature: allow customising Poetry export params (e.g. installing with extras) Feature: allow customising export params (e.g. installing with extras) Feb 23, 2022
@zyv
Copy link
Contributor

zyv commented Feb 23, 2022

@alex-grover thanks for the heads up. Unfortunately, we don't have the capacity to work on this, and we don't need it for our application, so we won't implement it immediately. I will leave this issue as open in the case that somebody comes across and wants to implement this, or maybe we get extra time to invest in this buildpack.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants