-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathMSPython.mke
More file actions
92 lines (75 loc) · 3.42 KB
/
MSPython.mke
File metadata and controls
92 lines (75 loc) · 3.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#---------------------------------------------------------------------------------------------
# Copyright (c) Bentley Systems, Incorporated. All rights reserved.
# See LICENSE.md in the repository root for full copyright notice.
#---------------------------------------------------------------------------------------------
#
# To successfully run this make file you will need to have python installed and pytest (pip install pytest)
# In the case where you will need to debug python tests pytest-env (pip install pytest-env) and modify the pytest.ini file with the location of the ..../PlatformTests/data directory
#
# In order to get the build of the python SDK working some environment variables need to be set prior to calling bmake on this file these are:
#
# set BMAKE_OPT= -I<location of MSPython\build\PublicSDK> -I<location of Microstation SDK include directory>
# set BB_DEFAULT_TOOLSET=VS2019
# set SrcRoot=<location of MSPython source code>
# set OutRoot=<location of build artifacts>
# set PythonDir=<location of python installation>
# set BoostInclude=<location of boost headers>
#
# i.e.
#
# set BMAKE_OPT= -IC:\src\ADOPython\MSPython\build\PublicSDK\ -IC:\DevTools\MicroStationCONNECTSDK\include\
# set BB_DEFAULT_TOOLSET=VS2019
# set SrcRoot=C:\src\ADOPython\
# set OutRoot=C:\Temp\Python\
# set PythonDir=C:\DevTools\Python\Python312\
TARGET_PROCESSOR_ARCHITECTURE=x64
%include PlatformSetup.mki
%include createdir.mki
%include common.mki
always:
$(MakeProgram) $(_MakeFilePath)\build\PublicSDK\BootstrapToolSet.mke
always:
!~@mkdir $(OutputRootDir)
!~@mkdir $(OutBuildDir)
!~@mkdir $(OutPythonDir)
ContextSubPartsAssemblies=$(BuildContext)SubParts/Assemblies/
%if !defined (SDKLIB) && defined (mdltools) ## for MdlExample-MSPython build
SDKLIB = $(mdltools)library/
%endif
%if !defined (SDKBIN) && defined (mdltools) ## for MdlExample-MSPython build
SDKBIN = $(mdltools)bin/
%endif
%if !defined (SDKINC) && defined (mdltools) ## for MdlExample-MSPython build
SDKINC = $(mdltools)include/
%endif
# copy libs from Microstation sdk dir to build output
always:
!~linkmultifiles "$(ContextSubPartsLibs)=$(SDKLIB)*.*"
!~linkmultifiles "$(ContextSubPartsAssemblies)=$(SDKBIN)*.*"
#
#
# Build code pybind11 libraries
#
#
always:
$(MakeProgram) $(_MakeFilePath)MSPythonCore.mke
$(MakeProgram) $(_MakeFilePath)MSPythonWrapper\PyBentley\PyBentley.mke
$(MakeProgram) $(_MakeFilePath)MSPythonWrapper\PyBentleyGeom\PyBentleyGeom.mke
$(MakeProgram) $(_MakeFilePath)MSPythonWrapper\PyDgnPlatform\PyDgnPlatform.mke
$(MakeProgram) $(_MakeFilePath)MSPythonWrapper\PyDgnView\PyDgnView.mke
$(MakeProgram) $(_MakeFilePath)MSPythonWrapper\PyECObjects\PyECObjects.mke
$(MakeProgram) $(_MakeFilePath)MSPythonWrapper\PyMstnPlatform\PyMstnPlatform.mke
# delete the MSPythonCore.lib which got symlinked into SDKLIB for .pyd build
%if ! defined (BSI)
%if exists ($(SDKLIB)MSPythonCore.lib)
always:
-@$(deleteCmd) "$(SDKLIB)MSPythonCore.lib"
%endif
%endif
#==================================================================================
# Disable running the tests, particularly for SDK as only examples are build and
# variables "MSPythonDir" and "PATH" defined in PlatformTests.mke does not match for SDK,
# enable this once the issue is fixed.
#==================================================================================
#always:
# $(MakeProgram) $(_MakeFilePath)MSPythonTests\PlatformTests\PlatformTests.mke