Skip to content

Commit

Permalink
Merge pull request #41 from anthrotype/add-uharfbuzz-version
Browse files Browse the repository at this point in the history
add uharfbuzz.__version__
  • Loading branch information
justvanrossum authored Apr 30, 2020
2 parents 8354edb + 81e52e0 commit 6ca5557
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,6 @@ htmlcov/
# Cython
src/uharfbuzz/*.c
src/uharfbuzz/*.html

# autogenerated version file
src/uharfbuzz/_version.py
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

setup_params = dict(
name="uharfbuzz",
use_scm_version=True,
use_scm_version={"write_to": "src/uharfbuzz/_version.py"},
description="Streamlined Cython bindings for the harfbuzz shaping engine",
long_description=long_description,
long_description_content_type='text/markdown',
Expand Down
5 changes: 5 additions & 0 deletions src/uharfbuzz/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,6 @@
try:
from ._version import version as __version__
except ImportError:
__version__ = "0.0.0+unknown"

from ._harfbuzz import *
6 changes: 6 additions & 0 deletions tests/test_uharfbuzz.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,3 +303,9 @@ def test_ot_layout_script_get_language_tags(self, blankfont):
def test_harfbuzz_version():
v = hb.version_string()
assert isinstance(v, str)


def test_uharfbuzz_version():
v = hb.__version__
assert isinstance(v, str)
assert "unknown" not in v

0 comments on commit 6ca5557

Please sign in to comment.