From 816cd1dace098eb645c7b54d9a6ea0199672d7f6 Mon Sep 17 00:00:00 2001 From: insolor Date: Tue, 19 Sep 2023 20:59:05 +0300 Subject: [PATCH] Compile in test mode only if TEST env variable set to true --- .github/workflows/tests.yml | 2 ++ setup.py | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 16180dc..93ae4db 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -35,6 +35,8 @@ jobs: python -m pip install --upgrade pip setuptools cython wheel pytest pytest-cov - name: "Build DAWG for ${{ matrix.python-version }}" + env: + TEST: true run: | python setup.py build_ext --inplace diff --git a/setup.py b/setup.py index 6cb77c8..f9dbe68 100755 --- a/setup.py +++ b/setup.py @@ -5,8 +5,7 @@ from Cython.Build import cythonize from setuptools import Extension, setup -os.environ["TEST"] = "TRUE" -TEST = bool(os.environ.get("TEST", False)) +TEST = os.environ.get("TEST", "false").casefold() == "true" compiler_directives = {"language_level": 3} define_macros = []