Skip to content

Commit 80cc375

Browse files
committed
chore: housekeeping
1 parent 278d655 commit 80cc375

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

README.rst

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ Using at build time
9696
This is the way to go if you want to use version-query only as a dependency when building
9797
the package, in such case it's not necessary to to add it to runtime dependencies.
9898

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
100100
with all of them. Below are some examples.
101101

102102
setuptools with ``setup.py`` script
@@ -108,9 +108,11 @@ In such setup, you just need to add the following to your ``setup.py`` file:
108108

109109
.. code:: python
110110
111+
import setuptools
111112
from version_query import predict_version_str
112113
113-
setup(
114+
115+
setuptools.setup(
114116
...,
115117
version=predict_version_str()
116118
)
@@ -121,9 +123,12 @@ you may instead reuse the same constant in your ``setup.py`` file:
121123

122124
.. code:: python
123125
126+
import setuptools
127+
124128
from my_package import VERSION
125129
126-
setup(
130+
131+
setuptools.setup(
127132
...,
128133
version=VERSION
129134
)
@@ -133,10 +138,10 @@ dynamic version attribute in ``pyproject.toml``
133138

134139
A more modern approach in Python is to use ``pyproject.toml`` for building packages.
135140

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
137142
by allowing users to point to an attribute of some module in order to get the version.
138143

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:
140145

141146
.. code:: toml
142147

0 commit comments

Comments
 (0)