Skip to content
New issue

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

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

Already on GitHub? # to your account

pipenv ignore environment variable PIP_TARGET when calculate dependancy delta. #4775

Closed
cm-iwata opened this issue Aug 27, 2021 · 0 comments
Closed
Labels
PR: awaiting-review The PR related to this issue is awaiting review by a maintainer.

Comments

@cm-iwata
Copy link
Contributor

Issue description

Sometimes I use pipenv with environment variable PIP_TARGET for install libraries to specified directory.
But pipenv will skip install libraries if libraries already install to default location.

Expected result

pipenv should install libraries to specified directory when exec with environment variable PIP_TARGET.

Actual result

pipenv will skip install libraries to specified directory when libraries already installed to default location(.venv/lib/pythonx.x/site-packages).

Steps to replicate

  1. install some library and create Pipfile.lock
pipenv install six
  1. Create some directory for specify pip install target.
mkdir layer
  1. Try install library to specified directory.
PIP_TARGET=layer  pipenv sync
Installing dependencies from Pipfile.lock (34ad89)…
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 0/0 — 0

Install library will skip and output 0/0 — 00:00:00

  1. List specified directory.There are no library.
ls layer

This command will return empty result.

$ pipenv --support

Pipenv version: '2020.6.2'

Pipenv location: '/Users/cm-iwata/.anyenv/envs/pyenv/versions/3.8.3/lib/python3.8/site-packages/pipenv'

Python location: '/Users/cm-iwata/.anyenv/envs/pyenv/versions/3.8.3/bin/python3.8'

Python installations found:

  • 3.9.2: /usr/local/bin/python3
  • 3.9.2: /usr/local/bin/python3.9
  • 3.8.3: /Users/cm-iwata/.anyenv/envs/pyenv/versions/3.8.3/bin/python3
  • 3.8.3: /Users/cm-iwata/.anyenv/envs/pyenv/versions/3.8.3/bin/python3.8
  • 3.8.3: /Users/cm-iwata/.anyenv/envs/pyenv/versions/3.8.3/bin/python3
  • 3.7.8: /Users/cm-iwata/.anyenv/envs/pyenv/versions/3.7.8/bin/python3
  • 3.7.3: /usr/bin/python3
  • 3.6.5: /Users/cm-iwata/.anyenv/envs/pyenv/versions/3.6.5/bin/python3
  • 3.6.1: /Users/cm-iwata/.anyenv/envs/pyenv/versions/3.6.1/bin/python3
  • 2.7.16: /usr/bin/python2
  • 2.7.16: /usr/bin/python2.7

PEP 508 Information:

{'implementation_name': 'cpython',
 'implementation_version': '3.8.3',
 'os_name': 'posix',
 'platform_machine': 'x86_64',
 'platform_python_implementation': 'CPython',
 'platform_release': '19.5.0',
 'platform_system': 'Darwin',
 'platform_version': 'Darwin Kernel Version 19.5.0: Tue May 26 20:41:44 PDT '
                     '2020; root:xnu-6153.121.2~2/RELEASE_X86_64',
 'python_full_version': '3.8.3',
 'python_version': '3.8',
 'sys_platform': 'darwin'}

System environment variables:

  • LDFLAGS
  • TERM_PROGRAM
  • NODENV_SHELL
  • PYENV_ROOT
  • SHELL
  • TERM
  • TMPDIR
  • CPPFLAGS
  • PIPENV_VENV_IN_PROJECT
  • TERM_PROGRAM_VERSION
  • GOENV_ROOT
  • TERM_SESSION_ID
  • PYENV_VERSION
  • NODENV_ROOT
  • LC_ALL
  • USER
  • RBENV_ROOT
  • SSH_AUTH_SOCK
  • PYENV_DIR
  • __CF_USER_TEXT_ENCODING
  • PATH
  • LaunchInstanceID
  • PWD
  • LANG
  • ITERM_PROFILE
  • CLOUDSDK_PYTHON
  • PYENV_HOOK_PATH
  • XPC_FLAGS
  • RBENV_SHELL
  • XPC_SERVICE_NAME
  • HISTCONTROL
  • COLORFGBG
  • HOME
  • SHLVL
  • PYENV_SHELL
  • LC_TERMINAL_VERSION
  • ITERM_SESSION_ID
  • LOGNAME
  • GOENV_SHELL
  • LC_TERMINAL
  • SECURITYSESSIONID
  • COLORTERM
  • PIP_DISABLE_PIP_VERSION_CHECK
  • PYTHONDONTWRITEBYTECODE
  • PIP_SHIMS_BASE_MODULE
  • PIP_PYTHON_PATH
  • PYTHONFINDER_IGNORE_UNSUPPORTED

Pipenv–specific environment variables:

  • PIPENV_VENV_IN_PROJECT: 1

Debug–specific environment variables:

  • PATH: /Users/cm-iwata/.anyenv/envs/pyenv/versions/3.8.3/bin:/Users/cm-iwata/.anyenv/envs/pyenv/libexec:/Users/cm-iwata/.anyenv/envs/pyenv/plugins/python-build/bin:/Users/cm-iwata/gcp/google-cloud-sdk/bin:/usr/local/bin:/usr/local/opt/mysql-client/bin:/Users/cm-iwata/.anyenv/envs/rbenv/shims:/Users/cm-iwata/.anyenv/envs/rbenv/bin:/Users/cm-iwata/.anyenv/envs/pyenv/shims:/Users/cm-iwata/.anyenv/envs/pyenv/bin:/Users/cm-iwata/.anyenv/envs/nodenv/shims:/Users/cm-iwata/.anyenv/envs/nodenv/bin:/Users/cm-iwata/.anyenv/envs/goenv/shims:/Users/cm-iwata/.anyenv/envs/goenv/bin:/Users/cm-iwata/.anyenv/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/Applications/Visual Studio Code.app/Contents/Resources/app/bin
  • SHELL: /bin/bash
  • LANG: en_US.UTF-8
  • PWD: /tmp/pipenvtest2

Contents of Pipfile ('/private/tmp/pipenvtest2/Pipfile'):

[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]

[packages]
six = "*"

[requires]
python_version = "3.8"

Contents of Pipfile.lock ('/private/tmp/pipenvtest2/Pipfile.lock'):

{
    "_meta": {
        "hash": {
            "sha256": "d9b5cc506fc4feb9bf1ae7cadfd3737d5a0bd2b2d6c3fbcf0de3458bab34ad89"
        },
        "pipfile-spec": 6,
        "requires": {
            "python_version": "3.8"
        },
        "sources": [
            {
                "name": "pypi",
                "url": "https://pypi.org/simple",
                "verify_ssl": true
            }
        ]
    },
    "default": {
        "six": {
            "hashes": [
                "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926",
                "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"
            ],
            "index": "pypi",
            "version": "==1.16.0"
        }
    },
    "develop": {}
}
cm-iwata added a commit to cm-iwata/pipenv that referenced this issue Aug 27, 2021
@matteius matteius added the PR: awaiting-review The PR related to this issue is awaiting review by a maintainer. label Dec 24, 2021
@oz123 oz123 closed this as completed in b20841e Mar 19, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
PR: awaiting-review The PR related to this issue is awaiting review by a maintainer.
Projects
None yet
Development

No branches or pull requests

2 participants