Opened 10 years ago

Closed 10 years ago

#21528 closed defect (worksforme)

python26 2.6.2_4: scripts installed with distutils have incorrect hashbang

Reported by: dackze+macports@… Owned by: blb@…
Priority: Normal Milestone:
Component: ports Version: 1.8.0
Keywords: python Cc: MarcusCalhoun-Lopez (Marcus Calhoun-Lopez)
Port: python26


Scripts installed using install incorrectly have a hashbang of #!/usr/bin/python:

$ which python
$ python_select -s
$ head -1 scripts/dnuos 
#!/usr/bin/env python
$ sudo python install
running install
running build
running build_py
copying dnuos/locale/fr/LC_MESSAGES/ -> build/lib/dnuos/locale/fr/LC_MESSAGES
running build_scripts
running build_mo
running install_lib
creating /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/dnuos
running install_scripts
copying build/scripts-2.6/dnuos -> /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin
changing mode of /opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/dnuos to 755
running install_egg_info
Writing /opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/dnuos-1.0.10-py2.6.egg-info
$ head -1 `which dnuos`

The hashbang should read #!/opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/python.

I'm not sure if this affects other Python ports.

Change History (4)

comment:1 Changed 10 years ago by mf2k (Frank Schima)

Cc: blb@… removed
Owner: changed from macports-tickets@… to blb@…

comment:2 Changed 10 years ago by blb@…

I can't reproduce this here; if I run

/opt/local/bin/python2.6 install --root=/tmp/destroot

the dnuos script has a proper shebang line:

import sys
import dnuos

Also, creating a Portfile for dnuos, installing it shows the same shebang; I added the port in r58095 if you want to try that to see what happens.

comment:3 Changed 10 years ago by dackze+macports@…

I'm not able to reproduce it now either. I think I may have forgotten to delete the build directory after upgrading python_select to the current version, so it was installing the old busted version anyway.

You can mark this as invalid.

comment:4 Changed 10 years ago by blb@…

Resolution: worksforme
Status: newclosed

Good to hear it's working, but if you do find how to reproduce it say so here and I'll reopen.

Note: See TracTickets for help on using tickets.