[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v5 08/25] python: Add pipenv support
From: |
John Snow |
Subject: |
[PATCH v5 08/25] python: Add pipenv support |
Date: |
Thu, 18 Feb 2021 14:27:16 -0500 |
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 loadout 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>
Reviewed-by: Cleber Rosa <crosa@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 00000000000..9534830b5eb
--- /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.29.2
- [PATCH v5 03/25] python: create qemu packages, (continued)
- [PATCH v5 03/25] python: create qemu packages, John Snow, 2021/02/18
- [PATCH v5 04/25] python: create utils sub-package, John Snow, 2021/02/18
- [PATCH v5 05/25] python: add qemu package installer, John Snow, 2021/02/18
- [PATCH v5 06/25] python: add VERSION file, John Snow, 2021/02/18
- [PATCH v5 07/25] python: add directory structure README.rst files, John Snow, 2021/02/18
- [PATCH v5 10/25] python: move pylintrc into setup.cfg, John Snow, 2021/02/18
- [PATCH v5 09/25] python: add pylint import exceptions, John Snow, 2021/02/18
- [PATCH v5 11/25] python: add pylint to pipenv, John Snow, 2021/02/18
- [PATCH v5 14/25] python: Add flake8 to pipenv, John Snow, 2021/02/18
- [PATCH v5 13/25] python: add excluded dirs to flake8 config, John Snow, 2021/02/18
- [PATCH v5 08/25] python: Add pipenv support,
John Snow <=
- [PATCH v5 15/25] python: move mypy.ini into setup.cfg, John Snow, 2021/02/18
- [PATCH v5 16/25] python: add mypy to pipenv, John Snow, 2021/02/18
- [PATCH v5 12/25] python: move flake8 config to setup.cfg, John Snow, 2021/02/18
- [PATCH v5 17/25] python: move .isort.cfg into setup.cfg, John Snow, 2021/02/18
- [PATCH v5 18/25] python/qemu: add isort to pipenv, John Snow, 2021/02/18
- [PATCH v5 19/25] python/qemu: add qemu package itself to pipenv, John Snow, 2021/02/18
- [PATCH v5 21/25] python: add pytest and tests, John Snow, 2021/02/18
- [PATCH v5 23/25] python: add .gitignore, John Snow, 2021/02/18
- [PATCH v5 22/25] python: add Makefile for some common tasks, John Snow, 2021/02/18
- [PATCH v5 24/25] gitlab: add python linters to CI, John Snow, 2021/02/18