'scripts' lose executable priveleges from pip install
See original GitHub issueEnvironment
- pip version: 20.0.2
- Python version: 2.7.5
- OS: RHEL 7.7/SELinux
- setuptools version: 44.0.0
Description
pip
-installing a package that contains a setup.py
that specifies the scripts
argument causes the resulting file to lost its executable permission(s).
Reproducible example located at:
Expected behavior
The source repository bin/my_script
is executable (via chmox a+rx bin/my_script
). It loses this permission when installed by pip. It should maintain its executable permission for all users.
How to Reproduce
$ pip install git+ssh://git@github.com/bsolomon1124/pip-scripts-hostbits-mvce.git
$ ls -la /usr/bin/my_script # or ls -la /usr/local/bin/my_script
Output
$ ls -la /usr/bin/my_script
-rw-r--r--. 1 root root 39 Jan 28 19:10 /usr/bin/my_script
Alternate example
$ yum install gcc python-devel
$ pip install uwsgi
$ ls -la /usr/bin/uwsgi
-rw-r--r--. 1 root root 1369984 Jan 28 18:53 /usr/bin/uwsgi
$ echo $PATH
/usr/lib64/qt-3.3/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (1 by maintainers)
Top Results From Across the Web
Why is my pip-installed Python script not executable for ...
/usr/bin/vcard is only executable by root. What gives? On my up-to-date Arch Linux machine it works as expected: $ sudo pip2 install vcard ......
Read more >How to specify execute permissions of scripts using Python ...
The package includes executable scripts, which use the scripts parameter of the setup() function. I'm installing like this: sudo python setup.py ...
Read more >How come a python file is executable even though its ...
Run the script by its shebang does require the executable bit set, because it would start a new process, the Python interpreter.
Read more >Install Python on a locked down PC without local admin
Learn how you can install Python on your PC even if you don't have local admin or if you are not able to...
Read more >How to Install Python PIP on Windows, Mac, and Linux
By default, the Python installer places its executables in your AppData directory, so it doesn't need admin permissions. Or you can specify a ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Is
/tmp
mountednoexec
? It may be related to #6364.Related helpful discussion for others with this issue: https://github.com/pypa/pip/issues/4462.
In this case,
works like a charm.