For distribution on Pypi, I wanted to create both Eggs and Wheels with
project.set_property("distutils_commands", ["sdist", "bdist_egg", "bdist_wheel"])
The project includes a script in src/main/scripts with a shebang of #!/usr/bin/env python. In the "sdist", this shebang remains intact and it works fine when installed from Pypi.
In the Egg and the Wheel, there is a modified shebang that points to the Python interpreter in the virtual environment that I use for building. Consequently, these files do not work when installed via Pypi. The same thing happens when I call the auto-generated setup.py myself.
I was able to work around this issue (after some inspiration) by manually adding
options = {'build_scripts': {'executable': '/usr/bin/env python'}},
into the setup.py, deleting the temporary files and then calling setup.py myself.
For distribution on Pypi, I wanted to create both Eggs and Wheels with
The project includes a script in src/main/scripts with a shebang of #!/usr/bin/env python. In the "sdist", this shebang remains intact and it works fine when installed from Pypi.
In the Egg and the Wheel, there is a modified shebang that points to the Python interpreter in the virtual environment that I use for building. Consequently, these files do not work when installed via Pypi. The same thing happens when I call the auto-generated setup.py myself.
I was able to work around this issue (after some inspiration) by manually adding
into the setup.py, deleting the temporary files and then calling setup.py myself.