Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions swmm-toolkit/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[build-system]
requires = [
"wheel>=0.38.1",
"setuptools>=42",
"scikit-build>=0.13",
"cmake>=3.21",
"swig==4.0.2",
]
build-backend = "setuptools.build_meta"
30 changes: 23 additions & 7 deletions swmm-toolkit/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
import os
from skbuild import setup
from setuptools import Command

import sys

# Determine platform
platform_system = platform.system()
Expand Down Expand Up @@ -56,11 +56,28 @@ def run(self):
p.wait()


# Set up location of wheel libraries depending on build platform
if platform_system == "Windows":
package_dir = {"swmm_toolkit":"bin", "swmm.toolkit": "src/swmm/toolkit"}
# Set up location of wheel libraries depending on build platform and command
# commands that trigger cmake from skbuild.setuptools_wrap._should_run_cmake
commands_that_trigger_cmake = {
"build",
"build_ext",
"develop",
"install",
"install_lib",
"bdist",
"bdist_dumb",
"bdist_egg",
"bdist_rpm",
"bdist_wininst",
"bdist_wheel",
"test",
}
command = sys.argv[1] if len(sys.argv) > 1 else None
if command in commands_that_trigger_cmake:
swmm_toolkit_dir= "bin" if platform_system == "Windows" else "lib"
else:
package_dir = {"swmm_toolkit":"lib", "swmm.toolkit": "src/swmm/toolkit"}
swmm_toolkit_dir= "swmm-solver"
package_dir = {"swmm_toolkit" : swmm_toolkit_dir, "swmm.toolkit": "src/swmm/toolkit"}


if os.environ.get('SWMM_CMAKE_ARGS') is not None:
Expand Down Expand Up @@ -88,7 +105,6 @@ def exclude_files(cmake_manifest):
here = pathlib.Path(__file__).parent.resolve()
long_description = (here / 'README.md').read_text(encoding='utf-8')


setup(
name = "swmm-toolkit",
version = "0.14.2",
Expand Down Expand Up @@ -127,4 +143,4 @@ def exclude_files(cmake_manifest):
"Programming Language :: C",
"Development Status :: 5 - Production/Stable",
]
)
)
2 changes: 1 addition & 1 deletion swmm-toolkit/test-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@

pytest == 7.1.1
numpy == 1.21.6; python_version == "3.7"
numpy == 1.22.0; python_version >= "3.8"
numpy == 1.24.4; python_version >= "3.8"
aenum == 3.1.11