|
1 | 1 | # swmm-python |
2 | 2 |
|
3 | | -## Build Notes |
4 | 3 |
|
5 | | -Hints for building SWIG wrapper for SWMM Toolkit on Windows. This package |
6 | | -is currently under active development. The build process is likely to change. |
| 4 | +## Build Status |
| 5 | +[](https://ci.appveyor.com/project/michaeltryby/swmm-python/branch/dev) |
7 | 6 |
|
| 7 | +[](https://coveralls.io/github/michaeltryby/swmm-python) |
8 | 8 |
|
9 | | -### Dependencies |
10 | | -- Python 3.6.5 64 bit |
11 | | -- Visual Studio 14 2015 |
12 | | -- CMake |
13 | | -- SWIG |
14 | 9 |
|
| 10 | +## Contents |
| 11 | +* swmm-python - SWIG based wrappers for the SWMM Toolkit and Output libraries. |
| 12 | +* ... |
15 | 13 |
|
16 | | -### Build Process |
17 | | -The idea here is to build the SWMM library seperately and link it with the SWIG |
18 | | -wrapper. This approach uses implicit linking, therefore, an import library |
19 | | -must be created. CMake does this automatically using the Generate Export Header |
20 | | -function. Once built the SWMM library and headers are manually copied to the |
21 | | -swmm-toolkit directory. To run, the resulting swmm-toolkit.pyd needs the |
22 | | -swmm5.dll. |
23 | 14 |
|
24 | | - |
25 | | -Step 1 - Build SWMM Library |
26 | | - |
27 | | -Checkout the feature-reentrancy branch of the OWA SWMM project. Build the SWMM |
28 | | -Library using CMake generator "Visual Studio 14 2015 Win64". Be sure "generate |
29 | | -export header" section of the SWMM Project CMakeLists.txt is not commented out. |
30 | | - |
31 | | - |
32 | | -Step 2 - Copy SWMM Library |
33 | | - |
34 | | -In the swmm\toolkit directory copy swmm5.h, swmm5_export.h, toolkitAPI.h, |
35 | | -swmm5.dll, swmm5.lib, and swmm5.exp all together in the same folder. The |
36 | | -setup.py file is configured to find them there. |
37 | | - |
38 | | - |
39 | | -Step 3 - Build SWMM Toolkit |
40 | | - |
41 | | -Execute the command `python setup.py build` |
42 | | - |
43 | | - |
44 | | -Step 4 - Running SWMM Toolkit |
45 | | - |
46 | | -Install the pyd and the dll in the same directory and add the directory to |
47 | | -the python path. |
48 | | - |
49 | | - |
50 | | -#### Common Problems |
51 | | -When I used the Developer Command Prompt for Visual Studio 2015 the build |
52 | | -fails with linking errors. Use a regular Command Prompt to build. |
| 15 | +## Build Notes |
| 16 | +Note that swmm-python wraps the feature-wrapper branch of SWMM v5.1.12. |
0 commit comments