diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2020-09-23 17:14:32 -0400 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2020-09-23 17:14:32 -0400 |
| commit | 412d2e17aebedfdff443dafa0d3584dd22e0b9ee (patch) | |
| tree | 710f25d25eb833a3adac21a6668ddd33ab40f617 /docs/userguide | |
| parent | 0342c9fdb594a0ea9f150b0b6cae43f4608a099b (diff) | |
| parent | d6bcf5e89ef6a523c2476b249aba810af9808d8b (diff) | |
| download | python-setuptools-git-412d2e17aebedfdff443dafa0d3584dd22e0b9ee.tar.gz | |
Merge commit 'd6bcf5e' into feature/2093-docs-revamp
Diffstat (limited to 'docs/userguide')
| -rw-r--r-- | docs/userguide/declarative_config.txt | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/docs/userguide/declarative_config.txt b/docs/userguide/declarative_config.txt index b40d3a4a..2aa1c717 100644 --- a/docs/userguide/declarative_config.txt +++ b/docs/userguide/declarative_config.txt @@ -92,7 +92,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. @@ -146,6 +146,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 @@ -237,4 +243,4 @@ data_files dict 40.6.0 Notes: 1. In the `package_data` section, a key named with a single asterisk (`*`) -refers to all packages, in lieu of the empty string used in `setup.py`.
\ No newline at end of file +refers to all packages, in lieu of the empty string used in `setup.py`. |
