Skip to main content

File support for setuptools declarative setup.cfg

Project description

Declarative setuptools Config Requirements Files Support

This projects adds the ability for projects using setuptools declarative configuration to specify requirements using requirements files.

There's a reason why this isn't, at least yet, supported by default. Please read why.

Anyway, if you know what you're doing, then this library solves the missing feature of defining requirements using requirements files.

setup.cfg

Your setup.cfg should include a section named requirements-files like:

[requirements-files]
setup_requires = requirements/setup.txt
install_requires = requirements/base.txt
tests_require = requirements/tests.txt
extras_require =
  docs = requirements/docs.txt
  cli = requirements/cli.txt

pyproject.toml

You pyproject.toml should also include setuptools-declarative-requirements:

[build-system]
requires = ["setuptools>=50.3.2", "wheel", "setuptools-declarative-requirements"]
build-backend = "setuptools.build_meta"

setup.py

Some projects still use a setup.py shim, similar to:

#!/usr/bin/env python
import setuptools

if __name__ == "__main__":
    setuptools.setup()

If this is your case your setup.cfg needs an extra bit of tweak. Make sure you have setuptools-declarative-requirements in your setup_requires:

[options]
setup_requires =
  setuptools>=50.3.2
  setuptools-declarative-requirements

Do Note That

⚠ This project makes no attempt to validate your requirements files.

The only thing it does is include every non empty line from your requirements files which does not start with #, -r or --.

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

setuptools-declarative-requirements-1.0.0.tar.gz (19.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file setuptools-declarative-requirements-1.0.0.tar.gz.

File metadata

  • Download URL: setuptools-declarative-requirements-1.0.0.tar.gz
  • Upload date:
  • Size: 19.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.7.7

File hashes

Hashes for setuptools-declarative-requirements-1.0.0.tar.gz
Algorithm Hash digest
SHA256 96417392275d62cb5551210aed91ec882a9a15f7c02b3753deab6c3b14c5f30f
MD5 18fa02011155733fb70f332a241129b7
BLAKE2b-256 966a6b939df52202f54aabcd9c7dde6bd87ce7ce213d8436c273cce91c3cf423

See more details on using hashes here.

File details

Details for the file setuptools_declarative_requirements-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: setuptools_declarative_requirements-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 14.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.7.7

File hashes

Hashes for setuptools_declarative_requirements-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5e2ffc06f51bc40edd078c13f0c33e23c49a4e7abfc538ae4296da65b3929086
MD5 5b93314cd2b9c7d4b5ae2a679e2815d2
BLAKE2b-256 db09d996ac4d8dbb7e2eead4b9e62ca660b53bbdc6e654be30461280c2de31a0

See more details on using hashes here.

Supported by

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