[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 05/15] python: Add pipenv support
From: |
John Snow |
Subject: |
[PATCH v2 05/15] python: Add pipenv support |
Date: |
Wed, 14 Oct 2020 10:29:47 -0400 |
pipenv is a tool used for managing virtual environments with pinned,
explicit dependencies. It is used for precisely recreating python
virtual environments.
pipenv uses two files to do this:
(1) Pipfile, which is similar in purpose and scope to what setup.py
lists. It specifies the requisite minimum to get a functional
environment for using this package.
(2) Pipfile.lock, which is similar in purpose to `pip freeze >
requirements.txt`. It specifies a canonical virtual environment used for
deployment or testing. This ensures that all users have repeatable
results.
The primary benefit of using this tool is to ensure repeatable CI
results with a known set of packages. Although I endeavor to support as
many versions as I can, the fluid nature of the Python toolchain often
means tailoring code for fairly specific versions.
Note that pipenv is *not* required to install or use this module; this is
purely for the sake of repeatable testing by CI or developers.
Here, a "blank" pipfile is added with no dependencies, but specifies
Python 3.6 for the virtual environment.
Pipfile will specify our version minimums, while Pipfile.lock specifies
an exact loudout of packages that were known to operate correctly. This
latter file provides the real value for easy setup of container images
and CI environments.
Signed-off-by: John Snow <jsnow@redhat.com>
---
python/Pipfile | 11 +++++++++++
1 file changed, 11 insertions(+)
create mode 100644 python/Pipfile
diff --git a/python/Pipfile b/python/Pipfile
new file mode 100644
index 0000000000..9534830b5e
--- /dev/null
+++ b/python/Pipfile
@@ -0,0 +1,11 @@
+[[source]]
+name = "pypi"
+url = "https://pypi.org/simple"
+verify_ssl = true
+
+[dev-packages]
+
+[packages]
+
+[requires]
+python_version = "3.6"
--
2.26.2
- [PATCH v2 00/15] python: create installable package, John Snow, 2020/10/14
- [PATCH v2 01/15] python: create qemu.core package, John Snow, 2020/10/14
- [PATCH v2 02/15] python: add qemu package installer, John Snow, 2020/10/14
- [PATCH v2 03/15] python: add VERSION file, John Snow, 2020/10/14
- [PATCH v2 04/15] python: add directory structure README.rst files, John Snow, 2020/10/14
- [PATCH v2 06/15] python: add pylint exceptions to __init__.py, John Snow, 2020/10/14
- [PATCH v2 07/15] python: move pylintrc into setup.cfg, John Snow, 2020/10/14
- [PATCH v2 05/15] python: Add pipenv support,
John Snow <=
- [PATCH v2 08/15] python: add pylint to pipenv, John Snow, 2020/10/14
- [PATCH v2 09/15] python: move flake8 config to setup.cfg, John Snow, 2020/10/14
- [PATCH v2 10/15] python: Add flake8 to pipenv, John Snow, 2020/10/14
- [PATCH v2 12/15] python: add mypy to pipenv, John Snow, 2020/10/14
- [PATCH v2 13/15] python: move .isort.cfg into setup.cfg, John Snow, 2020/10/14
- [PATCH v2 11/15] python: move mypy.ini into setup.cfg, John Snow, 2020/10/14
- [PATCH v2 14/15] python/qemu: add isort to pipenv, John Snow, 2020/10/14
- [PATCH v2 15/15] python/qemu: add qemu package itself to pipenv, John Snow, 2020/10/14