mirror of
https://github.com/drewcassidy/quicktex.git
synced 2024-09-13 06:37:34 +00:00
Skip version number checking with debug builds
Because I found a way to build the extension module directly which helps speed up development immensely
This commit is contained in:
parent
468414f339
commit
c57106e3b2
@ -1,6 +1,7 @@
|
||||
try:
|
||||
from _quicktex import *
|
||||
from _quicktex import __version__
|
||||
from _quicktex import _debug_build
|
||||
except ImportError as e:
|
||||
if 'libomp.dylib' in e.msg:
|
||||
print('\033[41m\033[01mERROR: LIBOMP NOT FOUND! PLEASE INSTALL IT WITH \033[04m`brew install libomp`\033[0m')
|
||||
|
@ -48,6 +48,12 @@ PYBIND11_MODULE(_quicktex, m) {
|
||||
m.attr("__version__") = "dev";
|
||||
#endif
|
||||
|
||||
#ifdef NDEBUG
|
||||
m.attr("_debug_build") = false;
|
||||
#else
|
||||
m.attr("_debug_build") = true;
|
||||
#endif
|
||||
|
||||
py::options options;
|
||||
|
||||
// Texture
|
||||
|
@ -1,9 +1,11 @@
|
||||
"""Test if everything is installed correctly"""
|
||||
import pytest
|
||||
|
||||
import quicktex
|
||||
|
||||
|
||||
class TestInstall:
|
||||
@pytest.mark.skipif(quicktex._debug_build, reason="Debug builds dont have valid version strings")
|
||||
def test_version(self):
|
||||
"""Test if the extension module version matches what setuptools returns"""
|
||||
try:
|
||||
@ -16,4 +18,4 @@ class TestInstall:
|
||||
|
||||
version = metadata.version('quicktex')
|
||||
|
||||
assert version == quicktex.__version__, 'incorrect version string from extension module'
|
||||
assert version == quicktex.__version__
|
||||
|
Loading…
Reference in New Issue
Block a user