freeze-requirements
freeze-requirements2 is a fork of https://github.com/flupke/freeze-requirements which is just missing one commit for newver versions of pip. Nothing more nothing less.
A script to help creating and maintaining frozen requirements for pip, inspired by this Mozilla dev team blog post.
Frozen requirements contain the packages you specified, plus all their dependencies, with pinned versions.
For example if you have requirements.txt containing this:
pyramid sqlalchemy
The frozen version would be:
# This file has been automatically generated, DO NOT EDIT! # Frozen requirements for "requirements.txt" pastedeploy==1.5.2 pyramid==1.5.1 repoze.lru==0.6 setuptools==5.5.1 sqlalchemy==0.9.7 translationstring==1.1 venusian==1.0 webob==1.4 zope.deprecation==4.1.1 zope.interface==4.1.1
Then you can use the frozen requirements in your deployment scripts with pip install -r requirements-frozen.txt --no-deps, and enjoy consistent deployments even if some packages are updated on pypi.
freeze-requirements can also put the downloaded source packages in a pypi-like directory structure on your web server, so you can speed up your deployments with pip install -r requirements-frozen.txt --index-url http://mywebserver.com/pypi-mirror, and also build wheels to speed up deployments even more.
Installation
Install from pypi:
$ pip install freeze-requirements
Or from source:
$ ./setup.py install
Examples
Create frozen versions of two requirements files (they will be named requirements-frozen.txt and requirements2-frozen.txt in this example, the -frozen suffix can be customized with --separate-requirements-suffix):
$ freeze-requirements freeze --separate-requirements requirements.txt requirements2.txt
Merge multiple requirements in a single file:
$ freeze-requirements freeze --merged-requirements requirements-merged.txt requirements.txt requirements2.txt
Use a cache to avoid reprocessing known requirements files:
$ freeze-requirements freeze --cache-dependencies requirements.txt
Download source packages and build wheels for them, putting them in a pypi-like directory structure:
$ freeze-requirements freeze --output-dir /path/to/my/pypi --build-wheels requirements.txt
News
0.4.4
Added workarounds for packages with non-string versions in their setup.py (bugs were caused by unittest2 0.7.1, see https://code.google.com/p/unittest-ext/issues/detail?id=84).
0.4.3
Added automatic conflicts resolution.
0.4.2
Added –no-rebuild-wheels flag, to avoid rebuilding wheels already present in –output-dir.
0.4.1
First proper release
Metadata
Release files for freeze-requirements2 0.5.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| freeze-requirements2-0.5.3.1.tar.gz | 11.2 kB | Without provenance | Details |
Release files / freeze-requirements2-0.5.3.1.tar.gz
| Download URL | freeze-requirements2-0.5.3.1.tar.gz |
|---|---|
| Size | 11.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
95298aafc9132849bdd867995efc153e069c1ee981c5cacbd688d9f349b9d11d
|
|
BLAKE2b-256 checksum How to use checksums |
3dcd8025126a35d7ec48b9b65a0129f79b0a4f68a5e615b376e99327d3b3db9b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.5
|
Security for freeze-requirements2 0.5.3.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.