The build process for my python package requires creating a virtual environment and installing the package into venv on a server, running tests, then copying the files and venv onto another server. My setup.py has a console script entry point:
setup(
...,
entry_points={
"console_scripts": [
"foo = mypackage.main:main",
]
},
)
When I try to use the console script on the server, it cannot find the executable because it was installed into the virtual environment on a different server.
I tried to set the executable to use a relative path in the setup
function options
keyword with the key build_scripts
, executable
.
How can I ensure that the console script uses the executable of the virtual environment that is activated?