windmapper 2.0.1__tar.gz → 2.1.2__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.
@@ -10,4 +10,5 @@ docs/_build/
10
10
  build/
11
11
  MANIFEST
12
12
  dist/
13
- *.egg-info
13
+ *.egg-info
14
+ _skbuild/
@@ -0,0 +1,70 @@
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
+ # MACRO(SUBDIRLIST result curdir)
34
+ # FILE(GLOB children RELATIVE ${curdir} ${curdir}/*)
35
+ # SET(dirlist "")
36
+ # FOREACH(child ${children})
37
+ # IF(IS_DIRECTORY ${curdir}/${child})
38
+ # LIST(APPEND dirlist ${child})
39
+ # ENDIF()
40
+ # ENDFOREACH()
41
+ # SET(${result} ${dirlist})
42
+ # ENDMACRO()
43
+
44
+ # message(STATUS ${CMAKE_INSTALL_PREFIX})
45
+ # SUBDIRLIST(SUBDIRS ${CMAKE_INSTALL_PREFIX})
46
+ # FOREACH(subdir ${SUBDIRS})
47
+ # message(STATUS "hi -- ${subdir}")
48
+ # ENDFOREACH()
49
+
50
+ # message(STATUS ${PYTHON_PREFIX})
51
+ # SUBDIRLIST(SUBDIRS ${PYTHON_PREFIX})
52
+
53
+
54
+ # file(COPY ${WindNinja_BINARY_DIR}/lib/ DESTINATION ${PYTHON_PREFIX}/bin/lib/)
55
+ # file(COPY ${CMAKE_INSTALL_PREFIX}/share/ DESTINATION ${PYTHON_PREFIX}/bin/share/)
56
+ # file(COPY ${CMAKE_INSTALL_PREFIX}/bin/WindNinja_cli DESTINATION ${PYTHON_PREFIX}/bin/bin/)
57
+
58
+
59
+ # This approach won't work for installing outside of cmake install root
60
+
61
+
62
+ # DESTINATION ${PYTHON_PREFIX}/bin/lib/
63
+
64
+ # install( DIRECTORY ${CMAKE_INSTALL_PREFIX}/share/
65
+ # DESTINATION ${PYTHON_PREFIX}/bin/share/
66
+ # )
67
+ # install( PROGRAMS ${CMAKE_INSTALL_PREFIX}/bin/WindNinja_cli
68
+ # DESTINATION ${PYTHON_PREFIX}/bin/bin/
69
+ # )
70
+ #
@@ -1,12 +1,10 @@
1
- graft src
2
- graft tools
1
+ graft pysrc
2
+ graft scripts
3
3
 
4
4
  include .gitignore
5
5
  include CMakeLists.txt
6
- include CMakeLists_external.txt.in
7
6
  include LICENSE
8
7
  include README.md
9
- include conanfile.py
10
- include mesher.py
8
+ include windmapper.py
11
9
  include pyproject.toml
12
10
  include setup.py
@@ -0,0 +1,19 @@
1
+ Metadata-Version: 2.1
2
+ Name: windmapper
3
+ Version: 2.1.2
4
+ Summary: Windfield library generation
5
+ Home-page: https://github.com/Chrismarsh/Windmapper
6
+ Author: Chris Marsh
7
+ Author-email: chris.marsh@usask.ca
8
+ Requires-Python: >=3.6
9
+ License-File: LICENSE
10
+ Requires-Dist: gdal[numpy]==3.7.2.*,>=3.5.0
11
+ Requires-Dist: numpy
12
+ Requires-Dist: scipy
13
+ Requires-Dist: elevation
14
+ Requires-Dist: pyproj
15
+ Requires-Dist: tqdm
16
+ Requires-Dist: rasterio
17
+ Requires-Dist: mpi4py
18
+
19
+ Generates windfields
@@ -1,4 +1,4 @@
1
1
  [build-system]
2
- requires = ["setuptools", "wheel", "conan", "scikit-build>=0.11.1","ninja", "packaging"]
2
+ requires = ["setuptools", "build", "wheel", "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
@@ -0,0 +1,19 @@
1
+ Metadata-Version: 2.1
2
+ Name: windmapper
3
+ Version: 2.1.2
4
+ Summary: Windfield library generation
5
+ Home-page: https://github.com/Chrismarsh/Windmapper
6
+ Author: Chris Marsh
7
+ Author-email: chris.marsh@usask.ca
8
+ Requires-Python: >=3.6
9
+ License-File: LICENSE
10
+ Requires-Dist: gdal[numpy]==3.7.2.*,>=3.5.0
11
+ Requires-Dist: numpy
12
+ Requires-Dist: scipy
13
+ Requires-Dist: elevation
14
+ Requires-Dist: pyproj
15
+ Requires-Dist: tqdm
16
+ Requires-Dist: rasterio
17
+ Requires-Dist: mpi4py
18
+
19
+ Generates windfields
@@ -3,7 +3,6 @@ CMakeLists.txt
3
3
  LICENSE
4
4
  MANIFEST.in
5
5
  README.md
6
- conanfile.py
7
6
  pyproject.toml
8
7
  setup.py
9
8
  windmapper.py
@@ -1,4 +1,4 @@
1
- pygdal==3.0.4.*
1
+ gdal[numpy]==3.7.2.*,>=3.5.0
2
2
  numpy
3
3
  scipy
4
4
  elevation
@@ -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 = False
28
+ build_wn = True
29
29
  try:
30
30
  build_wn = strtobool(os.environ['BUILD_WINDNINJA'])
31
31
  except:
32
- build_wn = False
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
- #pygdal don'ts always have the most up todate version so we will need to swtich to pygdal-chm if it is not available
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.0.1',
68
+ 'version': '2.1.2',
75
69
  'description': 'Windfield library generation',
76
70
  'long_description': "Generates windfields",
77
71
  'author': 'Chris Marsh',
@@ -83,7 +77,7 @@ args = {'name': 'windmapper',
83
77
  '': 'pysrc',
84
78
  },
85
79
  'scripts': ["windmapper.py", 'scripts/rio_merge.py', "cfg/cli_massSolver.cfg"],
86
- 'install_requires': ['pygdal' + get_installed_gdal_version(),
80
+ 'install_requires': ['gdal[numpy]' + get_installed_gdal_version()+',>=3.5.0', # >= 3.5 required for this type of gdal python binding install
87
81
  'numpy', 'scipy', 'elevation', 'pyproj', 'tqdm', 'rasterio', 'mpi4py'],
88
82
  'setup_requires': setup_requires,
89
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
@@ -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.1/PKG-INFO DELETED
@@ -1,11 +0,0 @@
1
- Metadata-Version: 1.2
2
- Name: windmapper
3
- Version: 2.0.1
4
- Summary: Windfield library generation
5
- Home-page: https://github.com/Chrismarsh/Windmapper
6
- Author: Chris Marsh
7
- Author-email: chris.marsh@usask.ca
8
- License: UNKNOWN
9
- Description: Generates windfields
10
- Platform: UNKNOWN
11
- Requires-Python: >=3.6
@@ -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
@@ -1,11 +0,0 @@
1
- Metadata-Version: 1.2
2
- Name: windmapper
3
- Version: 2.0.1
4
- Summary: Windfield library generation
5
- Home-page: https://github.com/Chrismarsh/Windmapper
6
- Author: Chris Marsh
7
- Author-email: chris.marsh@usask.ca
8
- License: UNKNOWN
9
- Description: Generates windfields
10
- Platform: UNKNOWN
11
- Requires-Python: >=3.6
File without changes
File without changes
File without changes