pyobfuscate
pyobfuscate copied to clipboard
Install location hardcoded as `/usr/bin`
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/binbypasses 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']
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: