/
pyproject.toml
66 lines (63 loc) · 3.2 KB
/
pyproject.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# --------------------( LICENSE )--------------------
# Copyright (c) 2014-2024 Beartype authors.
# See "LICENSE" for further details.
#
# --------------------( SYNOPSIS )--------------------
# Project-wide packager-agnostic configuration. Unlike all other top-level
# configuration files (e.g., "setup.py", "MANIFEST.in") specific to some
# utility in Python's package management ecosystem (e.g., "pip", "setuptools"),
# this file strictly conforms to a standards-compliant PEP and hence
# generically applies to *ALL* such utilities.
#
# Welcome to project distribution hell, where only twenty distinct files in
# twenty distinct formats suffice to distribute a single project.
#
# --------------------( MOTIVATION )--------------------
# This configuration is now required in various edge cases to avoid fatal errors
# under Python's modern build toolchain. Notably, "pip" now refuses to install
# this project under containerized environments (e.g., Docker, which the popular
# documentation host ReadTheDocs (RTD) leverages) with extremely verbose and
# thus mostly unreadable fatal errors resembling:
# Processing /home/docs/checkouts/readthedocs.org/user_builds/beartype/checkouts/latest
# Preparing metadata (setup.py): started
# Preparing metadata (setup.py): finished with status 'error'
# error: subprocess-exited-with-error
#
# × python setup.py egg_info did not run successfully.
# │ exit code: 1
# ╰─> [1 lines of output]
# ERROR: Can not execute `setup.py` since setuptools is not available in the build environment.
# [end of output]
#
# note: This error originates from a subprocess, and is likely not a problem with pip.
# error: metadata-generation-failed
#
# × Encountered error while generating package metadata.
# ╰─> See above for output.
#
# note: This is an issue with the package mentioned above, not pip.
# hint: See above for details.
#
# --------------------( SEE ALSO )--------------------
# * https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html
# Official "setuptools" documentation on integrating "setuptools" with PEP 621
# (i.e., this file).
# * https://snarky.ca/clarifying-pep-518
# "Clarifying PEP 518 (a.k.a. pyproject.toml)", a human-readable article from
# one of the principal authors of the "pyproject.toml" standard.
# ....................{ BUILDING }....................
[build-system]
# List of all Python packages required to build (i.e., install) this project
# from both codebase tarballs and binary wheels.
#
# Note that:
# * Setuptools 50.0 is fundamentally broken in numerous ways (including ways
# that both break and do not break installation of this project) and *MUST*
# thus be blacklisted. See also:
# https://github.com/pypa/setuptools/issues/2350
# https://github.com/pypa/setuptools/issues/2352
# https://github.com/pypa/setuptools/issues/2353
requires = ['setuptools !=50.0']
# Explicitly notify "pip" that we leverage the top-level "setuptools"-backed
# "setup.py" script as our installation infrastructure.
build-backend = 'setuptools.build_meta'