Skip to content

Commit f5a606f

Browse files
committed
Updated Readme.md and library paths.
1 parent 7fa115b commit f5a606f

2 files changed

Lines changed: 15 additions & 6 deletions

File tree

owa-epanet/README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,17 @@ A slender, auto-generated python wrapper around owa:epanet hydraulic network ana
44

55
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.
66

7-
```
87

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+
```
913
./scripts/clean.sh
1014
python3 setup.py sdist bdist_wheel
15+
```
16+
Test your builds using the following commands.
17+
```
1118
cd test && pipenv install ../dist/*.whl && pipenv run python -c 'from epanet import toolkit; print(toolkit.__dict__)'
1219
1320
```

owa-epanet/build_owa-epanet.bat

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
cls
22

3+
rem Bulding the toolkit package for Windows. The preferred way to build the package is by running 'python setup.py sdist bdist_wheel'.
4+
35
git submodule update --init
46

5-
SET CMAKE_PATH=cmake.exe
7+
SET CMAKE_PATH=cmake.exe
68
SET Build_PATH=%CD%
7-
SET COMPILE_PATH=%Build_PATH%\build\
9+
SET COMPILE_PATH=%Build_PATH%\_cmake_build\windows\cmake-build
810

911
MKDIR "%COMPILE_PATH%"
1012
CD "%COMPILE_PATH%"
1113
rem Building 64-bit toolkit for 64-bit python.
12-
rem If 32-bit toolkit is required ensure 32-bit python is located
14+
rem If 32-bit toolkit is required ensure 32-bit python is located
1315
rem by cmake (check CmakeList.txt) and replace '%CMAKE_PATH% ../ -A x64'
1416
rem with '%CMAKE_PATH% ../ -A Win32'."
15-
%CMAKE_PATH% ../ -A x64
17+
%CMAKE_PATH% ../../../ -A x64
1618
%CMAKE_PATH% --build . --config Release
1719

1820
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".
1921

2022
cd ..
21-
pause
23+
pause

0 commit comments

Comments
 (0)