-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Category-based package installation #4745
Comments
One thing we will have to be particularly careful about, because having just two categories of |
Just to contribute with the discussion, I have a scenario where >2 groups would be useful: I'm working on a project that's entirely backed by AWS Lambda functions. The code is structured as a SAM project; one application - in one Git repository - composed of multiple Lambda functions, like so:
Each Lambda function is packaged and deployed independently, and they each have their own dependencies. Currently, I'm specifying all dependencies in the main |
I believe this feature is going to be important to preventing issues like #5344 where one package's setup.py depends on another package already being installed and available. I believe this used to happen based on luck with the sequential installs, but now it is more problematic as the single install phase will not get this lucky. The solution may very well be to support named categories, so some prerequisite packages can be installed ahead of time by specifying the order in which categories should be installed. For example say I have |
I began working on this: https://github.com/pypa/pipenv/tree/named-categories Planning on opening a PR for Hacktoberfest. |
Update provided: #5344 (comment) |
Be 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.
Not really. However, I guess it is.
Pipenv currently only allows for two "categories" of packages:
[packages]
and[dev-packages]
.I would like the ability to add custom categories to Pipenv.
Describe the solution you'd like
The ability to create new "categories". For instance, maybe a command like
pipenv install --category deployment <package>
to install a package into[deployment-packages]
, and then something likepipenv install --all
to install all packages, no matter what category they are in, and then something likepipenv install --category deployment
, to install all[packages]
, and all[deployment-packages]
. Alternatively, you could keep it similar to the way[dev-packages]
:pipenv install --deployment <package>
to install a package to the deployment categorypipenv install --deployment
to install all[packages]
, and all[deployment-packages]
pipenv install --all
to install all packagesDescribe alternatives you've considered
There are no good alternatives in my opinion, I have considered having multiple Pipfiles, but that doesn't work very well and is tedious, and hard to collaborate when you do that.
Additional context
None needed
Please run
$ pipenv --support
, and paste the results here. Don't put backticks (`
) around it! The output already contains Markdown formatting.If you're on macOS, run the following:
If you're on Windows, run the following:
If you're on Linux, run the following:
$ pipenv --support
Pipenv version:
'2021.5.29'
Pipenv location:
'c:\\users\\zurge\\appdata\\local\\programs\\python\\python37-32\\lib\\site-packages\\pipenv'
Python location:
'c:\\users\\zurge\\appdata\\local\\programs\\python\\python37-32\\python.exe'
Python installations found:
3.9.6
:D:\Python\python.exe
3.7.8
:C:\Users\zurgE\AppData\Local\Programs\Python\Python37\python.exe
3.7.4
:C:\Users\zurgE\AppData\Local\Programs\Python\Python37-32\python.exe
3.8.3
:C:\Users\zurgE\anaconda3\python.exe
PEP 508 Information:
System environment variables:
ALLUSERSPROFILE
APPDATA
ASL.LOG
AZ_ENABLED
CAMLIBS
CHROME_CRASHPAD_PIPE_NAME
COMMONPROGRAMFILES
COMMONPROGRAMFILES(X86)
COMMONPROGRAMW6432
COMPUTERNAME
COMSPEC
DEVKITARM
DEVKITPPC
DEVKITPRO
DRIVERDATA
GOPATH
HAXEPATH
HOMEDRIVE
HOMEPATH
IOLIBS
JAVA_HOME
LOCALAPPDATA
LOGONSERVER
MAGICK_HOME
NEKO_INSTPATH
NUMBER_OF_PROCESSORS
OCULUSBASE
ONEDRIVE
ONEDRIVECONSUMER
ORIGINAL_XDG_CURRENT_DESKTOP
OS
PATH
PATHEXT
POSH_GIT_STATUS
POWERSHELL_DISTRIBUTION_CHANNEL
PROCESSOR_ARCHITECTURE
PROCESSOR_ARCHITEW6432
PROCESSOR_IDENTIFIER
PROCESSOR_LEVEL
PROCESSOR_REVISION
PROGRAMDATA
PROGRAMFILES
PROGRAMFILES(X86)
PROGRAMW6432
PSMODULEPATH
PUBLIC
SESSIONNAME
SOURCESDK
SYSTEMDRIVE
SYSTEMROOT
TEMP
TMP
USERDOMAIN
USERDOMAIN_ROAMINGPROFILE
USERNAME
USERPROFILE
VPROJECT
WINDIR
TERM_PROGRAM
TERM_PROGRAM_VERSION
LANG
COLORTERM
VSCODE_GIT_IPC_HANDLE
GIT_ASKPASS
VSCODE_GIT_ASKPASS_NODE
VSCODE_GIT_ASKPASS_MAIN
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
:c:\users\zurge\appdata\local\programs\python\python37-32\lib\site-packages\pywin32_system32;C:\Program Files\PowerShell\7;C:\Users\zurgE\AppData\Local\Programs\Python\Python37-32\Scripts\;C:\Users\zurgE\AppData\Local\Programs\Python\Python37-32\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Razer Chroma SDK\bin;C:\Program Files\Razer Chroma SDK\bin;C:\Program Files\Oculus\Support\oculus-runtime;C:\Program Files (x86)\Razer\ChromaBroadcast\bin;C:\Program Files\Razer\ChromaBroadcast\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\nodejs\;C:\Users\zurgE\AppData\Local\Microsoft\WindowsApps;C:\Users\zurgE\.dotnet\tools;C:\Program Files (x86)\Brackets\command;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\HaxeToolkit\haxe;C:\HaxeToolkit\neko;C:\Program Files\Git\cmd;C:\Program Files\Go\bin;C:\Users\zurgE\OneDrive\Documents\pypy3.7-v7.3.4-win64;C:\Program Files\PowerShell\7\;C:\msys64\mingw64\bin;C:\Users\zurgE\OneDrive\Documents\Flutter\bin;C:\Program Files\Docker\Docker\resources\bin;C:\ProgramData\DockerDesktop\version-bin;C:\Users\zurgE\AppData\Local\Programs\Python\Python37-32\Scripts\;C:\Users\zurgE\AppData\Local\Programs\Python\Python37-32\;D:\Programs\Conan\conan;C:\Users\zurgE\AppData\Local\Microsoft\WindowsApps;C:\Users\zurgE\AppData\Roaming\npm;C:\Users\zurgE\AppData\Local\GitHubDesktop\bin;C:\Users\zurgE\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\zurgE\go\bin;C:\Users\zurgE\OneDrive\Documents\Flutter\bin;D:\Python\Scripts\;D:\Python\;C:\Users\zurgE\.dotnet\tools
LANG
:en_US.UTF-8
Contents of
Pipfile
('C:\Users\zurgE\OneDrive\Documents\cookie-bot\Pipfile'):Contents of
Pipfile.lock
('C:\Users\zurgE\OneDrive\Documents\cookie-bot\Pipfile.lock'):The text was updated successfully, but these errors were encountered: