Skip to content

Commit

Permalink
remove all PyOdb* python swig wrapper and django server related items
Browse files Browse the repository at this point in the history
  • Loading branch information
nam20485 committed Apr 20, 2024
1 parent 885f258 commit 74a7a34
Show file tree
Hide file tree
Showing 31 changed files with 8 additions and 721 deletions.
3 changes: 0 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ if (NOT DEFINED ENV{CI})
set(CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_EXE}")
endif()

# required for SWIG python wrapper
#set(CMAKE_POSITION_INDEPENDENT_CODE ON)

#
# GoogleTest support
#
Expand Down
96 changes: 7 additions & 89 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,33 +36,15 @@
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Debug"
}
},
{
"name": "python-x64-debug",
"displayName": "Python x64 Debug",
"inherits": "x64-debug",
"cacheVariables": {
"PYTHON_MODULE_BUILD": true,
"CMAKE_POSITION_INDENPENDENT_CODE": true
}
},
},
{
"name": "x64-release",
"displayName": "x64 Release",
"inherits": "x64-debug",
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
}
},
{
"name": "python-x64-release",
"displayName": "Python x64 Release",
"inherits": "x64-release",
"cacheVariables": {
"PYTHON_MODULE_BUILD": true,
"CMAKE_POSITION_INDENPENDENT_CODE": true
}
},
},
{
"name": "x86-debug",
"displayName": "x86 Debug",
Expand Down Expand Up @@ -123,23 +105,7 @@
"cacheVariables": {
"CMAKE_BUILD_TYPE": "Release"
}
},
{
"name": "python-linux-release",
"displayName": "Python Linux Release",
"inherits": "linux-release",
"cacheVariables": {
"PYTHON_MODULE_BUILD": true
}
},
{
"name": "python-linux-debug",
"displayName": "Python Linux Debug",
"inherits": "linux-debug",
"cacheVariables": {
"PYTHON_MODULE_BUILD": true
}
},
},
{
"name": "linux-mingw-w64-debug",
"displayName": "Linux MinGW-w64 Debug",
Expand Down Expand Up @@ -235,19 +201,7 @@
"displayName": "x86 Release",
"inherits": "windows-base",
"configurePreset": "x86-release"
},
{
"name": "python-x64-debug",
"displayName": "Python x64 Debug",
"inherits": "windows-base",
"configurePreset": "python-x64-debug"
},
{
"name": "python-x64-release",
"displayName": "Python x64 Release",
"inherits": "windows-base",
"configurePreset": "python-x64-release"
},
},
{
"name": "linux-base",
"hidden": true,
Expand All @@ -268,19 +222,7 @@
"displayName": "Linux Release",
"configurePreset": "linux-release",
"inherits": "linux-base"
},
{
"name": "python-linux-debug",
"displayName": "Python Linux Debug",
"configurePreset": "python-linux-debug",
"inherits": "linux-base"
},
{
"name": "python-linux-release",
"displayName": "Python Linux Release",
"configurePreset": "python-linux-release",
"inherits": "linux-base"
},
},
{
"name": "linux-mingw-w64-base",
"hidden": true,
Expand Down Expand Up @@ -357,19 +299,7 @@
"displayName": "Test x86-Release",
"inherits": "windows-base",
"configurePreset": "x86-release"
},
{
"name": "python-x64-debug",
"displayName": "Test Python x64 Debug",
"inherits": "windows-base",
"configurePreset": "python-x64-debug"
},
{
"name": "python-x64-release",
"displayName": "Test Python x64 Release",
"inherits": "windows-base",
"configurePreset": "python-x64-release"
},
},
{
"name": "linux-base",
"hidden": true,
Expand All @@ -390,19 +320,7 @@
"displayName": "Test Linux Release",
"configurePreset": "linux-release",
"inherits": "linux-base"
},
{
"name": "python-linux-debug",
"displayName": "Test Python Linux Debug",
"configurePreset": "python-linux-debug",
"inherits": "linux-base"
},
{
"name": "python-linux-release",
"displayName": "Test Python Linux Release",
"configurePreset": "python-linux-release",
"inherits": "linux-base"
},
},
{
"name": "linux-mingw-w64-base",
"hidden": true,
Expand Down
82 changes: 0 additions & 82 deletions Dockerfile (exe)

This file was deleted.

68 changes: 0 additions & 68 deletions Dockerfile_PyOdbDesignServer

This file was deleted.

36 changes: 0 additions & 36 deletions OdbDesignLib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,6 @@ target_compile_options(OdbDesign PUBLIC
$<$<CXX_COMPILER_ID:MSVC>:
/wd4250>)

## required for SWIG
#set_property(TARGET OdbDesign PROPERTY POSITION_INDEPENDENT_CODE ON)

target_link_libraries(OdbDesign PUBLIC Utils)

# state that anybody linking to us needs to include the current source dir, while we don't.
Expand Down Expand Up @@ -90,36 +87,3 @@ target_link_libraries(OdbDesign PUBLIC protobuf::libprotobuf)
# (see https://github.com/CrowCpp/Crow/issues/661#issuecomment-1702544225)
list(REMOVE_ITEM _CROW_ICD "_CROW_ICD-NOTFOUND")
set_target_properties(Crow::Crow PROPERTIES INTERFACE_COMPILE_DEFINITIONS "${_CROW_ICD}")

# Python extension module build settings
if (PYTHON_MODULE_BUILD)
# # run swig to generate wrapper file
# add_custom_command(TARGET OdbDesign
# PRE_BUILD
# COMMAND scripts/generate-python-module.ps1)

if (MSVC)
# make a copy of output library with name expected by Python module extensions
add_custom_command(TARGET OdbDesign
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy $<TARGET_FILE:OdbDesign> $<TARGET_FILE_DIR:OdbDesign>/_PyOdbDesignLib.pyd
COMMENT Copying to Python module extension
)
elseif(LINUX)
# make a copy of output library with name expected by Python module extensions
add_custom_command(TARGET OdbDesign
POST_BUILD
COMMAND ${CMAKE_COMMAND}
ARGS -E copy $<TARGET_FILE:OdbDesign> $<TARGET_FILE_DIR:OdbDesign>/_PyOdbDesignLib.so
COMMENT Copying to Python module extension
)
endif()

target_sources(OdbDesign PRIVATE "OdbDesignLib_wrap.cxx")

# include and link to Python3
find_package(Python3 COMPONENTS Development REQUIRED)
#target_include_directories(OdbDesign PRIVATE ${Python3_INCLUDE_DIRS})
target_link_libraries(OdbDesign PRIVATE Python3::Python)
endif()
Loading

0 comments on commit 74a7a34

Please sign in to comment.