fevrin / pipenv Goto Github PK
View Code? Open in Web Editor NEWThis project forked from pypa/pipenv
Python Development Workflow for Humans.
Home Page: https://pipenv.pypa.io
License: MIT License
This project forked from pypa/pipenv
Python Development Workflow for Humans.
Home Page: https://pipenv.pypa.io
License: MIT License
This code is buggy since it assumes the package name matches exactly the import name:
Lines 1583 to 1585 in b503e8b
In the case of 'nmap3', its package name is 'python3-nmap':
https://pypi.org/project/python3-nmap/
core.py
silently fails on this and seems to not install any packages it finds once it runs into 'import nmap3':
https://github.com/fevrin/pipenv/blob/b503e8b3aa32b9c80596e70682272e9ec22a8473/pipenv/core.py#L216-L21985
$ pipenv install -c ../../
Discovering imports from local codebase...
Found mysql-connector-repackaged!
Found nmap!
Found pylama!
Found pylint!
Found pytest!
Found requests!
Found slack-sdk!
Found tabulate!
Pipfile.lock (db4242) out of date, updating to (704a1c)...
Locking [dev-packages] dependencies...
Locking [packages] dependencies...
Building requirements...
Resolving dependencies...
β Success!
Updated Pipfile.lock (704a1c)!
Installing dependencies from Pipfile.lock (704a1c)...
π ββββββββββββββββββββββββββββββββ 29/29 β 00:00:06
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.
$ cat Pipfile
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
mysql-connector-repackaged = "*"
nmap = "*"
pylama = "*"
pylint = "*"
pytest = "*"
requests = "*"
slack-sdk = "*"
tabulate = "*"
[dev-packages]
[requires]
python_version = "3.8"
I've printed the exception here in core.py
and utils.py
, as adding --verbose
does nothing in this case:
$ pipenv install -c ../../
Discovering imports from local codebase...
import_from_code: pkg_names = '['mysql_connector_repackaged', 'nmap3', 'pylama', 'pylint', 'pytest', 'Requests', 'slack_sdk', 'tabulate']'
poper_case: package_name = 'mysql_connector_repackaged'
proper_case: good_name = 'mysql-connector-repackaged'
poper_case: package_name = 'nmap3'
import_from_code: exception 'Unable to find package nmap3 in PyPI repository.'
do_install: code = '[]'
import_from_code: pkg_names = '['mysql_connector_repackaged', 'nmap3', 'pylama', 'pylint', 'pytest', 'Requests', 'slack_sdk', 'tabulate']'
poper_case: package_name = 'mysql_connector_repackaged'
proper_case: good_name = 'mysql-connector-repackaged'
poper_case: package_name = 'nmap3'
import_from_code: exception 'Unable to find package nmap3 in PyPI repository.'
Pipfile.lock (704a1c) out of date, updating to (db4242)...
Locking [dev-packages] dependencies...
Locking [packages] dependencies...
Updated Pipfile.lock (db4242)!
Installing dependencies from Pipfile.lock (db4242)...
π ββββββββββββββββββββββββββββββββ 0/0 β 00:00:00
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.
$ cat Pipfile
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
[dev-packages]
[requires]
python_version = "3.8"
This is the environment I'm using:
$ pipenv --version
pipenv, version 2021.5.29
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.3 LTS
Release: 20.04
Codename: focal
I didn't see an existing issue about this in the official repo, but the barrier to entry in this fork is much lower π
Provide the steps to replicate (which usually at least includes the commands and the Pipfile).
Pipenv version: '2021.5.29'
Pipenv location: '/home/user/.local/lib/python3.8/site-packages/pipenv'
Python location: '/usr/bin/python3'
Python installations found:
3.8.10
: /usr/bin/python3
3.8.10
: /usr/bin/python3.8
3.8.10
: /bin/python3
3.8.10
: /bin/python3.8
2.7.18
: /usr/bin/python2
2.7.18
: /usr/bin/python2.7
2.7.18
: /bin/python2
2.7.18
: /bin/python2.7
PEP 508 Information:
{'implementation_name': 'cpython',
'implementation_version': '3.8.10',
'os_name': 'posix',
'platform_machine': 'x86_64',
'platform_python_implementation': 'CPython',
'platform_release': '5.11.0-38-generic',
'platform_system': 'Linux',
'platform_version': '#42~20.04.1-Ubuntu SMP Tue Sep 28 20:41:07 UTC 2021',
'python_full_version': '3.8.10',
'python_version': '3.8',
'sys_platform': 'linux'}
System environment variables:
SHELL
SESSION_MANAGER
QT_ACCESSIBILITY
COLORTERM
SCREEN_CONF
XDG_CONFIG_DIRS
LESS
HISTCONTROL
XDG_MENU_PREFIX
GNOME_DESKTOP_SESSION_ID
TMUX
HISTSIZE
LANGUAGE
LC_ADDRESS
GNOME_SHELL_SESSION_MODE
LC_NAME
SSH_AUTH_SOCK
GIT_PS1_SHOWDIRTYSTATE
HISTTIMEFORMAT
GOPRIVATE
XMODIFIERS
DESKTOP_SESSION
LC_MONETARY
SSH_AGENT_PID
EDITOR
GOBIN
GTK_MODULES
PWD
XDG_SESSION_DESKTOP
LOGNAME
XDG_SESSION_TYPE
GPG_AGENT_INFO
XAUTHORITY
GIT_PS1_SHOWCOLORHINTS
WINDOWPATH
VAULT_CACERT
HOME
USERNAME
IM_CONFIG_PHASE
LC_PAPER
LANG
LS_COLORS
XDG_CURRENT_DESKTOP
VTE_VERSION
PROMPT_COMMAND
GNOME_TERMINAL_SCREEN
INVOCATION_ID
MANAGERPID
LESSCLOSE
XDG_SESSION_CLASS
TERM
LC_IDENTIFICATION
WORK
LESSOPEN
USER
VAULT_ADDR
TMUX_PANE
LPASS_AGENT_TIMEOUT
GNOME_TERMINAL_SERVICE
MANPAGER
DISPLAY
SHLVL
LC_TELEPHONE
QT_IM_MODULE
LC_MEASUREMENT
PAPERSIZE
XDG_RUNTIME_DIR
GO111MODULE
LC_TIME
LFS
JOURNAL_STREAM
XDG_DATA_DIRS
PATH
HISTIGNORE
GDMSESSION
HISTFILESIZE
DBUS_SESSION_BUS_ADDRESS
GIT_PS1_SHOWUNTRACKEDFILES
LC_NUMERIC
OLDPWD
_
PIP_DISABLE_PIP_VERSION_CHECK
PYTHONDONTWRITEBYTECODE
PIP_SHIMS_BASE_MODULE
PIP_PYTHON_PATH
PYTHONFINDER_IGNORE_UNSUPPORTED
Pipenvβspecific environment variables:
Debugβspecific environment variables:
PATH
: /home/user/.local/bin:/home/user/bin:/home/user/.local/bin:/home/user/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/user/.gem/ruby/2.7.0/bin:/home/user/go/bin
SHELL
: /bin/bash
EDITOR
: vim
LANG
: en_US.UTF-8
PWD
: /home/user/stage2-utils/fleet-management
Contents of Pipfile
('/home/user/fleet-management/Pipfile'):
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
mysql-connector-repackaged = "*"
nmap = "*"
pylama = "*"
pylint = "*"
pytest = "*"
requests = "*"
slack-sdk = "*"
tabulate = "*"
[dev-packages]
[requires]
python_version = "3.8"
Contents of Pipfile.lock
('/home/user/fleet-management/Pipfile.lock'):
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.