@@ -96,7 +96,7 @@ Using at build time
96
96
This is the way to go if you want to use version-query only as a dependency when building
97
97
the package, in such case it's not necessary to to add it to runtime dependencies.
98
98
99
- There are many build systems avialable for Python, and version-query may not be compatible
99
+ There are many build systems available for Python, and version-query may not be compatible
100
100
with all of them. Below are some examples.
101
101
102
102
setuptools with ``setup.py `` script
@@ -108,9 +108,11 @@ In such setup, you just need to add the following to your ``setup.py`` file:
108
108
109
109
.. code :: python
110
110
111
+ import setuptools
111
112
from version_query import predict_version_str
112
113
113
- setup(
114
+
115
+ setuptools.setup(
114
116
... ,
115
117
version = predict_version_str()
116
118
)
@@ -121,9 +123,12 @@ you may instead reuse the same constant in your ``setup.py`` file:
121
123
122
124
.. code :: python
123
125
126
+ import setuptools
127
+
124
128
from my_package import VERSION
125
129
126
- setup(
130
+
131
+ setuptools.setup(
127
132
... ,
128
133
version = VERSION
129
134
)
@@ -133,10 +138,10 @@ dynamic version attribute in ``pyproject.toml``
133
138
134
139
A more modern approach in Python is to use ``pyproject.toml `` for building packages.
135
140
136
- Some build systems that use ``pyproject.toml `` allow setting the version dynamically
141
+ Some build systems that use ``pyproject.toml `` support setting the version dynamically
137
142
by allowing users to point to an attribute of some module in order to get the version.
138
143
139
- One of such packages is setuptools. When using it, one can use the following:
144
+ One of such packages is setuptools. When using it, one can do the following:
140
145
141
146
.. code :: toml
142
147
0 commit comments