Miyamoto icon indicating copy to clipboard operation
Miyamoto copied to clipboard

Suggestion: Add a Pipfile

Open AshesOfEther opened this issue 5 years ago • 0 comments

What is a Pipfile?

A Pipfile describes the dependencies of a project in a way that allows people to run a single command to install them. If the dependencies changes, one can simply rerun the command (Or a different one, I can't remember) to get the new ones. It is used by Pipenv

Pipenv is a Python tool that allows you to create a 'virtual environment' (Like virtualenv), where the packages installed inside are isolated from global packages. Say I have version 2.3.6 of the package foo. There's this open source project I want to contribute to. However, it requires version 1.4.3 of foo. The versions aren't compatible, so I can either use one or the other. That's where Pipenv comes in. The creator of the open source project used Pipenv, so I can just clone it with Git and run pipenv install. I then have version 1.43 of foo in this virtual environment, and 2.3.6 in my global one.

Why should we use this?

To make installing dependencies much easier, as I'm sure most people don't wanna deal with dependency management themselves.

Are there any alternatives?

You could also add a requirements.txt file, and have people use Pip to install dependencies from that (Also with a single command), but using this method, dependencies aren't isolated from the rest of the system.

AshesOfEther avatar Apr 15 '19 18:04 AshesOfEther