pipenv icon indicating copy to clipboard operation
pipenv copied to clipboard

files installed in site-packages top-level

Open hubutui opened this issue 2 years ago • 8 comments

pipenv 2023.9.8

Issue description

Some files are installed in site-packages top-level:

python-pipenv /usr/lib/python3.11/site-packages/
python-pipenv /usr/lib/python3.11/site-packages/docs/
python-pipenv /usr/lib/python3.11/site-packages/docs/Makefile
python-pipenv /usr/lib/python3.11/site-packages/docs/__pycache__/
python-pipenv /usr/lib/python3.11/site-packages/docs/__pycache__/conf.cpython-311.opt-1.pyc
python-pipenv /usr/lib/python3.11/site-packages/docs/__pycache__/conf.cpython-311.pyc
python-pipenv /usr/lib/python3.11/site-packages/docs/_static/
python-pipenv /usr/lib/python3.11/site-packages/docs/_static/custom.css
python-pipenv /usr/lib/python3.11/site-packages/docs/_static/konami.js
python-pipenv /usr/lib/python3.11/site-packages/docs/_static/pipenv.png
python-pipenv /usr/lib/python3.11/site-packages/docs/_templates/
python-pipenv /usr/lib/python3.11/site-packages/docs/_templates/hacks.html
python-pipenv /usr/lib/python3.11/site-packages/docs/_templates/sidebarlogo.html
python-pipenv /usr/lib/python3.11/site-packages/docs/conf.py
python-pipenv /usr/lib/python3.11/site-packages/docs/make.bat
python-pipenv /usr/lib/python3.11/site-packages/examples/
python-pipenv /usr/lib/python3.11/site-packages/examples/Pipfile
python-pipenv /usr/lib/python3.11/site-packages/examples/Pipfile.lock

Expected result

Describe what you expected.

Actual result

When possible, provide the verbose output (--verbose), especially for locking and dependencies resolving issues.

Steps to replicate

$ pipenv --support

Pipenv version: '2023.9.8'

Pipenv location: '/usr/lib/python3.11/site-packages/pipenv'

Python location: '/usr/bin/python'

OS Name: 'posix'

User pip version: '23.2.1'

user Python installations found:

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.11.5',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '6.5.3-arch1-1',
 'platform_system': 'Linux',
 'platform_version': '#1 SMP PREEMPT_DYNAMIC Wed, 13 Sep 2023 08:37:40 +0000',
 'python_full_version': '3.11.5',
 'python_version': '3.11',
 'sys_platform': 'linux'}

System environment variables:

  • CONDA_EXE
  • CONDA_PYTHON_EXE
  • CONDA_SHLVL
  • CUDA_PATH
  • DBUS_SESSION_BUS_ADDRESS
  • DEBUGINFOD_URLS
  • DOTNET_BUNDLE_EXTRACT_BASE_DIR
  • DOTNET_ROOT
  • EDITOR
  • GLFW_IM_MODULE
  • GRADLE_HOME
  • GTK_IM_MODULE
  • HG
  • HOME
  • LANG
  • LESS
  • LOGNAME
  • LSCOLORS
  • LS_COLORS
  • MAIL
  • MKLROOT
  • MOTD_SHOWN
  • OLDPWD
  • ORACLE_HOME
  • PAGER
  • PATH
  • PWD
  • PYTHONDOCS
  • QT_IM_MODULE
  • SDL_IM_MODULE
  • SHELL
  • SHLVL
  • SSH_CLIENT
  • SSH_CONNECTION
  • SSH_TTY
  • TERM
  • TERM_PROGRAM
  • TERM_PROGRAM_VERSION
  • TMUX
  • TMUX_PANE
  • TNS_ADMIN
  • USER
  • XDG_RUNTIME_DIR
  • XDG_SESSION_CLASS
  • XDG_SESSION_ID
  • XDG_SESSION_TYPE
  • XMODIFIERS
  • ZSH
  • _
  • _CE_CONDA
  • _CE_M
  • npm_config_prefix
  • DOCKER_HOST
  • CRYPTOGRAPHY_OPENSSL_NO_LEGACY
  • PIP_DISABLE_PIP_VERSION_CHECK
  • PYTHONDONTWRITEBYTECODE
  • PYTHONFINDER_IGNORE_UNSUPPORTED

Pipenv–specific environment variables:

Debug–specific environment variables:

  • PATH: /home/hubutui/.local/bin:/home/hubutui/bin:/home/hubutui/.local/bin:/home/hubutui/bin:/opt/miniconda/condabin:/usr/local/sbin:/usr/local/bin:/usr/bin:/opt/cuda/bin:/opt/cuda/nsight_compute:/opt/cuda/nsight_systems/bin:/home/hubutui/.dotnet/tools:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl :/opt/cuda/bin:/opt/cuda/nsight_compute:/opt/cuda/nsight_systems/bin
  • SHELL: /bin/zsh
  • EDITOR: vim
  • LANG: en_US.UTF-8
  • PWD: /home/hubutui

hubutui avatar Sep 16 '23 14:09 hubutui

I am not sure I understand the issue report -- do you have a reproduction example?

matteius avatar Sep 16 '23 15:09 matteius

I mean these files should be installed in site-packages/pipenv/, not just in site-packages.Then we would get something like this:

python-pipenv /usr/lib/python3.11/site-packages/
python-pipenv /usr/lib/python3.11/site-packages/pipenv/docs/
python-pipenv /usr/lib/python3.11/site-packages/pipenv/docs/Makefile
python-pipenv /usr/lib/python3.11/site-packages/pipenv/docs/__pycache__/
python-pipenv /usr/lib/python3.11/site-packages/pipenv/docs/__pycache__/conf.cpython-311.opt-1.pyc
python-pipenv /usr/lib/python3.11/site-packages/pipenv/docs/__pycache__/conf.cpython-311.pyc
python-pipenv /usr/lib/python3.11/site-packages/pipenv/docs/_static/
python-pipenv /usr/lib/python3.11/site-packages/pipenv/docs/_static/custom.css
python-pipenv /usr/lib/python3.11/site-packages/pipenv/docs/_static/konami.js
python-pipenv /usr/lib/python3.11/site-packages/pipenv/docs/_static/pipenv.png
python-pipenv /usr/lib/python3.11/site-packages/pipenv/docs/_templates/
python-pipenv /usr/lib/python3.11/site-packages/pipenv/docs/_templates/hacks.html
python-pipenv /usr/lib/python3.11/site-packages/pipenv/docs/_templates/sidebarlogo.html
python-pipenv /usr/lib/python3.11/site-packages/pipenv/docs/conf.py
python-pipenv /usr/lib/python3.11/site-packages/pipenv/docs/make.bat
python-pipenv /usr/lib/python3.11/site-packages/pipenv/examples/
python-pipenv /usr/lib/python3.11/site-packages/pipenv/examples/Pipfile
python-pipenv /usr/lib/python3.11/site-packages/pipenv/examples/Pipfile.lock

hubutui avatar Sep 17 '23 02:09 hubutui

This also creates a situation where someone (not that I know of a situation like this) but where someone who:

  1. runs pip install examples (to install the https://pypi.org/project/examples/ module)
  2. runs pip install pipenv

Has a directory named that includes files from both "examples" and "pipenv" module - example below:

root@9e3a60b42f6a:/usr/local/lib/python3.9/site-packages/examples# ls -la
total 60
drwxr-xr-x 3 root root  4096 Sep 23 00:17 .
drwxr-xr-x 1 root root  4096 Sep 23 00:17 ..
-rw-r--r-- 1 root root   139 Sep 23 00:11 Pipfile
-rw-r--r-- 1 root root  9766 Sep 23 00:11 Pipfile.lock
-rw-r--r-- 1 root root   595 Sep 23 00:17 __init__.py
drwxr-xr-x 2 root root  4096 Sep 23 00:17 __pycache__
-rw-r--r-- 1 root root 10120 Sep 23 00:17 api.py
-rw-r--r-- 1 root root  4962 Sep 23 00:17 example_objects.py
-rw-r--r-- 1 root root  2725 Sep 23 00:17 registry.py

colinbjohnson avatar Sep 23 '23 00:09 colinbjohnson

Similar problem in pip-run: https://github.com/jaraco/pip-run/issues/98

mtelka avatar Feb 10 '24 12:02 mtelka