summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2020-05-16 22:19:56 -0400
committerGitHub <noreply@github.com>2020-05-16 22:19:56 -0400
commitc457e68319555b7266e5e0802946c5b1b63e4d61 (patch)
tree27c211a244ea9673de280d5fbb9017de9d81b61a /docs
parentf9364aaa8a4ba358f2f0f18e0d1b34d9a1468003 (diff)
parent39a37c0758f43b130e5163156facffbbe89cf9fa (diff)
downloadpython-setuptools-git-c457e68319555b7266e5e0802946c5b1b63e4d61.tar.gz
Merge pull request #1753 from jwodder/feature/literal_attr
Support attr directive with static evaluation
Diffstat (limited to 'docs')
-rw-r--r--docs/setuptools.txt8
1 files changed, 7 insertions, 1 deletions
diff --git a/docs/setuptools.txt b/docs/setuptools.txt
index ec58b754..c37b7ec5 100644
--- a/docs/setuptools.txt
+++ b/docs/setuptools.txt
@@ -2193,7 +2193,7 @@ Metadata and options are set in the config sections of the same name.
* In some cases, complex values can be provided in dedicated subsections for
clarity.
-* Some keys allow ``file:``, ``attr:``, and ``find:`` and ``find_namespace:`` directives in
+* Some keys allow ``file:``, ``attr:``, ``find:``, and ``find_namespace:`` directives in
order to cover common usecases.
* Unknown keys are ignored.
@@ -2290,6 +2290,12 @@ Special directives:
* ``attr:`` - Value is read from a module attribute. ``attr:`` supports
callables and iterables; unsupported types are cast using ``str()``.
+
+ In order to support the common case of a literal value assigned to a variable
+ in a module containing (directly or indirectly) third-party imports,
+ ``attr:`` first tries to read the value from the module by examining the
+ module's AST. If that fails, ``attr:`` falls back to importing the module.
+
* ``file:`` - Value is read from a list of files and then concatenated