I have a package which I am building locally to use inside an embedded environment.
I am trying to generate a console script automatically, so I am using console_scripts inside entry_points like the following:
setup(...,
entry_points={
'console_scripts': [
'app=x.y:main'
]
},
# Below is added as the other tried methods failed.
options={
'build_scripts': {
'executable': '/bin/custom_python',
},
}
)
I am trying to set the python interpreter used in my entry_point as it is different than the one inside the build system. But no matter what I try it keeps set to the local interpreter.
I tried several options like:
- Setting an interpreter in shebang header in setup.py
- Setting sys.executable inside setup.py
- Using options={'build_scripts': {'executable': 'bin/custom_python'}}
- Using pip install --global-option=build --global-option='--executable=/bin/custom_python'
But none of the above worked. I wonder if there is something I am missing?