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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 2 Python 3

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