You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: toolkit/buildnotes.md
+6-12Lines changed: 6 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,34 +12,28 @@ is currently under active development. The build process is likely to change.
12
12
13
13
14
14
### Build Process
15
-
The idea here is to build the EPANET library seperately and link it with the SWIG wrapper. This approach uses implicit linking, therefore, an import library
16
-
must be created. CMake does this automatically using the Generate Export Header function. Once built the EPANET library and headers are manually copied to the
17
-
epanet-toolkit directory. To run, the resulting epanet-toolkit.pyd needs the epanet.dll.
15
+
The idea here is to build the EPANET library seperately and link it with the SWIG wrapper. This approach uses implicit linking, therefore, an import library must be created. CMake does this automatically using the Generate Export Header function. Once built the EPANET library and headers are manually copied to the epanet-toolkit directory. To run, the resulting epanet-toolkit.pyd needs the epanet.dll.
18
16
19
17
20
18
Step 1 - Build EPANET Library
21
19
22
-
Checkout the dev branch of the OWA EPANET project. Build the EPANET Library using CMake generator "Visual Studio 14 2015 Win64". Be sure "generate
23
-
export header" section of the EPANET Project CMakeLists.txt is not commented out.
20
+
Checkout the dev branch of the OWA EPANET project. Build the EPANET Library using CMake generator "Visual Studio 14 2015 Win64". Be sure "generate export header" section of the EPANET Project CMakeLists.txt is not commented out.
24
21
25
22
26
23
Step 2 - Copy EPANET Library
27
24
28
-
In the epanet\toolkit directory copy epanet.h, epanet_export.h, epanet.dll, and epanet.lib all together in the same folder. The
29
-
setup.py file is configured to find them there.
25
+
Checkout the dev branch of the OWA epanet-python project. In the epanet\toolkit directory copy epanet2.h, epanet_export.h, epanet.dll, and epanet.lib all together in the same folder. The setup.py file is configured to find them there.
30
26
31
27
32
28
Step 3 - Build EPANET Toolkit
33
29
34
-
Execute the command `python setup.py build`
30
+
Execute the command `python setup.py build`. The package in the build folder should contain epanet.dll, toolkit.py, toolkit.*.pyd, and __init__.py files. With the python setup working you can create a wheel or do a dev install using the pip -e flag.
35
31
36
32
37
33
Step 4 - Running EPANET Toolkit
38
34
39
-
Install the pyd and the dll in the same directory and add the directory to
40
-
the python path.
35
+
Install the .pyd and the .dll in the same directory and add the directory to the python path.
41
36
42
37
43
38
#### Common Problems
44
-
When I used the Developer Command Prompt for Visual Studio 2015 the build
45
-
fails with linking errors. Use a regular Command Prompt to build.
39
+
When I used the Developer Command Prompt for Visual Studio 2015 the build fails with linking errors. Use a regular Command Prompt to build.
0 commit comments