Generate requirements[-dev].txt from Pipfile using pipenv
Project description
Generate requirements[-dev].txt from Pipfile (using pipenv).
Free software: MIT
Documentation: https://pipenv-to-requirements.readthedocs.org/en/latest/
Rational
Pipfile and its sibling Pipfile.lock are clearly superior tools defining clear dependencies or a package. Pipfile is to be maintained by the package’s developer while Pipfile.lock represent a clear image of what is currently installed on the current system, guarantying full reproductibility of the setup. See more information about Pipfile format here. Most of the time, Pipfile.lock should be ignored (ie, not tracked in your git) for packages published on Pypi.
pipenv is a great tool to maintain Pipfile, but developers might be stuck with backward compatibility issues for tools and services that still use requirements.txt and does not know how to handle Pipfile or Pipfile.lock yet.
For examples:
pip install (if you install a package with pip that does not have a requirements.txt, its dependencies won’t be installed, even if you use Pipfile)
Usage
Just before building source/binary/wheel package of your python module, only of the following commands:
To generate requirements files (ie, dependencies are described eventually by range):
pipenv run pipenv_to_requirements
To generate frozen requirements (ie, all dependencies have their version frozen):
pipenv run pipenv_to_requirements -f
It will generate requirements.txt and, if applicable, requirements-dev.txt, in the current directory.
ReadTheDocs
Simply commit these files in your tree so that readthedocs, and ensure they are synchronized each time you change your Pipfile. Do not forget to ask ReadTheDocs to use requirements-dev.txt when building the documentation.
Contributing
Create your development environment with
$ make dev
Execute unit tests:
$ make test
Code formatter:
$ make style
Code Style Checks:
$ make check
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pipenv-to-requirements-0.2.1.tar.gz
.
File metadata
- Download URL: pipenv-to-requirements-0.2.1.tar.gz
- Upload date:
- Size: 15.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1dff7ecf54223524eaffc2176fecf01107196b5dd216ee38d2d9f20fdc604319 |
|
MD5 | e50a778bd5d7556765fcfc1d9d239024 |
|
BLAKE2b-256 | 1a51ce8ae425c76c568c618ef4be7bcc15980d21e3b068c6456f15795225aeae |
File details
Details for the file pipenv_to_requirements-0.2.1-py2.py3-none-any.whl
.
File metadata
- Download URL: pipenv_to_requirements-0.2.1-py2.py3-none-any.whl
- Upload date:
- Size: 10.5 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1cd02a0c69dd967fa7be9f769e9e6fe639c18587f8bdf198d4fc08a074c8d48 |
|
MD5 | 864c1e73ec715021e2de04d6841481a2 |
|
BLAKE2b-256 | 37720a95625d2ccc48f8ef1df5927ee44cac3a25447d3eefb74329d4c93d3bf1 |