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, execute:
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.
Contributing
Create your development environment with
$ make dev
Execute unit tests:
$ make test
Build source, binary and wheels packages:
$ make dist
Code Style Checks:
$ make check
Code formatter:
$ make style
Create a release:
make requirements git tag 1.2.3 make push
On successful Travis build on a Tag, your Pypi package will be updated automatically.
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.1.6.tar.gz
.
File metadata
- Download URL: pipenv-to-requirements-0.1.6.tar.gz
- Upload date:
- Size: 15.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b75fd19392047bafcd04769277ad27788b27a30090d60726c04d6214b8bf2ee9 |
|
MD5 | 70aad0685a8af4e23104bd5e29a42596 |
|
BLAKE2b-256 | 662ffdc428697ef34ed86b05b152f745b3fc4b7621ff0569955f75186cd4957e |
File details
Details for the file pipenv_to_requirements-0.1.6-py2.py3-none-any.whl
.
File metadata
- Download URL: pipenv_to_requirements-0.1.6-py2.py3-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c57197727b497c342b40282f861841ae6ed0f50dab2d3f83f9cfc87b185d4d8c |
|
MD5 | 726e5535e121c966c984a5f63415627f |
|
BLAKE2b-256 | f21e8b3de7722af74fbf4b3db52489e6c7b8af029611f82712498e7493d71481 |