Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mbachry/setup-requirements

Add requirements.txt automatically to wheel dependencies
https://github.com/mbachry/setup-requirements

packaging python setuptools wheels

Last synced: 18 days ago
JSON representation

Add requirements.txt automatically to wheel dependencies

Awesome Lists containing this project

README

        

setup-requirements
==================

.. image:: https://github.com/mbachry/setup-requirements/actions/workflows/ci.yaml/badge.svg?branch=master
:alt: Build status
:target: https://github.com/mbachry/setup-requirements/actions

A PEP 517 build backend that automatically adds ``requirements.txt``
contents to wheel dependencies.

Usage
-----

Use ``setup_requirements`` as your build backend in ``pyproject.toml``::

[build-system]
requires = ['setuptools>=42', 'wheel', 'setup-requirements']
build-backend = 'setup_requirements'

Notes
-----

This backend should be used if you want to build an **application**
with pinned dependencies. For libraries use standard
``install_requires`` without pins.

The backend exists only because it's not possible to use ``file:`` in
``install_requires`` (yet?). See this `github issue`_.

.. _github issue: https://github.com/pypa/setuptools/issues/1951

Limitations
-----------

It's not possible to use a different path than a top-level
``requirements.txt`` file.