Skip to content

Setup

Setuptools-pipfile is not your regular package. It is used by your package build system.

Setup Configuration

Build System Configuration

There are three ways to configure your build system to use setuptools-pipfile.

[build-system]
requires = ["setuptools", "wheel", "setuptools-pipfile"]
build-backend = "setuptools.build_meta"
[options]
setup_requires =
    setuptools-pipfile
import setuptools
setuptools.setup(setup_requires='setuptools-pipfile')

The use of a pyproject.toml file is the preferred method as it is future of python packaging.

For more information refer to PEP517.

Enable Basic Usage

Setuptools-pipfile must be enabled for it to take effect.

Enable default behaviour

This is enough to enable default functionality.

[tool.setuptools-pipfile]

Add use_pipfile=True in your setup.py.

import setuptools
setuptools.setup(use_pipfile=True)

This assumes that the Pipfile is in the same file directory as setup.py.

If the Pipfile is located elsewhere you can instead set a relative path.

Relocate Pipfile

[tool]
setuptools-pipfile = "src/Pipfile"
import setuptools
setuptools.setup(use_pipfile='src/Pipfile')

Anything beyond this is considered Advanced Usage.