Is there a directory-depth limit on the auto-location of pipfile? I have a three-level directory structure in my project and I'm finding that pipenv
commands from any tier-three (or deeper) directory don't know that they're already part of a pipenv project.
Here's a demonstration:
$ env -i sh -l
$ mkdir /tmp/myproject
$ cd /tmp/myproject
$ pipenv --where
No Pipfile present at project home. Consider running `pipenv install` first to automatically generate a Pipfile for you.
$ touch Pipfile
$ pipenv --where
/tmp/myproject
$ mkdir -p a/b/c/d
$ cd a
$ pipenv --where
/tmp/myproject
$ cd b
$ pipenv --where
/tmp/myproject
$ cd c
$ pipenv --where
No Pipfile present at project home. Consider running `pipenv install` first to automatically generate a Pipfile for you.
$ cd d
$ pipenv --where
No Pipfile present at project home. Consider running `pipenv install` first to automatically generate a Pipfile for you.
You can see here that in subdirectories at depths of one or two pipenv will honor the parent pipfile, but deeper directories seem to disable that behavior.
Is this a bug or a feature? I read the docs a good deal and even debugged pipenv to try to pinpoint the cause, but found nothing relevant.
Debug details:
$ pipenv --support
Pipenv version: `'2022.7.4'`
Pipenv location: `'/usr/lib/python3.10/site-packages/pipenv'`
Python location: `'/usr/bin/python'`
Python installations found:
- `3.10.5`: `/usr/bin/python`
- `3.10.5`: `/usr/bin/python3`
PEP 508 Information:
`` `
{'implementation_name': 'cpython',
'implementation_version': '3.10.5',
'os_name': 'posix',
'platform_machine': 'x86_64',
'platform_python_implementation': 'CPython',
'platform_release': '5.10.120-16471-g167ad2e5dcba',
'platform_system': 'Linux',
'platform_version': '#1 SMP PREEMPT Fri Jul 29 18:58:29 PDT 2022',
'python_full_version': '3.10.5',
'python_version': '3.10',
'sys_platform': 'linux'}
`` `
System environment variables:
- `LESSCHARSET`
- `EDITOR`
- `PWD`
- `LANG`
- `VISUAL`
- `SHLVL`
- `PATH`
- `_`
- `OLDPWD`
- `LC_CTYPE`
- `PIP_SHIMS_BASE_MODULE`
- `PIP_DISABLE_PIP_VERSION_CHECK`
- `PIP_PYTHON_PATH`
- `PYTHONDONTWRITEBYTECODE`
- `PYTHONFINDER_IGNORE_UNSUPPORTED`
Pipenv–specific environment variables:
(none)
Debug–specific environment variables:
- `PATH`: `/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl`
- `EDITOR`: `nvim`
- `LANG`: `en_US.UTF-8`
- `PWD`: `/tmp/myproject/a/b/c/d`