issues
search
benoit-dubreuil
/
template-repo-cpp-ecosystem
Template repository for projects using C++ and its ecosystem
MIT License
0
stars
0
forks
source link
Append the Script Directory to PYTHONPATH
#137
Closed
benoit-dubreuil
closed
3 years ago
benoit-dubreuil
commented
3 years ago
Specifications
For the generated
Python
virtual environment (#96), or somehow at the project's root directory level, append the
conf/script/src
directory to the
PYTHONPATH
environment variable.
It must work for the generated build target directories (#128).
Tips
See
https://docs.python.org/3/library/sys.html#sys.path
See
https://docs.python.org/3/using/cmdline.html#envvar-PYTHONPATH
See
https://docs.python.org/3/library/site.html#module-site
Generate a
.pth
script inside the
venv
directory (which is also
sys.prefix
when the
venv
is activated).
Write the single line
../src
inside that
.pth
script.
Specifications
conf/script/src
directory to thePYTHONPATH
environment variable.Tips
.pth
script inside the venv directory (which is alsosys.prefix
when the venv is activated).../src
inside that.pth
script.