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:
|
try:
|
||||||
from _quicktex import *
|
from _quicktex import *
|
||||||
from _quicktex import __version__
|
from _quicktex import __version__
|
||||||
|
from _quicktex import _debug_build
|
||||||
except ImportError as e:
|
except ImportError as e:
|
||||||
if 'libomp.dylib' in e.msg:
|
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')
|
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";
|
m.attr("__version__") = "dev";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef NDEBUG
|
||||||
|
m.attr("_debug_build") = false;
|
||||||
|
#else
|
||||||
|
m.attr("_debug_build") = true;
|
||||||
|
#endif
|
||||||
|
|
||||||
py::options options;
|
py::options options;
|
||||||
|
|
||||||
// Texture
|
// Texture
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
"""Test if everything is installed correctly"""
|
"""Test if everything is installed correctly"""
|
||||||
|
import pytest
|
||||||
|
|
||||||
import quicktex
|
import quicktex
|
||||||
|
|
||||||
|
|
||||||
class TestInstall:
|
class TestInstall:
|
||||||
|
@pytest.mark.skipif(quicktex._debug_build, reason="Debug builds dont have valid version strings")
|
||||||
def test_version(self):
|
def test_version(self):
|
||||||
"""Test if the extension module version matches what setuptools returns"""
|
"""Test if the extension module version matches what setuptools returns"""
|
||||||
try:
|
try:
|
||||||
@ -16,4 +18,4 @@ class TestInstall:
|
|||||||
|
|
||||||
version = metadata.version('quicktex')
|
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