Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The package installs its executables incorrectly #25

Open
4 tasks done
vbrozik opened this issue Dec 12, 2023 · 0 comments
Open
4 tasks done

The package installs its executables incorrectly #25

vbrozik opened this issue Dec 12, 2023 · 0 comments

Comments

@vbrozik
Copy link

vbrozik commented Dec 12, 2023

Environment
Please provide some information about your computer environment:

  • OS:
    $ uname -a
    Linux NTT-44Q83J3 5.10.102.1-microsoft-standard-WSL2 #1 SMP Wed Mar 2 00:30:59 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
    $ lsb_release -a
    No LSB modules are available.
    Distributor ID: Ubuntu
    Description:    Ubuntu 22.04.3 LTS
    Release:        22.04
    Codename:       jammy
    
  • Python version:
    $ python -VV && python -c "import os; print('\n'.join([os.name, os.sys.platform]));"
    Python 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0]
    posix
    linux
    
  • pip version:
    $ pip -V
    pip 23.3.1 from /home/vbrozik/dev/asa-cp-conv/.venv/lib/python3.10/site-packages/pip (python 3.10)
    
  • Terminal/Shell: (powershell, pwsh, Windows Terminal, WSL etc.)
    Windows Terminal, bash inside WSL2

Description

After the package is installed its executables are not available to be executed directly from CLI. The usual location $VIRTUAL_ENV/bin/ does not contain executable wrappers used to start the package's scripts.

Expected behavior

After the installation the directory $VIRTUAL_ENV/bin/ should contain a wrapper for every program (like pip-date) with the executable right set and without any suffixes.

Actual Behaviour:

The directory $VIRTUAL_ENV/bin/ directly contains the package's Python scripts like pip-date.py without the executable access right set and with the .py suffix instead of usual wrappers used to start the program the normal way.

How to Reproduce

  1. Create a venv, activate it and update its default packages.
  2. Install pip-date using pip.
  3. Check that pip-date cannot be executed.
  4. Check that the bin directory inside the venv does not contain wrappers for the package's scripts.

Output

~$ mkdir -p tmp/test_pip-date
~$ cd tmp/test_pip-date/
~/tmp/test_pip-date$ python3 -m venv venv
~/tmp/test_pip-date$ . venv/bin/activate
(venv) ~/tmp/test_pip-date$ pip install -U pip setuptools
Requirement already satisfied: pip in ./venv/lib/python3.10/site-packages (22.0.2)
...
Successfully installed pip-23.3.1 setuptools-69.0.2
(venv) ~/tmp/test_pip-date$ pip list
Package    Version
---------- -------
pip        23.3.1
setuptools 69.0.2

(venv) ~/tmp/test_pip-date$ pip install pip-date
Collecting pip-date
  Using cached pip_date-1.0.5-py3-none-any.whl (32 kB)
Collecting requests (from pip-date)
  Using cached requests-2.31.0-py3-none-any.whl.metadata (4.6 kB)
Collecting lxml (from pip-date)
  Using cached lxml-4.9.3-cp310-cp310-manylinux_2_28_x86_64.whl.metadata (3.8 kB)
Collecting charset-normalizer<4,>=2 (from requests->pip-date)
  Using cached charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (33 kB)
Collecting idna<4,>=2.5 (from requests->pip-date)
  Using cached idna-3.6-py3-none-any.whl.metadata (9.9 kB)
Collecting urllib3<3,>=1.21.1 (from requests->pip-date)
  Using cached urllib3-2.1.0-py3-none-any.whl.metadata (6.4 kB)
Collecting certifi>=2017.4.17 (from requests->pip-date)
  Using cached certifi-2023.11.17-py3-none-any.whl.metadata (2.2 kB)
Using cached lxml-4.9.3-cp310-cp310-manylinux_2_28_x86_64.whl (7.9 MB)
Using cached requests-2.31.0-py3-none-any.whl (62 kB)
Using cached certifi-2023.11.17-py3-none-any.whl (162 kB)
Using cached charset_normalizer-3.3.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (142 kB)
Using cached idna-3.6-py3-none-any.whl (61 kB)
Using cached urllib3-2.1.0-py3-none-any.whl (104 kB)
Installing collected packages: urllib3, lxml, idna, charset-normalizer, certifi, requests, pip-date
Successfully installed certifi-2023.11.17 charset-normalizer-3.3.2 idna-3.6 lxml-4.9.3 pip-date-1.0.5 requests-2.31.0 urllib3-2.1.0

(venv) ~/tmp/test_pip-date$ echo $PATH
/home/vbrozik/tmp/test_pip-date/venv/bin:/home/vbrozik/.local/bin:/usr/local/sbin:...

(venv) ~/tmp/test_pip-date$ which pip-date
(venv) ~/tmp/test_pip-date$ echo $?
1
(venv) ~/tmp/test_pip-date$ pip-date
Command 'pip-date' not found, did you mean:
  command 'sip-date' from deb sofia-sip-bin (1.12.11+20110422.1-2.1+deb10u3ubuntu0.22.04.2)
Try: sudo apt install <deb name>

(venv) ~/tmp/test_pip-date$ ls -l /home/vbrozik/tmp/test_pip-date/venv/bin
total 100
-rw-r--r-- 1 vbrozik vbrozik  2003 Dec 12 10:02 activate
-rw-r--r-- 1 vbrozik vbrozik   929 Dec 12 10:02 activate.csh
-rw-r--r-- 1 vbrozik vbrozik  2209 Dec 12 10:02 activate.fish
-rw-r--r-- 1 vbrozik vbrozik  9033 Dec 12 10:02 Activate.ps1
-rwxr-xr-x 1 vbrozik vbrozik   265 Dec 12 10:03 normalizer
-rwxr-xr-x 1 vbrozik vbrozik   253 Dec 12 10:03 pip
-rwxr-xr-x 1 vbrozik vbrozik   253 Dec 12 10:03 pip3
-rwxr-xr-x 1 vbrozik vbrozik   253 Dec 12 10:03 pip3.10
-rwxr-xr-x 1 vbrozik vbrozik   253 Dec 12 10:03 pip3.11
-rw-r--r-- 1 vbrozik vbrozik  2362 Dec 12 10:03 pipbyday.py
-rw-r--r-- 1 vbrozik vbrozik 20808 Dec 12 10:03 pip-date.py
-rw-r--r-- 1 vbrozik vbrozik  2029 Dec 12 10:03 pip-describe.py
-rw-r--r-- 1 vbrozik vbrozik  6622 Dec 12 10:03 pip-search.py
drwxr-xr-x 2 vbrozik vbrozik  4096 Dec 12 10:03 __pycache__
-rw-r--r-- 1 vbrozik vbrozik  4866 Dec 12 10:03 pyfileinfo.py
-rw-r--r-- 1 vbrozik vbrozik  3432 Dec 12 10:03 pyOSinfo.py
lrwxrwxrwx 1 vbrozik vbrozik     7 Dec 12 10:02 python -> python3
lrwxrwxrwx 1 vbrozik vbrozik    16 Dec 12 10:02 python3 -> /usr/bin/python3
lrwxrwxrwx 1 vbrozik vbrozik     7 Dec 12 10:02 python3.10 -> python3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant