From 16edd93e4aff3757b06fbd26283b78d215ec91a2 Mon Sep 17 00:00:00 2001 From: David Gidwani Date: Sun, 10 Apr 2022 18:08:15 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20drop=20single-sourcing=20?= =?UTF-8?q?package=20version=20(#38)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pyproject.toml | 10 ++++++++-- src/hyperscan/__init__.py | 4 +--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 38a4723..c4d0e7e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,10 @@ skip-string-normalization = true [tool.commitizen] name = "cz_conventional_commits" version = "0.2.0" -version_files = ["pyproject.toml:version"] +version_files = [ + "pyproject.toml:version", + "src/hyperscan/__init__.py:__version__" +] [tool.poetry] build = "build.py" @@ -66,7 +69,10 @@ black = "^20.8b1" clang-format = "^9.0.0" [tool.semantic_release] -version_variable = ["pyproject.toml:version"] +version_variable = [ + "pyproject.toml:version", + "src/hyperscan/__init__.py:__version__" +] remove_dist = false upload_to_release = false upload_to_pypi = false diff --git a/src/hyperscan/__init__.py b/src/hyperscan/__init__.py index a4babbc..2720fac 100644 --- a/src/hyperscan/__init__.py +++ b/src/hyperscan/__init__.py @@ -1,10 +1,8 @@ import typing -import pkg_resources - from hyperscan._hyperscan import * -__version__ = pkg_resources.get_distribution('hyperscan').version +__version__ = "0.2.0" class ExpressionExt(typing.NamedTuple):