Skip to content

Commit 380ee7c

Browse files
committed
Prepare the MeVisLab thirdparty libraries for the 3.7.0 release
1 parent ae172e1 commit 380ee7c

315 files changed

Lines changed: 3933 additions & 3264 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

recipes/assimp/conanfile.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@ def _configure_cmake(self):
3434
self._cmake.definitions["ZLIB_INC_SEARCH_PATH"] = self.deps_cpp_info['zlib'].include_paths
3535
self._cmake.definitions["ZLIB_LIB_SEARCH_PATH"] = self.deps_cpp_info['zlib'].lib_paths
3636

37+
# disable Collada module, see CVE-2022-45748 / https://github.com/assimp/assimp/issues/4286
38+
self._cmake.definitions["ASSIMP_BUILD_COLLADA_IMPORTER"] = False
39+
self._cmake.definitions["ASSIMP_BUILD_COLLADA_EXPORTER"] = False
40+
3741
self._cmake.configure()
3842
return self._cmake
3943

recipes/boost/conandata.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,18 @@ type: cpp
22
name: boost
33
display_name: Boost
44
mli_name: "None"
5-
version: "1.80.0"
5+
version: "1.81.0"
66
homepage: http://www.boost.org
77
description: Boost provides free peer-reviewed portable C++ source libraries
88
license: BSL-1.0
99

1010
sources:
11-
"1.80.0":
12-
sha256: 1e19565d82e43bc59209a168f5ac899d3ba471d55c7610c677d4ccf2c9c500c0
11+
"1.81.0":
12+
sha256: 71feeed900fbccca04a3b4f2f84a7c217186f28a940ed8b7ed4725986baf99fa
1313
url: https://boostorg.jfrog.io/artifactory/main/release/${version}/source/boost_${version_major}_${version_minor}_${version_patch}.tar.bz2
1414
base_path: boost_${version_major}_${version_minor}_${version_patch}
15+
16+
patches:
17+
"1.81.0":
18+
# commit 3f42566a7d5ab4d7d9ed81613fa61609e2084e07 on boostorg/multiprecision:
19+
- patch_file: "patches/${version}-redundant_warning_pop.patch"
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
diff --git i/boost/multiprecision/cpp_bin_float.hpp w/boost/multiprecision/cpp_bin_float.hpp
2+
index 8bb7294b7..43408fa1d 100644
3+
--- i/boost/multiprecision/cpp_bin_float.hpp
4+
+++ w/boost/multiprecision/cpp_bin_float.hpp
5+
@@ -2146,9 +2146,6 @@ class numeric_limits<boost::multiprecision::number<boost::multiprecision::cpp_bi
6+
static number_type value = get_max();
7+
return value;
8+
}
9+
-#ifdef BOOST_MSVC
10+
-#pragma warning(pop)
11+
-#endif
12+
static constexpr number_type lowest()
13+
{
14+
return -(max)();

recipes/c-blosc/conandata.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
type: pure_c
22
name: c-blosc
3-
version: "1.21.1"
3+
version: "1.21.3"
44
homepage: https://www.blosc.org
55
description: An extremely fast, multi-threaded, meta-compressor library
66
license: BSD-3-Clause
77

88
sources:
9-
"1.21.1":
10-
sha256: f387149eab24efa01c308e4cba0f59f64ccae57292ec9c794002232f7903b55b
11-
url: https://github.com/Blosc/c-blosc/archive/v${version}.tar.gz
9+
"1.21.3":
10+
sha256: 941016c4564bca662080bb01aea74f06630bd665e598c6f6967fd91b2e2e0bb6
11+
url: https://github.com/Blosc/c-blosc/archive/refs/tags/v${version}.tar.gz
1212
base_path: c-blosc-${version}
1313

1414
patches:
15-
"1.21.1":
16-
- patch_file: patches/${version}-fix_cmake_find_package.cmake
15+
"1.21.3":
16+
- patch_file: patches/${version}-fix_cmake_find_package.cmake

recipes/c-blosc/conanfile.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ def requirements(self):
2222
def source(self):
2323
self.default_source()
2424
shutil.copy2(os.path.join("sources", "LICENSES", "BLOSC.txt"), os.path.join("sources", "LICENSE"))
25+
tools.rmdir(os.path.join("sources", "internal-complibs"))
2526

2627

2728
def _configure_cmake(self):

recipes/c-blosc/patches/1.21.1-fix_cmake_find_package.cmake

Lines changed: 0 additions & 39 deletions
This file was deleted.
Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
diff --git i/CMakeLists.txt w/CMakeLists.txt
2+
index 54d4817..e1fb580 100644
3+
--- i/CMakeLists.txt
4+
+++ w/CMakeLists.txt
5+
@@ -136,7 +136,7 @@ if(NOT DEACTIVATE_LZ4)
6+
if(PREFER_EXTERNAL_LZ4)
7+
find_package(LZ4)
8+
else()
9+
- message(STATUS "Using LZ4 internal sources.")
10+
+ message(FATAL_ERROR "No LZ4 found.")
11+
endif()
12+
# HAVE_LZ4 will be set to true because even if the library is
13+
# not found, we will use the included sources for it
14+
@@ -149,7 +149,7 @@ if(NOT DEACTIVATE_SNAPPY)
15+
message(STATUS "Activating support for SNAPPY.")
16+
set(HAVE_SNAPPY TRUE)
17+
else()
18+
- message(STATUS "SNAPPY *not* found. De-activating support for it.")
19+
+ message(FATAL_ERROR "SNAPPY *not* found. De-activating support for it.")
20+
endif()
21+
endif()
22+
23+
@@ -159,7 +159,7 @@ if(NOT DEACTIVATE_ZLIB)
24+
set(ZLIB_ROOT $ENV{ZLIB_ROOT})
25+
find_package(ZLIB)
26+
if(NOT ZLIB_FOUND )
27+
- message(STATUS "No zlib found. Using internal sources.")
28+
+ message(FATAL_ERROR "No zlib found.")
29+
endif()
30+
else()
31+
message(STATUS "Using zlib internal sources.")
32+
@@ -173,7 +173,7 @@ if(NOT DEACTIVATE_ZSTD)
33+
if(PREFER_EXTERNAL_ZSTD)
34+
find_package(Zstd)
35+
else()
36+
- message(STATUS "Using ZSTD internal sources.")
37+
+ message(FATAL_ERROR "No LZ4 found.")
38+
endif()
39+
# HAVE_ZSTD will be set to true because even if the library is
40+
# not found, we will use the included sources for it
41+
diff --git i/cmake/FindLZ4.cmake w/cmake/FindLZ4.cmake
42+
index 2ae6d5f..96ca8e2 100644
43+
--- i/cmake/FindLZ4.cmake
44+
+++ w/cmake/FindLZ4.cmake
45+
@@ -1,12 +1,12 @@
46+
-find_path(LZ4_INCLUDE_DIR lz4.h)
47+
+find_path(LZ4_INCLUDE_DIR lz4.h HINTS ${CONAN_INCLUDE_DIRS_LZ4})
48+
49+
# On Windows, the lz4 library is called liblz4.lib, which is not
50+
# found by using the lz4 name.
51+
-find_library(LZ4_LIBRARY NAMES lz4 liblz4)
52+
+find_library(LZ4_LIBRARY NAMES ${CONAN_LIBS_LZ4} HINTS ${CONAN_LIB_DIRS_LZ4})
53+
54+
if (LZ4_INCLUDE_DIR AND LZ4_LIBRARY)
55+
set(LZ4_FOUND TRUE)
56+
message(STATUS "Found LZ4 library: ${LZ4_LIBRARY}")
57+
else ()
58+
- message(STATUS "No LZ4 library found. Using internal sources.")
59+
+ message(STATUS "No LZ4 library found.")
60+
endif ()
61+
diff --git i/cmake/FindSnappy.cmake w/cmake/FindSnappy.cmake
62+
index 688d4d5..3793875 100644
63+
--- i/cmake/FindSnappy.cmake
64+
+++ w/cmake/FindSnappy.cmake
65+
@@ -1,10 +1,10 @@
66+
-find_path(SNAPPY_INCLUDE_DIR snappy-c.h)
67+
+find_path(SNAPPY_INCLUDE_DIR NAMES snappy-c.h HINTS ${CONAN_INCLUDE_DIRS_SNAPPY})
68+
69+
-find_library(SNAPPY_LIBRARY NAMES snappy)
70+
+find_library(SNAPPY_LIBRARY NAMES ${CONAN_LIBS_SNAPPY} HINTS ${CONAN_LIB_DIRS_SNAPPY})
71+
72+
if (SNAPPY_INCLUDE_DIR AND SNAPPY_LIBRARY)
73+
set(SNAPPY_FOUND TRUE)
74+
message(STATUS "Found SNAPPY library: ${SNAPPY_LIBRARY}")
75+
else ()
76+
- message(STATUS "No snappy found. Using internal sources.")
77+
+ message(STATUS "No snappy found.")
78+
endif ()
79+
diff --git i/cmake/FindZstd.cmake w/cmake/FindZstd.cmake
80+
index 7db4bb9..ded2dc7 100644
81+
--- i/cmake/FindZstd.cmake
82+
+++ w/cmake/FindZstd.cmake
83+
@@ -1,10 +1,10 @@
84+
-find_path(ZSTD_INCLUDE_DIR zstd.h)
85+
+find_path(ZSTD_INCLUDE_DIR NAMES zstd.h HINTS ${CONAN_INCLUDE_DIRS_ZSTD})
86+
87+
-find_library(ZSTD_LIBRARY NAMES zstd)
88+
+find_library(ZSTD_LIBRARY NAMES ${CONAN_LIBS_ZSTD} HINTS ${CONAN_LIB_DIRS_ZSTD})
89+
90+
if (ZSTD_INCLUDE_DIR AND ZSTD_LIBRARY)
91+
set(ZSTD_FOUND TRUE)
92+
message(STATUS "Found Zstd library: ${ZSTD_LIBRARY}")
93+
else ()
94+
- message(STATUS "No Zstd library found. Using internal sources.")
95+
+ message(STATUS "No Zstd library found.")
96+
endif ()

recipes/common/common/mixin/license.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
class License(object):
88
def find_license_file(self:ConanFile):
99
checkFiles = []
10-
for i in ["LICENSE", "License", "COPYING", "COPYRIGHT", "Copyright", "COPYING.BSD", "COPYING.LIB"]:
10+
for i in ["LICENSE", "License", "COPYING", "COPYRIGHT", "Copyright",
11+
"COPYING.BSD", "COPYING.LIB", "LICENSE.BSD"]:
1112
checkFiles.append(os.path.join('sources', i))
1213
checkFiles.append(os.path.join('s', i))
1314
checkFiles.append(os.path.join('sources', f"{i}.md"))
Lines changed: 38 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
# -*- coding: utf-8 -*-
2-
from conans import ConanFile
32
from conans import tools
43
from conans.errors import ConanException
54
from common import commonrecipe
65
import os
76

7+
88
class PythonPackageRecipe(commonrecipe.CommonRecipe):
99
generators = "pkg_config"
1010
parallel_make = True
1111
strip_patch = 0
1212
generate_cmake = False # Python add-ons usually don't need a cmake file
1313

1414
def relative_site_package_folder(self):
15-
if not "python" in self.deps_cpp_info.deps:
15+
if "python" not in self.deps_cpp_info.deps:
1616
raise ConanException("Python dependency not found. Does this recipe depend on python?")
1717

1818
pv = tools.Version(self.deps_cpp_info["python"].version)
@@ -22,22 +22,24 @@ def relative_site_package_folder(self):
2222

2323
return f"lib/python{pv.major}.{pv.minor}/site-packages"
2424

25+
@property
26+
def prefer_setup_py(self):
27+
"""Returns if setup.py is used even if pyproject.toml exists."""
28+
return False
2529

2630
def requirements(self):
2731
self.default_requirements()
2832

29-
3033
def default_requirements(self):
3134
channel = "@{0}/{1}".format(self.user, self.channel)
3235
self.requires("python/[>=3.9.7]" + channel)
3336

34-
3537
def build(self):
3638
self.default_build()
3739

38-
39-
def default_build(self, args=None, env_vars={}):
40-
py = tools.get_env("MEVIS_PYTHON_CMD", None)
40+
def default_build(self, args=None, env_vars=None):
41+
env_vars = env_vars or {}
42+
py = tools.get_env("MEVIS_PYTHON_CMD")
4143
if not py:
4244
raise ConanException("environment variable MEVIS_PYTHON_CMD not set.")
4345

@@ -46,30 +48,42 @@ def default_build(self, args=None, env_vars={}):
4648
tools.mkdir(sitepackage)
4749

4850
cpucount = tools.cpu_count() if self.parallel_make else 1
49-
build_args = "-j %s" % cpucount
51+
build_args = [f"-j {cpucount}"]
5052
if self.settings.build_type == "Debug":
51-
build_args = "-g " + build_args
53+
build_args += ["-g"]
5254

5355
if args:
54-
if isinstance(args, list):
55-
build_args += " " + ' '.join(args)
56-
else:
57-
build_args += " " + str(args)
56+
build_args += args
5857

59-
sitepackage += (os.pathsep + tools.get_env("PYTHONPATH")) if tools.get_env("PYTHONPATH") else ""
58+
python_path = sitepackage
59+
if tools.get_env("PYTHONPATH"):
60+
python_path += (os.pathsep + tools.get_env("PYTHONPATH"))
6061
env_vars.update({
61-
"SETUPTOOLS_SCM_PRETEND_VERSION": self.version, # prevent setuptools_scm from trying to determine the version itself, which fails
62+
"SETUPTOOLS_SCM_PRETEND_VERSION": self.version,
63+
# prevent setuptools_scm from trying to determine the version itself, which fails
6264
"PKG_CONFIG_PATH": self.build_folder,
6365
"MAKEFLAGS": ("-j%d" % cpucount),
6466
"MAKEOPTS": ("-j%d" % cpucount),
65-
"PYTHONPATH": sitepackage
67+
"PYTHONPATH": python_path
6668
})
69+
if self.settings.build_type == 'Debug':
70+
# This utilizes a patch we do to setuptools to work around
71+
# a shortcoming of pyproject.toml support:
72+
env_vars["SETUPTOOLS_BUILD_DEBUG"] = "1"
6773

6874
with tools.environment_append(env_vars):
6975
with tools.chdir('sources'):
70-
self.run("%s setup.py build %s" % (py, build_args), run_environment=True)
71-
self.run('%s setup.py install --verbose --optimize=1 --skip-build --root=%s --prefix="%s"' % (py, '\\' if tools.os_info.is_windows else '/', self.package_folder), run_environment=True)
72-
76+
if not self.prefer_setup_py and os.path.exists("pyproject.toml"):
77+
build_args = [f'--install-option="{arg}"' for arg in build_args]
78+
cmd = (f"{py} -m pip install --no-index -v --no-deps --no-build-isolation "
79+
f"{' '.join(build_args)} --target {sitepackage}"
80+
f" {os.path.join(self.build_folder, 'sources')}")
81+
self.run(cmd, run_environment=True)
82+
else:
83+
self.run(f"{py} setup.py build {' '.join(build_args)}", run_environment=True)
84+
self.run(f'{py} setup.py install --verbose --optimize=1 '
85+
f'--skip-build --root={os.sep} --prefix="{self.package_folder}"',
86+
run_environment=True)
7387

7488
def default_package_info(self):
7589
super().default_package_info()
@@ -85,11 +99,12 @@ def default_package_info(self):
8599
self.env_info.PATH.append(script_dir)
86100

87101
# MEVIS_PYTHON_SITE_PACKAGES_FOLDER
88-
self.output.info('Creating MEVIS_PYTHON_SITE_PACKAGES_FOLDER environment variable: %s' % self.relative_site_package_folder())
102+
self.output.info(
103+
'Creating MEVIS_PYTHON_SITE_PACKAGES_FOLDER environment variable: %s' % self.relative_site_package_folder())
89104
self.env_info.MEVIS_PYTHON_SITE_PACKAGES_FOLDER = self.relative_site_package_folder()
90105

91106
# extend PYTHONPATH with site-package folder of this recipe
92-
sp_dir = os.path.join(self.package_folder, self.relative_site_package_folder())
107+
sp_dir = os.path.join(self.package_folder, self.relative_site_package_folder())
93108
if os.path.exists(sp_dir):
94-
self.output.info("Appending PYTHONPATH env var with: " + sp_dir)
95-
self.env_info.PYTHONPATH.append(sp_dir)
109+
self.output.info("Appending PYTHONPATH env var with: " + sp_dir)
110+
self.env_info.PYTHONPATH.append(sp_dir)

recipes/conan_generator/conanfile.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,7 @@ def get_content(self):
128128
'picojson',
129129
'pyyaml',
130130
'pyzmq',
131-
'requests',
132131
'spline',
133-
'urllib3',
134132
'vigra',
135133
'xylib',
136134
]

0 commit comments

Comments
 (0)