Skip to content

Commit 94a9e05

Browse files
committed
Updating toolkit setup.py
1 parent 1b6a83d commit 94a9e05

1 file changed

Lines changed: 11 additions & 14 deletions

File tree

epanet_python/toolkit/setup.py

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,36 +8,33 @@
88
#
99
# Requires:
1010
# Platform C language compiler
11-
# SWIG
1211
#
1312

14-
try:
15-
from setuptools import setup, Extension
16-
from setuptools.command.build_ext import build_ext
17-
except ImportError:
18-
from distutils.core import setup, Extension
19-
from distutils.command.build_ext import build_ext
2013

14+
from setuptools import setup, Extension
15+
from setuptools.command.build_ext import build_ext
2116

22-
microlib_name = 'epanet.toolkit'
2317

2418
setup(
25-
name = microlib_name,
19+
name = 'epanet.toolkit',
2620
version = "0.0.3a0",
2721
ext_modules = [
2822
Extension("epanet.toolkit._toolkit",
29-
sources = ['epanet/toolkit/toolkit.i'],
30-
swig_opts = ['-py3'],
23+
sources = ['epanet/toolkit/toolkit_wrap.c'],
3124
include_dirs = ['epanet/toolkit'],
3225
library_dirs = ['epanet/toolkit'],
3326
libraries = ['epanet_py'],
3427
language = 'C'
3528
)
3629
],
30+
31+
# tox can't find epanet module at test time unless namespace is declared
3732
namespace_packages = ['epanet'],
38-
packages = {microlib_name},
33+
34+
packages = {'epanet.toolkit'},
3935
py_modules = ['toolkit'],
40-
# include_package_data=True
41-
package_data = {microlib_name:['*epanet_py.dll', '*epanet_py.so']},
36+
package_data = {'epanet.toolkit':['*epanet_py.dll', '*epanet_py.so']},
37+
38+
zip_safe=False
4239

4340
)

0 commit comments

Comments
 (0)