This moment, I am using pyenv
+ venv
to manage Python
versions and specific libraries. My project layout looks like this:
- dir1
- subdir11
- subdir12
- subdir13
- dir2
- subdir21
- subdir22
- subdir23
My goal is, once venv
is activated dir1
and dir2
to be inside sys.path
. Basically, I solve this task but I really do not like solution. I added custom PYTHONPATH
inside venv
under bin/activate
file and everything works fine. This is not so flexible from deployment point of view. Does venv
provide some hooks
for this ? For example: set customer environment variables
once venv
is activated or run some function or something like this. I do not like idea, to modify bin/activate
file on every machine.
P.S I know about packaging stuff and setuptools
, but for this project I can not use it.
Any ideas ?
Thanks !