Skip to content

Add --pipfile Pipfile.lock as an alternative of -r requirements.txt #6925

@olibre

Description

@olibre

What's the problem this feature will solve?

I use container to deploy Python application to production. The container building script performs the following command lines:

python3 -m pip install pipenv
python3 -m pipenv sync  # Install modules from Pipenv.lock 
python3 -m pipenv run python3 -m pip freeze > requirements.txt
python3 -m pip install -r requirements.txt
python3 -m pip uninstall pipenv
rm requirements.txt

Describe the solution you'd like

Replace the above command lines by just one pretty pip option:

python3 -m pip install --pipfile Pipfile.lock

Additional context

The project https://github.com/pypa/pipfile/blob/master/README.rst states:

Pipfile and its sister Pipfile.lock are a replacement for the existing standard pip's requirements.txt file.

Let's start the movement by adding an experimental option in next pip release 😄

EDIT: My colleague has just pointed me that this has already been (eventually) planed. The same document, at chapter Pip Integration (eventual) says:

pip will grow a new command line option, -p / --pipfile to install the versions as specified in a Pipfile, similar to its existing -r / --requirement argument for installing requirements.txt files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions