From 72aaa55ef50648385bf6498f1e247a6ff774e61a Mon Sep 17 00:00:00 2001 From: Thomas Date: Thu, 25 Mar 2021 14:08:25 +0100 Subject: [PATCH 1/2] Update Windows build --- build-windows/pEpPythonAdapter.vcxproj | 4 ++-- make.mak | 20 ++++++++++++++++---- setup.py | 7 +++---- 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/build-windows/pEpPythonAdapter.vcxproj b/build-windows/pEpPythonAdapter.vcxproj index 66ee151..cf75a0a 100644 --- a/build-windows/pEpPythonAdapter.vcxproj +++ b/build-windows/pEpPythonAdapter.vcxproj @@ -63,7 +63,7 @@ - nmake /F "$(ProjectDir)..\make.mak" all + nmake /F "$(ProjectDir)..\make.mak" debug WIN32;_DEBUG;_DLL;$(NMakePreprocessorDefinitions) @@ -76,7 +76,7 @@ _DEBUG;$(NMakePreprocessorDefinitions) - nmake /F "$(ProjectDir)..\make.mak" all + nmake /F "$(ProjectDir)..\make.mak" release WIN32;NDEBUG;_DLL;$(NMakePreprocessorDefinitions) diff --git a/make.mak b/make.mak index 9dfc3af..721704d 100644 --- a/make.mak +++ b/make.mak @@ -16,12 +16,24 @@ dist-egg: compile # build the module into build compile: CD.. - PY -3.8-32 setup.py build_ext + PY -3.8-32 setup.py build_ext --debug # delete output directories clean: - @if exist $(BUILD_DIR) rmdir /S /Q $(BUILD_DIR) - @if exist $(DIST_DIR) rmdir /S /Q $(DIST_DIR) + @if exist $(BUILD_DIR) rmdir /S /Q $(BUILD_DIR) + @if exist $(DIST_DIR) rmdir /S /Q $(DIST_DIR) # create directories and build application -all: clean dist +all: clean dist + +# release build +release: clean + CD.. + PY -3.8-32 setup.py build_ext + PY -3.8-32 setup.py bdist_wheel + +#debug build +debug: clean + CD.. + PY -3.8-32 setup.py build_ext --debug + PY -3.8-32 setup.py bdist_wheel diff --git a/setup.py b/setup.py index e1e8136..fb9889c 100755 --- a/setup.py +++ b/setup.py @@ -70,9 +70,8 @@ class BuildExtCommand(build_ext): sys_includes = [ join(inst_prefix), ] + [d[1] for d in self.windowsGetBoostDirs()] - sys_libdirs = [ - join(inst_prefix, 'Release') - ] + [d[0] for d in self.windowsGetBoostDirs()] + sys_libdirs = [ join(inst_prefix, 'Debug')] if self.debug else [ join(inst_prefix, 'Release')] + sys_libdirs += [d[0] for d in self.windowsGetBoostDirs()] libs = [ 'pEpEngine', 'libpEpAdapter', @@ -82,7 +81,7 @@ class BuildExtCommand(build_ext): compile_flags = ['/std:c++14', '/permissive'] if self.debug: pEpLog("debug mode") - compile_flags += ['/O0', '/g', '/UNDEBUG'] + compile_flags += ['/Od', '/Zi', '/DEBUG'] return (home, sys_includes, sys_libdirs, libs, compile_flags) From fc927ccaacf12ddc1f33fc4eb443a2744e37bd51 Mon Sep 17 00:00:00 2001 From: heck Date: Thu, 25 Mar 2021 18:29:02 +0100 Subject: [PATCH 2/2] FIX: thread.isAlive() replaced with thread.is_alive() (deprecated) --- src/pEp/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/pEp/__init__.py b/src/pEp/__init__.py index d634425..2c0bcf3 100755 --- a/src/pEp/__init__.py +++ b/src/pEp/__init__.py @@ -54,7 +54,7 @@ def shutdown_sync() -> None : def is_sync_active() -> bool: """True if sync is active, False otherwise""" - return Sync.getInstance().isAlive() + return Sync.getInstance().is_alive() def message_to_send(msg): @@ -123,7 +123,7 @@ class Sync(Thread): @staticmethod def shutdown_sync(): if Sync.__instance: - if Sync.__instance.isAlive(): + if Sync.__instance.is_alive(): pEp.inject_sync_shutdown() Sync.__instance.join() Sync.__instance = None