Specify local folder to use for dependency.
See original GitHub issueBe sure to check the existing issues (both open and closed!), and make sure you are running the latest version of Pipenv.
Check the diagnose documentation for common issues and the PEEP list before posting! We may close your issue if it is very similar to one of them. Please be considerate and follow the PEEP process, or be on your way.
Make sure to mention your debugging experience if the documented solution failed.
Is your feature request related to a problem? Please describe.
I have a project that is structured like this:
project
|
|-package
| |-src
| |-setup.py
|-package_extras
| |-src
| |-setup.py
|-package_common
| |-src
| |-setup.py
In package/setup.py
and package-extras/setup.py
I have specified that that package-common
as a dependency. When developing the program, I prefer to use editable installs so that I can quickly change and test all three packages. I have added the following to my Pipfile
:
[packages]
package_common = {editable=true, path="./package_common}
package= {editable=true, path="./package}
package_extras = {editable=true, path="./package_extras}
When running pipenv update
, pipenv
checks the dependencies of package
and package-extras
and determines that it needs to install package-common
, however it only searches https://pypi.org/simple
, does not find the package, and then errors out.
Describe the solution you’d like
An additional argument or option available for pipenv
that will allow me to specify that a dependency of a package is found in a local folder.
Describe alternatives you’ve considered
- Manually Installing local packages one-by-one
- While useable, it somewhat defeats the purpose of using
pipenv
- While useable, it somewhat defeats the purpose of using
- Installing packages from a repository, or from a VCS:
- None of these packages are currently available on a repo or VCS Server
- Doing this prevents the packages from being editable.
Additional context
Add any other context or screenshots about the feature request here. It may be a good idea to mention that platform and Python version you are on.
Python 3.8 Ubuntu x64
$ pipenv --support
Pipenv version: '2021.5.29'
Pipenv location: '/home/gabe/.local/lib/python3.8/site-packages/pipenv'
Python location: '/usr/bin/python3'
Python installations found:
3.8.10
:/usr/bin/python3.8
3.8.10
:/usr/bin/python3
3.8.10
:/bin/python3.8
3.8.10
:/bin/python3
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.4.0-89-generic',
'platform_system': 'Linux',
'platform_version': '#100-Ubuntu SMP Fri Sep 24 14:50:10 UTC 2021',
'python_full_version': '3.8.10',
'python_version': '3.8',
'sys_platform': 'linux'}
System environment variables:
SHELL
PWD
LOGNAME
XDG_SESSION_TYPE
MOTD_SHOWN
HOME
LANG
LS_COLORS
SSH_CONNECTION
LESSCLOSE
XDG_SESSION_CLASS
TERM
LESSOPEN
USER
SHLVL
XDG_SESSION_ID
XDG_RUNTIME_DIR
SSH_CLIENT
XDG_DATA_DIRS
PATH
DBUS_SESSION_BUS_ADDRESS
SSH_TTY
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/gabe/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
SHELL
:/bin/bash
LANG
:en_US.UTF-8
PWD
:/home/gabe/testproj
Contents of Pipfile
(‘/home/gabe/testproj/Pipfile’):
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
[packages]
package-common = {editable = true, path = "./package_common"}
package-extras = {editable = true, path = "./package_extras"}
package = {editable = true, path = "./package"}
[dev-packages]
[requires]
python_version = "3.8"
Contents of Pipfile.lock
(‘/home/gabe/testproj/Pipfile.lock’):
{
"_meta": {
"hash": {
"sha256": "3de06bf6bb1fcffa06b1bbf79a729ef99d0b3be88b2f5b05478af33f74ffb8a7"
},
"pipfile-spec": 6,
"requires": {
"python_version": "3.8"
},
"sources": [
{
"name": "pypi",
"url": "https://pypi.org/simple",
"verify_ssl": true
}
]
},
"default": {
"package-common": {
"editable": true,
"path": "./package_common"
}
},
"develop": {}
}
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:7
@matteius Sorry for taking so long to reply. Was away from my relevant code.
I’m still having the same issue as I initially reported.
pipenv install -e package_common
works, but thenpipenv install -e package
fails afterwards.I am using setup.cfg instead of setup.py. Not sure why I wrote setup.py in my initial example.
In the
[options]
section of package/setup.cfg I have the following:The exception that I am getting is
could not find a version that satisfies the requirement package_common (from versions: none)
The issue appears to be that
pipenv
does not know to look in local directories for installing dependencies.@marsfan This should work now for editable dependencies that depend on each other for the latest pipenv version, but for this case, you likely need to add both packages as editable to the
Pipfile
to work.