heroku-python / conda-buildpack

[DEPRECATED] Buildpack for Conda.
MIT License
157 stars 251 forks source link

add environment vars to pre/post compile hook #23

Open nraynaud opened 8 years ago

nraynaud commented 8 years ago

Those are visible in the default python buildpack, but are noticeably absent from the conda buildpack. They are useful for migrating the database.

codingjoe commented 8 years ago

Hi, i just saw your PR. I don't thing you should export anything here. If you'd want to access the vars in the hooks, the hooks need to be sourced. Currently they are just executed. You could do this step in your hooks than, since you'd have access to $ENV_DIR

massover commented 8 years ago

@codingjoe can you elaborate on 'the hooks need to be sourced'? I don't understand your suggestion

codingjoe commented 8 years ago

If they are not sourced, you don't have access to variables defined in the compile script unless they have been exported, which they don't. You can also use the sub-env command that was introduced in the official python buildpack. Besides, I did all that here: https://github.com/Thermondo/conda-buildpack