Skip to content

Commit

Permalink
Ensure fallback implementation is always, for-real, available.
Browse files Browse the repository at this point in the history
  • Loading branch information
TkTech committed Feb 4, 2024
1 parent 545bc1c commit 2c49da2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
13 changes: 8 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,21 @@
' available.'
)

macros = [
('SIMDJSON_IMPLEMENTATION_FALLBACK', "1"),
]
if os.getenv('BUILD_WITH_CYTHON') and CYTHON_AVAILABLE:
macros = []
compiler_directives = {
'embedsignature': True
}

if os.getenv('BUILD_FOR_DEBUG'):
# Enable line tracing, which also enables support for coverage
# reporting.
macros = [
('CYTHON_TRACE', 1),
('CYTHON_TRACE_NOGIL', 1)
]
macros.extend([
('CYTHON_TRACE', "1"),
('CYTHON_TRACE_NOGIL', "1")
])
compiler_directives['linetrace'] = True

force = bool(os.getenv('FORCE_REBUILD'))
Expand All @@ -67,6 +69,7 @@
'simdjson/util.cpp',
'simdjson/csimdjson.cpp'
],
define_macros=macros,
extra_compile_args=extra_compile_args,
language='c++'
)
Expand Down
6 changes: 6 additions & 0 deletions simdjson/csimdjson.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2c49da2

Please sign in to comment.