We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 39fdb02 commit 62ad886Copy full SHA for 62ad886
1 file changed
source/guides/single-sourcing-package-version.rst
@@ -33,6 +33,21 @@ number of your project:
33
...
34
)
35
36
+ .. note::
37
+
38
+ As of the release of setuptools 46.4.0, one can accomplish the same
39
+ thing by instead placing the following in the project's ``setup.cfg``
40
+ file (replacing "package" with the import name of the package):
41
42
+ .. code-block:: ini
43
44
+ [metadata]
45
+ version = attr:package.__version__
46
47
+ Earlier versions of setuptools implemented the ``attr:`` directive by
48
+ importing the module, but setuptools 46.4.0 added rudimentary AST
49
+ analysis so that ``attr:`` can function without having to import any of
50
+ the package's dependencies.
51
52
#. Use an external build tool that either manages updating both locations, or
53
offers an API that both locations can use.
0 commit comments