Skip to content

Commit

Permalink
dont target stable abi
Browse files Browse the repository at this point in the history
  • Loading branch information
ncullen93 committed May 15, 2024
1 parent 8c7eb86 commit 6fe8ef7
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 17 deletions.
4 changes: 1 addition & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON)

# Try to import all Python components potentially needed by nanobind
find_package(Python 3.8
REQUIRED COMPONENTS Interpreter Development.Module
OPTIONAL_COMPONENTS Development.SABIModule)
REQUIRED COMPONENTS Interpreter Development.Module)

# Import nanobind through CMake's find_package mechanism
find_package(nanobind CONFIG REQUIRED)
Expand Down Expand Up @@ -43,7 +42,6 @@ target_link_libraries(imageMathUtilities ${ITK_LIBRARIES})

nanobind_add_module(
lib
STABLE_ABI
NB_STATIC
src/main.cpp
src/antscore/antsAffineInitializer.cxx
Expand Down
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,6 @@ build-verbosity = 1
test-command = "pytest {project}/tests"
test-requires = "pytest"

[tool.cibuildwheel.macos.environment]
MACOSX_DEPLOYMENT_TARGET = "10.14"

3 changes: 0 additions & 3 deletions src/itkPyBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@
#undef _XOPEN_SOURCE
// For Python 2.7 hypot bug, see https://bugs.python.org/issue11566
//#include "PatchedPython27pyconfig.h"
#if PYTHON_MINOR_VERSION == 12
#define PySequence_FAST_GET_ITEM PySequence_GetItem
#endif
#include <Python.h>

namespace itk
Expand Down
4 changes: 0 additions & 4 deletions src/itkPyBuffer.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@

#include "itkPyBuffer.h"

#if PYTHON_MINOR_VERSION == 12
#define PySequence_FAST_GET_ITEM PySequence_GetItem
#endif

namespace itk
{

Expand Down
3 changes: 0 additions & 3 deletions src/itkPyVnl.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@
#undef _POSIX_C_SOURCE
#undef _XOPEN_SOURCE
// For Python 2.7 hypot bug, see https://bugs.python.org/issue11566
#if PYTHON_MINOR_VERSION == 12
#define PySequence_FAST_GET_ITEM PySequence_GetItem
#endif
#include <Python.h>
//#include "PatchedPython27pyconfig.h"

Expand Down
4 changes: 0 additions & 4 deletions src/itkPyVnl.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,6 @@
#ifndef itkPyVnl_hxx
#define itkPyVnl_hxx

#if PYTHON_MINOR_VERSION == 12
#define PySequence_FAST_GET_ITEM PySequence_GetItem
#endif

#include "itkPyVnl.h"
#include <stdexcept>

Expand Down

0 comments on commit 6fe8ef7

Please sign in to comment.