Browse Source

Merge branch 'Release_2.1' of ssh://gitea.pep.foundation:23065/pEp.foundation/pEpPythonAdapter into Release_2.1

PYADPT-116
Volker Birk 7 months ago
parent
commit
a35cea292e
4 changed files with 23 additions and 12 deletions
  1. +2
    -2
      build-windows/pEpPythonAdapter.vcxproj
  2. +16
    -4
      make.mak
  3. +3
    -4
      setup.py
  4. +2
    -2
      src/pEp/__init__.py

+ 2
- 2
build-windows/pEpPythonAdapter.vcxproj View File

@ -63,7 +63,7 @@
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<NMakeBuildCommandLine>nmake /F "$(ProjectDir)..\make.mak" all</NMakeBuildCommandLine>
<NMakeBuildCommandLine>nmake /F "$(ProjectDir)..\make.mak" debug</NMakeBuildCommandLine>
<NMakeOutput>
</NMakeOutput>
<NMakePreprocessorDefinitions>WIN32;_DEBUG;_DLL;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
@ -76,7 +76,7 @@
<NMakePreprocessorDefinitions>_DEBUG;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<NMakeBuildCommandLine>nmake /F "$(ProjectDir)..\make.mak" all</NMakeBuildCommandLine>
<NMakeBuildCommandLine>nmake /F "$(ProjectDir)..\make.mak" release</NMakeBuildCommandLine>
<NMakeOutput>
</NMakeOutput>
<NMakePreprocessorDefinitions>WIN32;NDEBUG;_DLL;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>


+ 16
- 4
make.mak View File

@ -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

+ 3
- 4
setup.py View File

@ -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)


+ 2
- 2
src/pEp/__init__.py View File

@ -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


Loading…
Cancel
Save