[tor-bugs] #11190 [Obfsproxy]: obfsproxy shebang should point to "python2", not "python"

Tor Bug Tracker & Wiki blackhole at torproject.org
Sat Apr 12 00:18:09 UTC 2014


#11190: obfsproxy shebang should point to "python2", not "python"
-------------------------+-------------------------------------------------
     Reporter:  yawning  |      Owner:  asn
         Type:  defect   |     Status:  reopened
     Priority:  normal   |  Milestone:
    Component:           |    Version:
  Obfsproxy              |   Keywords:  python version, obfsproxy, tbb,
   Resolution:           |  flashproxy, MikePerry201404R
Actual Points:           |  Parent ID:
       Points:           |
-------------------------+-------------------------------------------------

Comment (by dcf):

 Replying to [comment:5 yawning]:
 > I'm not sure how many python scripts we actually ship in TBB 3.6, but
 the correct fix for obfsproxy is in my userrepo as `bug_11190`.  Other PTs
 that contain `#!/usr/bin/python` should also be changed, since it's fairly
 clear that the build process doesn't cause distutils/setuptools to modify
 all of the scripts.

 I think it's just due to some setuptools weirdness in how obfsproxy is set
 up. The "obfsproxy" executable isn't actually mentioned in setup.py, and
 it should be. If it were instead listed under `scripts`, then its shebang
 would be modified appropriately.

 For example, try `hello`:
 {{{
 #!/usr/bin/env python
 print "Hello world"
 }}}
 and `setup.py`:
 {{{
 from setuptools import setup
 setup(name = "hello", version="1.0", scripts=["hello"])
 }}}

 Depending on whether you run `python setup.py build` or `python2 setup.py
 build`, then shebang under the `build` directory will be different.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/11190#comment:6>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list