I'd love to be able to replace our use of requirements.txt files with Pipenv. However, I don't quite see how yet, as our use of the requirements.txt files seems to be rather unique. Our setup consists of a top-level application project ('mainproject'), our own framework 'Pillar', and a couple of Pillar extensions. To manage the requirements, each of those have their own requirements.txt file that refers to the requirements.txt files of their dependencies. This allowed us to pin versions for each project and still have per-project files.
pillar/requirements.txt contains all the framework's requirements, all with pinned versions.
extension1/requirements.txt starts with -r ../pillar/requirements.txt to link in the framework requirements, then continues to list the extension-speciifc ones.
This setup allows us to quickly enable/disable certain extensions, and avoid repeating requirements and pinned versions. We want to get rid of those files, though, as pinning each version is a nightmare to maintain (as you well know).
How would such a setup translate to Pipenv? We don't push Pillar to PyPi, nor do we push the extensions. In the end it's all collected into a docker container for deployment simply by checking out certain Git branches; there is no python3 setup.py bdist invocations to create distribution packages.
I've tried adding something like this to extension1/Pipfile:
This doesn't work, though, as pipenv install in the main project gives us:
Virtualenv location: /home/sybren/.virtualenvs/mainproject-O7T8y2wV
Pipfile.lock not found, creating...
Locking [dev-packages] dependencies...
Locking [packages] dependencies...
Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
You can use $ pipenv install --skip-lock to bypass this mechanism, then run $ pipenv graph to inspect the situation.
Hint: try $ pipenv lock --pre if it is a pre-release dependency.
Could not find a version that matches pillar (from -r /tmp/pipenv-jmw6x1mc-requirements/pipenv-x6d8in2v-constraints.txt (line 2))
No versions found
Was https://pypi.org/simple reachable?
For me it would be ideal if we could specify "include section X from pipfile Y", something along those lines in mainproject/Pipfile:
Does #2148 cover this usage? This is indeed something I am interested in providing (see discussion in the linked thread), but it would require modifications in the Pipfile specification.
#2148 seems to be very similar. However, I'm a big fan of Pipenv and I have no desire to keep our current requirements.txt and requirements-dev.txt files around. If we can find a solution that only depends on Pipfile and Pipfile.lock and doesn't require generating other files, that would be perfect.
Hi there,
I'd love to be able to replace our use of requirements.txt files with Pipenv. However, I don't quite see how yet, as our use of the requirements.txt files seems to be rather unique. Our setup consists of a top-level application project ('mainproject'), our own framework 'Pillar', and a couple of Pillar extensions. To manage the requirements, each of those have their own requirements.txt file that refers to the requirements.txt files of their dependencies. This allowed us to pin versions for each project and still have per-project files.
pillar/requirements.txtcontains all the framework's requirements, all with pinned versions.extension1/requirements.txtstarts with-r ../pillar/requirements.txtto link in the framework requirements, then continues to list the extension-speciifc ones.mainproject/requirements.txt: starts with:This setup allows us to quickly enable/disable certain extensions, and avoid repeating requirements and pinned versions. We want to get rid of those files, though, as pinning each version is a nightmare to maintain (as you well know).
How would such a setup translate to Pipenv? We don't push Pillar to PyPi, nor do we push the extensions. In the end it's all collected into a docker container for deployment simply by checking out certain Git branches; there is no
python3 setup.py bdistinvocations to create distribution packages.I've tried adding something like this to
extension1/Pipfile:This doesn't work, though, as
pipenv installin the main project gives us:For me it would be ideal if we could specify "include section X from pipfile Y", something along those lines in
mainproject/Pipfile:$ pipenv --support
Pipenv version:
'2018.7.1'Pipenv location:
'/home/sybren/.local/lib/python3.6/site-packages/pipenv'Python location:
'/usr/bin/python3'Other Python installations in
PATH:2.7:/usr/bin/python2.72.7:/usr/bin/python2.73.4:/usr/bin/python3.4m3.4:/usr/bin/python3.43.5:/opt/python3.5/bin/python3.5m3.5:/opt/python3.5/bin/python3.53.6:/usr/bin/python3.6m3.6:/usr/bin/python3.62.7.15:/usr/bin/python2.7.15:/usr/bin/python23.6.5:/usr/bin/python3PEP 508 Information:
System environment variables:
CLUTTER_IM_MODULECOLORFGBGCOLORTERMDBUS_SESSION_BUS_ADDRESSDEFAULTS_PATHDESKTOP_SESSIONDISPLAYGPG_AGENT_INFOGS_LIBGTK2_RC_FILESGTK_IM_MODULEGTK_RC_FILESHOMEKDE_FULL_SESSIONKDE_SESSION_UIDKDE_SESSION_VERSIONKONSOLE_DBUS_SERVICEKONSOLE_DBUS_SESSIONKONSOLE_DBUS_WINDOWKONSOLE_PROFILE_NAMELANGLANGUAGELC_ADDRESSLC_IDENTIFICATIONLC_MEASUREMENTLC_MONETARYLC_NAMELC_NUMERICLC_PAPERLC_TELEPHONELC_TIMELOGNAMEMANDATORY_PATHOLDPWDPATHPROFILEHOMEPWDQT4_IM_MODULEQT_ACCESSIBILITYQT_AUTO_SCREEN_SCALE_FACTORSESSION_MANAGERSHELLSHELL_SESSION_IDSHLVLSSH_AGENT_PIDSSH_AUTH_SOCKTERMUSERWINDOWIDXAUTHORITYXCURSOR_SIZEXCURSOR_THEMEXDG_CONFIG_DIRSXDG_CURRENT_DESKTOPXDG_DATA_DIRSXDG_RUNTIME_DIRXDG_SEATXDG_SEAT_PATHXDG_SESSION_CLASSXDG_SESSION_DESKTOPXDG_SESSION_IDXDG_SESSION_PATHXDG_SESSION_TYPEXDG_VTNRXMODIFIERS_PS1GOPATHGOROOTEDITORVISUALASAN_OPTIONSLS_COLORSWORKON_HOMEVIRTUALENVWRAPPER_PROJECT_FILENAMEVIRTUALENVWRAPPER_SCRIPTVIRTUALENVWRAPPER_HOOK_DIRPYTHONDONTWRITEBYTECODEPIP_PYTHON_PATHPipenv–specific environment variables:
Debug–specific environment variables:
PATH:/usr/lib/ccache:/home/sybren/workspace/blender-git/arcanist/bin:/opt/go/bin:/home/sybren/workspace/go/bin:/home/sybren/.local/bin:/home/sybren/bin:/usr/lib/ccache:/home/sybren/workspace/blender-git/arcanist/bin:/home/sybren/bin:/opt/python3.5/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/opt/lib/alembic/bin:/opt/lib/abcview/bin:/home/sybren/.configfiles/fzf/binSHELL:/usr/bin/zshEDITOR:/usr/bin/vimLANG:en_GB.UTF-8PWD:/home/sybren/workspace/cloud/pipenvtest/mainprojectContents of
Pipfile('/home/sybren/workspace/cloud/pipenvtest/mainproject/Pipfile'):The text was updated successfully, but these errors were encountered: