Skip to content

Commit 9604c22

Browse files
committed
Switching from epanet2.dll to epanet_py.dll
1 parent 057fd90 commit 9604c22

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

before_build.bat

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,18 @@ set OUTPUT_PATH=\epanet_python\output\epanet\output
1515

1616
mkdir buildlib
1717
cd buildlib
18-
git clone --branch=dev-swig-redux https://github.com/michaeltryby/EPANET.git
18+
git clone --branch=dev https://github.com/michaeltryby/EPANET.git
1919
cd epanet
2020

2121

2222
mkdir buildprod
2323
cd buildprod
24-
cmake -G"Visual Studio 14 2015 Win64" -DBUILD_TESTS=0 ..
24+
cmake -G"Visual Studio 14 2015 Win64" -DBUILD_PY_LIB=ON -DBUILD_TESTS=OFF ..
2525
cmake --build . --config Release
2626

2727

28-
copy /Y .\bin\Release\epanet2.dll %PROJECT_PATH%\%TOOLKIT_PATH%
29-
copy /Y .\lib\Release\epanet2.lib %PROJECT_PATH%\%TOOLKIT_PATH%
28+
copy /Y .\bin\Release\epanet_py.dll %PROJECT_PATH%\%TOOLKIT_PATH%
29+
copy /Y .\lib\Release\epanet_py.lib %PROJECT_PATH%\%TOOLKIT_PATH%
3030
copy /Y ..\include\*.h %PROJECT_PATH%\%TOOLKIT_PATH%
3131

3232
copy /Y .\bin\Release\epanet-output.dll %PROJECT_PATH%\%OUTPUT_PATH%

epanet_python/toolkit/setup.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,21 @@
2323

2424
setup(
2525
name = microlib_name,
26-
version = "0.0.2a0",
26+
version = "0.0.3a0",
2727
ext_modules = [
2828
Extension("epanet.toolkit._toolkit",
2929
sources = ['epanet/toolkit/toolkit.i'],
3030
swig_opts = ['-py3'],
3131
include_dirs = ['epanet/toolkit'],
3232
library_dirs = ['epanet/toolkit'],
33-
libraries = ['epanet2'],
34-
extra_compile_args = ["/D WITH_GENX"],
33+
libraries = ['epanet_py'],
3534
language = 'C'
3635
)
3736
],
3837
namespace_packages = ['epanet'],
3938
packages = {microlib_name},
4039
py_modules = ['toolkit'],
4140
# include_package_data=True
42-
package_data = {microlib_name:['*epanet2.dll', '*epanet2.so']},
41+
package_data = {microlib_name:['*epanet_py.dll', '*epanet_py.so']},
4342

4443
)

0 commit comments

Comments
 (0)