Skip to content

Commit

Permalink
Make sure the version from pyproject.toml is reported on --version ca…
Browse files Browse the repository at this point in the history
…lls.
  • Loading branch information
mihxil committed Nov 8, 2023
1 parent ee01e72 commit 7b67a9c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 6 additions & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,19 @@ It may also be a good idea to set up a virtual environment instead, to avoid ver

E.g. like so:

[source]
[source, bash]
----
mihxil@baleno:~$ python3 -m venv ~/venvs/pyapi-env
mihxil@baleno:~$ source ~/venvs/pyapi-env/bin/activate
(pyapi-env) mihxil@baleno:~$ pip3 install --upgrade 'git+https://github.com/npo-poms/pyapi.git'
(pyapi-env) mihxil@baleno:~$ which npo_media_get
/Users/mihxil/venvs/pyapi-env/bin/npo_media_get
----

To run tests also its dependencies must be installed
[source, bash]
----
pip install -e .[testing]
----

=== Docker
Expand Down
4 changes: 3 additions & 1 deletion src/npoapi/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
__version__ = "7.6.0.dev"
from importlib.metadata import version

__version__ = version("npoapi")

# would this make pyxb work with python 3.10
import collections
Expand Down

0 comments on commit 7b67a9c

Please sign in to comment.