diff --git a/CMakeLists.txt b/CMakeLists.txt index fd170f3c2..bb1c608f4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -60,7 +60,6 @@ if(NOT DEFINED PYTHONOCC_BUILD_TYPE) endif(NOT DEFINED PYTHONOCC_BUILD_TYPE) set(CMAKE_BUILD_TYPE ${PYTHONOCC_BUILD_TYPE} CACHE INTERNAL "Build type, immutable" FORCE) -message(STATUS " ${CMAKE_CXX_FLAGS}") set(BUILD_SHARED_LIBS ON) include_directories(${CMAKE_CURRENT_SOURCE_DIR}) @@ -120,7 +119,7 @@ message(STATUS "Python library release: ${Python3_LIBRARY_RELEASE}") ######## # SWIG # ######## -find_package(SWIG 3.0.11 REQUIRED) +find_package(SWIG 4.0.2 REQUIRED) include(${SWIG_USE_FILE}) set(SWIG_FILES_PATH src/SWIG_files/wrapper) set(CMAKE_SWIG_FLAGS ${CMAKE_SWIG_FLAGS} -fvirtual -py3) @@ -382,13 +381,6 @@ ${CMAKE_CURRENT_SOURCE_DIR}/src/Addons/Font3d.cpp swig_add_library(Addons LANGUAGE python SOURCES ${ADDONS_SOURCE_FILES} TYPE MODULE) swig_link_libraries(Addons ${OCE_MODEL_LIBRARIES} ${OCE_VISUALIZATION_LIBRARIES} Python3::Module) -#if (APPLE) -# set_target_properties(${SWIG_MODULE_Addons_REAL_NAME} PROPERTIES COMPILE_FLAGS ${PYTHON_CFLAGS}) -# set_target_properties(${SWIG_MODULE_Addons_REAL_NAME} PROPERTIES LINK_FLAGS ${PYTHON_LDFLAGS}) -# swig_link_libraries(Addons ${OPENGL_LIBRARIES}) -#else(APPLE) -# swig_link_libraries(Addons ${PYTHON_LIBRARIES}) -#endif(APPLE) ################ # Installation # diff --git a/ci/conda/build.sh b/ci/conda/build.sh index 85e90d80f..780b1b9ce 100644 --- a/ci/conda/build.sh +++ b/ci/conda/build.sh @@ -27,8 +27,8 @@ ninja ninja install # fix rpaths -if [ $(uname) == Darwin ]; then - for lib in $(ls $SP_DIR/OCC/_*.so); do - install_name_tool -rpath $PREFIX/lib @loader_path/../../../ $lib - done -fi +#if [ $(uname) == Darwin ]; then +# for lib in $(ls $SP_DIR/OCC/_*.so); do +# install_name_tool -rpath $PREFIX/lib @loader_path/../../../ $lib +# done +#fi diff --git a/ci/conda/meta.yaml b/ci/conda/meta.yaml index 0c56615c0..9889dc7e1 100644 --- a/ci/conda/meta.yaml +++ b/ci/conda/meta.yaml @@ -14,6 +14,7 @@ build: requirements: build: + - {{ compiler('c') }} - {{ compiler('cxx') }} - {{ cdt('libx11-devel') }} # [linux] - {{ cdt('xorg-x11-proto-devel') }} # [linux] @@ -21,7 +22,7 @@ requirements: - {{ cdt('libxi-devel') }} # [linux] - ninja - cmake - - swig >=3.0.11 + - swig >=4.0.2 host: - python {{ python }} @@ -38,6 +39,8 @@ test: imports: - OCC - OCC.Core.BRepPrimAPI + - OCC.Core.MeshDS + - OCC.Core.Tesselator requires: - pyqt >=5 - mypy diff --git a/conda-build.yml b/conda-build.yml index 3b49f413c..656131081 100644 --- a/conda-build.yml +++ b/conda-build.yml @@ -30,15 +30,15 @@ jobs: displayName: 'Install OpenGL headers' # macOS ownership workaround and fix osx sdk - - ${{ if contains(parameters.vmImage, 'macOS') }}: - - bash: | - sudo chown -R $USER $CONDA && \ - curl -o MacOSX10.9.sdk.tar.xz -L https://github.com/phracker/MacOSX-SDKs/releases/download/10.13/MacOSX10.9.sdk.tar.xz && \ - tar xf MacOSX10.9.sdk.tar.xz && \ - sudo mkdir -p /Applications/Xcode_12.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs && \ - sudo mv -v MacOSX10.9.sdk /Applications/Xcode_12.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ && \ - ls /Applications/Xcode_12.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ - displayName: 'MacOS ownership workaround and installation of MacOSX10.9 sdk' + # - ${{ if contains(parameters.vmImage, 'macOS') }}: + # - bash: | + # sudo chown -R $USER $CONDA && \ + # curl -o MacOSX10.9.sdk.tar.xz -L https://github.com/phracker/MacOSX-SDKs/releases/download/10.13/MacOSX10.9.sdk.tar.xz && \ + # tar xf MacOSX10.9.sdk.tar.xz && \ + # sudo mkdir -p /Applications/Xcode_12.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs && \ + # sudo mv -v MacOSX10.9.sdk /Applications/Xcode_12.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ && \ + # ls /Applications/Xcode_12.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/ + # displayName: 'MacOS ownership workaround and installation of MacOSX10.9 sdk' - bash: | conda config --set always_yes yes --set changeps1 no && \