Skip to content

Commit

Permalink
Merge pull request #572 from m-holger/const
Browse files Browse the repository at this point in the history
Add build option for qpdf CI
  • Loading branch information
jbarlow83 committed Mar 22, 2024
2 parents 3b7f614 + 824285c commit 5655ade
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion setup.py
Expand Up @@ -23,6 +23,7 @@
extra_library_dirs = []
qpdf_source_tree = environ.get('QPDF_SOURCE_TREE', '')
qpdf_build_libdir = environ.get('QPDF_BUILD_LIBDIR', '')
qpdf_future = environ.get('QPDF_FUTURE', '')

if qpdf_source_tree:
# Point this to qpdf source tree built with shared libraries
Expand Down Expand Up @@ -69,6 +70,9 @@
if extra_path and not exists(extra_path):
raise FileNotFoundError(extra_path)

macros = [('POINTERHOLDER_TRANSITION', '4')]
if qpdf_future:
macros.append(('QPDF_FUTURE', 'True'))
# Use cast because mypy has trouble seeing Pybind11Extension is a subclass of
# Extension.
extmodule: Extension = cast(
Expand All @@ -81,7 +85,7 @@
# Path to pybind11 headers
*extra_includes,
],
define_macros=[('POINTERHOLDER_TRANSITION', '4')],
define_macros=macros,
library_dirs=[*extra_library_dirs],
libraries=['qpdf'],
cxx_std=17,
Expand Down

0 comments on commit 5655ade

Please sign in to comment.