windmapper 2.0.0__tar.gz → 2.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {windmapper-2.0.0 → windmapper-2.1.0}/.gitignore +2 -1
- windmapper-2.1.0/CMakeLists.txt +48 -0
- {windmapper-2.0.0 → windmapper-2.1.0}/PKG-INFO +1 -1
- {windmapper-2.0.0 → windmapper-2.1.0}/pyproject.toml +1 -1
- {windmapper-2.0.0 → windmapper-2.1.0}/pysrc/windmapper.egg-info/PKG-INFO +1 -1
- {windmapper-2.0.0 → windmapper-2.1.0}/pysrc/windmapper.egg-info/SOURCES.txt +0 -1
- {windmapper-2.0.0 → windmapper-2.1.0}/pysrc/windmapper.egg-info/requires.txt +1 -1
- {windmapper-2.0.0 → windmapper-2.1.0}/setup.py +5 -12
- {windmapper-2.0.0 → windmapper-2.1.0}/windmapper.py +1 -1
- windmapper-2.0.0/CMakeLists.txt +0 -42
- windmapper-2.0.0/conanfile.py +0 -34
- {windmapper-2.0.0 → windmapper-2.1.0}/LICENSE +0 -0
- {windmapper-2.0.0 → windmapper-2.1.0}/MANIFEST.in +0 -0
- {windmapper-2.0.0 → windmapper-2.1.0}/README.md +0 -0
- {windmapper-2.0.0 → windmapper-2.1.0}/cfg/cli_massSolver.cfg +0 -0
- {windmapper-2.0.0 → windmapper-2.1.0}/pysrc/windmapper.egg-info/dependency_links.txt +0 -0
- {windmapper-2.0.0 → windmapper-2.1.0}/pysrc/windmapper.egg-info/top_level.txt +0 -0
- {windmapper-2.0.0 → windmapper-2.1.0}/pysrc/windmapper_utls/MPI_call_WN_1dir.py +0 -0
- {windmapper-2.0.0 → windmapper-2.1.0}/pysrc/windmapper_utls/__init__.py +0 -0
- {windmapper-2.0.0 → windmapper-2.1.0}/scripts/rio_merge.py +0 -0
- {windmapper-2.0.0 → windmapper-2.1.0}/setup.cfg +0 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
cmake_minimum_required(VERSION 3.16)
|
|
2
|
+
project(windmapper)
|
|
3
|
+
find_package(PythonExtensions REQUIRED)
|
|
4
|
+
file(
|
|
5
|
+
DOWNLOAD
|
|
6
|
+
https://github.com/cpm-cmake/CPM.cmake/releases/download/v0.38.3/CPM.cmake
|
|
7
|
+
${CMAKE_CURRENT_BINARY_DIR}/cmake/CPM.cmake
|
|
8
|
+
EXPECTED_HASH SHA256=cc155ce02e7945e7b8967ddfaff0b050e958a723ef7aad3766d368940cb15494
|
|
9
|
+
)
|
|
10
|
+
include(${CMAKE_CURRENT_BINARY_DIR}/cmake/CPM.cmake)
|
|
11
|
+
|
|
12
|
+
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
|
13
|
+
set(CONAN_LIB_STD "libstdc++11")
|
|
14
|
+
message(STATUS "Detected gnu compiler, setting compiler.libcxx=${CONAN_LIB_STD}")
|
|
15
|
+
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
|
|
16
|
+
set(CONAN_LIB_STD "libc++")
|
|
17
|
+
message(STATUS "Detected clang compiler, setting compiler.libcxx=${CONAN_LIB_STD}")
|
|
18
|
+
endif ()
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
CPMAddPackage(
|
|
23
|
+
NAME WindNinja
|
|
24
|
+
GITHUB_REPOSITORY Chrismarsh/windninja
|
|
25
|
+
GIT_TAG 3.9.3
|
|
26
|
+
OPTIONS
|
|
27
|
+
"NINJA_QTGUI FALSE"
|
|
28
|
+
"NINJAFOAM FALSE"
|
|
29
|
+
"OPENMP_SUPPORT FALSE"
|
|
30
|
+
"CMAKE_CXX_STANDARD 11"
|
|
31
|
+
)
|
|
32
|
+
|
|
33
|
+
file(COPY ${CMAKE_INSTALL_PREFIX}/lib/ DESTINATION ${PYTHON_PREFIX}/bin/lib/)
|
|
34
|
+
file(COPY ${CMAKE_INSTALL_PREFIX}/share/ DESTINATION ${PYTHON_PREFIX}/bin/share/)
|
|
35
|
+
file(COPY ${CMAKE_INSTALL_PREFIX}/bin/WindNinja_cli DESTINATION ${PYTHON_PREFIX}/bin/bin/)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
# This approach won't work for installing outside of cmake install root
|
|
39
|
+
# install( DIRECTORY ${CMAKE_INSTALL_PREFIX}/lib/
|
|
40
|
+
# DESTINATION ${PYTHON_PREFIX}/bin/lib/
|
|
41
|
+
# )
|
|
42
|
+
# install( DIRECTORY ${CMAKE_INSTALL_PREFIX}/share/
|
|
43
|
+
# DESTINATION ${PYTHON_PREFIX}/bin/share/
|
|
44
|
+
# )
|
|
45
|
+
# install( PROGRAMS ${CMAKE_INSTALL_PREFIX}/bin/WindNinja_cli
|
|
46
|
+
# DESTINATION ${PYTHON_PREFIX}/bin/bin/
|
|
47
|
+
# )
|
|
48
|
+
#
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
[build-system]
|
|
2
|
-
requires = ["setuptools", "wheel", "conan", "scikit-build>=0.11.1","ninja", "packaging"]
|
|
2
|
+
requires = ["setuptools", "wheel", "conan<2", "scikit-build>=0.11.1","ninja", "packaging"]
|
|
3
3
|
#conan has an older distro req than scikit-build, so specify conan first to get the correct version
|
|
4
4
|
# scikit version required for this https://github.com/scikit-build/scikit-build/issues/488
|
|
@@ -25,11 +25,11 @@ def strtobool(value):
|
|
|
25
25
|
except KeyError:
|
|
26
26
|
raise ValueError('"{}" is not a valid bool value'.format(value))
|
|
27
27
|
|
|
28
|
-
build_wn =
|
|
28
|
+
build_wn = True
|
|
29
29
|
try:
|
|
30
30
|
build_wn = strtobool(os.environ['BUILD_WINDNINJA'])
|
|
31
31
|
except:
|
|
32
|
-
build_wn =
|
|
32
|
+
build_wn = True
|
|
33
33
|
|
|
34
34
|
print(f'Build WindNinja? {build_wn}')
|
|
35
35
|
|
|
@@ -38,13 +38,7 @@ def get_installed_gdal_version():
|
|
|
38
38
|
version = subprocess.run(["gdal-config", "--version"], stdout=subprocess.PIPE).stdout.decode()
|
|
39
39
|
|
|
40
40
|
version = version.replace('\n', '')
|
|
41
|
-
|
|
42
|
-
# 3.3.2 is most recent as of this version
|
|
43
|
-
chm=''
|
|
44
|
-
if packaging.version.parse(version) > packaging.version.parse("3.5.1"):
|
|
45
|
-
chm='-chm'
|
|
46
|
-
|
|
47
|
-
version = chm + "=="+version+".*"
|
|
41
|
+
version = "=="+version+".*"
|
|
48
42
|
return version
|
|
49
43
|
except FileNotFoundError as e:
|
|
50
44
|
raise(""" ERROR: Could not find the system install of GDAL.
|
|
@@ -71,7 +65,7 @@ else:
|
|
|
71
65
|
from setuptools import setup
|
|
72
66
|
|
|
73
67
|
args = {'name': 'windmapper',
|
|
74
|
-
'version': '2.
|
|
68
|
+
'version': '2.1.0',
|
|
75
69
|
'description': 'Windfield library generation',
|
|
76
70
|
'long_description': "Generates windfields",
|
|
77
71
|
'author': 'Chris Marsh',
|
|
@@ -82,9 +76,8 @@ args = {'name': 'windmapper',
|
|
|
82
76
|
'package_dir': {
|
|
83
77
|
'': 'pysrc',
|
|
84
78
|
},
|
|
85
|
-
'cmake_args': ['-DCMAKE_BUILD_TYPE=Release'],
|
|
86
79
|
'scripts': ["windmapper.py", 'scripts/rio_merge.py', "cfg/cli_massSolver.cfg"],
|
|
87
|
-
'install_requires': ['
|
|
80
|
+
'install_requires': ['gdal[numpy]' + get_installed_gdal_version()+',>=3.5.0', # >= 3.5 required for this type of gdal python binding install
|
|
88
81
|
'numpy', 'scipy', 'elevation', 'pyproj', 'tqdm', 'rasterio', 'mpi4py'],
|
|
89
82
|
'setup_requires': setup_requires,
|
|
90
83
|
'python_requires': '>=3.6'}
|
|
@@ -32,6 +32,7 @@ from mpi4py import MPI
|
|
|
32
32
|
import windmapper_utls as wm
|
|
33
33
|
|
|
34
34
|
|
|
35
|
+
|
|
35
36
|
gdal.UseExceptions() # Enable exception support
|
|
36
37
|
ogr.UseExceptions() # Enable exception support
|
|
37
38
|
osr.UseExceptions() # Enable exception support
|
|
@@ -571,7 +572,6 @@ write_farsite_atm = false """
|
|
|
571
572
|
with open(f'pickled_param_args_{rank}.pickle', 'wb') as f:
|
|
572
573
|
cloudpickle.dump(rank_args, f)
|
|
573
574
|
|
|
574
|
-
MPI_exec_str = None
|
|
575
575
|
MPI_runWM_path = os.path.join(os.path.join(os.path.dirname(wm.__file__),
|
|
576
576
|
'MPI_call_WN_1dir.py'))
|
|
577
577
|
|
windmapper-2.0.0/CMakeLists.txt
DELETED
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
cmake_minimum_required(VERSION 3.16)
|
|
2
|
-
project(windmapper)
|
|
3
|
-
|
|
4
|
-
if(NOT EXISTS "${CMAKE_BINARY_DIR}/conan.cmake")
|
|
5
|
-
|
|
6
|
-
message(STATUS "Downloading conan.cmake from https://github.com/conan-io/cmake-conan")
|
|
7
|
-
file(DOWNLOAD "https://github.com/conan-io/cmake-conan/raw/v0.15/conan.cmake"
|
|
8
|
-
"${CMAKE_BINARY_DIR}/conan.cmake")
|
|
9
|
-
endif()
|
|
10
|
-
include(${CMAKE_BINARY_DIR}/conan.cmake)
|
|
11
|
-
|
|
12
|
-
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
|
13
|
-
set(CONAN_LIB_STD "libstdc++11")
|
|
14
|
-
message(STATUS "Detected gnu compiler, setting compiler.libcxx=${CONAN_LIB_STD}")
|
|
15
|
-
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "AppleClang")
|
|
16
|
-
set(CONAN_LIB_STD "libc++")
|
|
17
|
-
message(STATUS "Detected clang compiler, setting compiler.libcxx=${CONAN_LIB_STD}")
|
|
18
|
-
endif ()
|
|
19
|
-
|
|
20
|
-
conan_add_remote(NAME CHM
|
|
21
|
-
URL http://conan.snowcast.ca/artifactory/api/conan/chm
|
|
22
|
-
)
|
|
23
|
-
|
|
24
|
-
conan_cmake_run(CONANFILE conanfile.py
|
|
25
|
-
BASIC_SETUP
|
|
26
|
-
KEEP_RPATHS
|
|
27
|
-
SETTINGS compiler.cppstd=14
|
|
28
|
-
SETTINGS compiler.libcxx=${CONAN_LIB_STD}
|
|
29
|
-
INSTALL_FOLDER ${CMAKE_BINARY_DIR}
|
|
30
|
-
NO_OUTPUT_DIRS
|
|
31
|
-
BUILD missing
|
|
32
|
-
)
|
|
33
|
-
|
|
34
|
-
install( DIRECTORY ${CMAKE_BINARY_DIR}/lib/
|
|
35
|
-
DESTINATION ${CMAKE_INSTALL_PREFIX}/bin/lib/
|
|
36
|
-
)
|
|
37
|
-
install( DIRECTORY ${CMAKE_BINARY_DIR}/share/
|
|
38
|
-
DESTINATION ${CMAKE_INSTALL_PREFIX}/bin/share/
|
|
39
|
-
)
|
|
40
|
-
install( PROGRAMS ${CMAKE_BINARY_DIR}/bin/WindNinja_cli
|
|
41
|
-
DESTINATION ${CMAKE_INSTALL_PREFIX}/bin/bin/
|
|
42
|
-
)
|
windmapper-2.0.0/conanfile.py
DELETED
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
from conans import ConanFile, CMake, tools
|
|
2
|
-
import os
|
|
3
|
-
import glob
|
|
4
|
-
|
|
5
|
-
class WindNinjaConan(ConanFile):
|
|
6
|
-
settings = "os", "compiler", "build_type", "arch"
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
name = "windmapper"
|
|
10
|
-
version = "0.1"
|
|
11
|
-
|
|
12
|
-
generators = "cmake_find_package"
|
|
13
|
-
|
|
14
|
-
options = {"openmp":[True, False]}
|
|
15
|
-
|
|
16
|
-
default_options = {"openmp":False}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
def source(self):
|
|
20
|
-
pass
|
|
21
|
-
|
|
22
|
-
def requirements(self):
|
|
23
|
-
self.requires("windninja/3.8.0@CHM/stable" )
|
|
24
|
-
|
|
25
|
-
def deploy(self):
|
|
26
|
-
self.copy("*") # copy from current package
|
|
27
|
-
self.copy_deps("*.so*") # copy from dependencies
|
|
28
|
-
self.copy_deps("*.dylib*") # copy from dependencies
|
|
29
|
-
|
|
30
|
-
def imports(self):
|
|
31
|
-
self.copy("*.so*", "lib", "lib") # From bin to bin
|
|
32
|
-
self.copy("*.dylib*", "lib", "lib") # From lib to bin
|
|
33
|
-
self.copy('*','share','share')
|
|
34
|
-
self.copy("*", "bin", "bin") # From lib to bin
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|