Skip to main content

Generate requirements[-dev].txt from Pipfile using pipenv

Project description

https://travis-ci.org/Stibbons/pipenv-to-requirements.svg?branch=master Pypi package MIT licensed

Generate requirements[-dev].txt from Pipfile (using pipenv)

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:

  • ReadTheDocs

  • Pyup

Usage

Just before building source/binary/wheel package of your python module, just execute:

To generated frozen dependencies:

pipenv run pipenv_to_requirements -f

For not frozen dependencies:

pipenv run pipenv_to_requirements

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 the Tag branch, your Pypi package will be updated automatically.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pipenv-to-requirements-0.1.1.tar.gz (14.7 kB view details)

Uploaded Source

Built Distribution

pipenv_to_requirements-0.1.1-py2.py3-none-any.whl (10.1 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file pipenv-to-requirements-0.1.1.tar.gz.

File metadata

File hashes

Hashes for pipenv-to-requirements-0.1.1.tar.gz
Algorithm Hash digest
SHA256 c48dc129f389e196bd7780c0417d27790946aedf0711437b7173ea7e7c1a4cdc
MD5 fab71b0ac1395686427a9601f2741325
BLAKE2b-256 68196545a42eb0ff8b3227f23d34a66634a7288771f971f6c20e9f296928d2d6

See more details on using hashes here.

File details

Details for the file pipenv_to_requirements-0.1.1-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for pipenv_to_requirements-0.1.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 67a9aeb5f5fd5c89a4a1d1277a0020b8c388d3ebbad1e31031af47844907af4b
MD5 128a2807dbba323ca5d738ea7d707a5b
BLAKE2b-256 754b56955c810793c2462c6b39cb15c623f0006c23c47cc65a43ebb6ae6eb7be

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page