pyobfuscate icon indicating copy to clipboard operation
pyobfuscate copied to clipboard

Install location hardcoded as `/usr/bin`

Open charles-dyfis-net opened this issue 8 years ago • 1 comments

Ticket inspired by http://stackoverflow.com/questions/43600414/error-errno-1-operation-not-permitted-usr-bin-pyobfuscate-macos-sierra/43600504


The setup.py for pyobfuscate treats the executable as data. This bypasses several desirable behaviors:

  • In general, distutils will honor --prefix, --exec-prefix, or to try to install to a location under the user's home directory if passed --user; hardcoding /usr/bin bypasses all of these behaviors.
  • In general, distutils will honor the install location for an active virtualenv.
  • In general, distutils will fix up the shebang used by any installed script to point to a locally available interpreter.

To fix this:

data_files=[('/usr/bin', ['pyobfuscate'])]

should be replaced with:

scripts=['pyobfuscate']

charles-dyfis-net avatar Apr 25 '17 03:04 charles-dyfis-net

I made a fork that fixes this issue: https://github.com/TQwan/pyobfuscate And pull request for the original repository here: https://github.com/astrand/pyobfuscate/pull/20 All the author has to do is click the merge button, since it's compatible with master branch. :wink:

TQwan avatar Nov 12 '18 12:11 TQwan