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: owa-epanet/README.md
+8-1Lines changed: 8 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,10 +4,17 @@ A slender, auto-generated python wrapper around owa:epanet hydraulic network ana
4
4
5
5
Where possible, SWIG has been configured to throw warnings/exceptions instead of using the customary EPANET return integer value for success-checking. Also any output (pointer) parameters from the C API have been re-routed to return values. In these cases, the return tuple from the Python API will contain the values desired.
6
6
7
-
```
8
7
8
+
## Building the libraries
9
+
10
+
Ensure the EPANET subproject is populated by running `git submodule update --init` (if necessary) and running the following commands (on Windows skip the line `./script/clean.sh`). The following method uses `scikit-build` to invoke `cmake` for compiling and linking the shared libaries, and builds a python wheel.
11
+
12
+
```
9
13
./scripts/clean.sh
10
14
python3 setup.py sdist bdist_wheel
15
+
```
16
+
Test your builds using the following commands.
17
+
```
11
18
cd test && pipenv install ../dist/*.whl && pipenv run python -c 'from epanet import toolkit; print(toolkit.__dict__)'
rem If 32-bit toolkit is required ensure 32-bit python is located
15
+
rem by cmake (check CmakeList.txt) and replace '%CMAKE_PATH% ../ -A x64'
16
+
rem with '%CMAKE_PATH% ../ -A Win32'."
17
+
%CMAKE_PATH% ../../../ -A x64
18
+
%CMAKE_PATH% --build . --config Release
19
+
20
+
rem 'After successful compilation "toolkit.py", "_toolkit.pyd", "epanet2.dll" will be created. You can start using the toolkit by importing the module "toolkit.py".
0 commit comments