Skip to content

Commit c90d01f

Browse files
committed
Prepare the MeVisLab thirdparty libraries for the 4.0.2 release
1 parent 41c273e commit c90d01f

61 files changed

Lines changed: 1467 additions & 1161 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.

README.md

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ Note that on POSIX platforms the Python 3 executable is called `python3`, while
2121
Additionally, under POSIX, `pip3` is not installed per default, while under Windows it is installed with Python as `pip`.
2222
To be compatible with Windows _(yes, that's the wrong way around - blame MS!)_, we currently need the `python` and `pip` symlinks point to `python3` and `pip3` _(or better `python3 -m pip`)_ respectively. Everything else may work, but has not been tested.
2323

24+
2425
Note also that on current Windows versions [Microsoft hijacks](https://docs.microsoft.com/en-us/windows/python/faqs#why-does-running-pythonexe-open-the-microsoft-store) the `python` and `python3` executables.
2526

2627

@@ -47,42 +48,8 @@ conan create -s build_type=Debug .
4748
conan create -s build_type=Release .
4849
```
4950

50-
If you have the `conan-config` package installed (MeVisLab internal only, see README.md in the main MeVisLab directory), you can instead use:
51-
```
52-
cd recipes/<recipe_name>
53-
conan tp:build .
54-
```
55-
to build both the debug and release packages.
56-
57-
5851
To fetch the package sources (includes applying patches):
5952
```
6053
cd recipes/<recipe_name>
6154
conan source .
6255
```
63-
64-
65-
## Jenkins Integration
66-
67-
### Pipeline Description
68-
There are mainly two Jenkins files that control the build of all thirdparty libraries and tools: `Jenkinsfile` and `JenkinsfileLibrary` (both in the repository root). The first file parses `build_configuration.yml` and triggers the sequential build of all tiers, starting with tier0. For further details see the chapter _Build Configuration_.
69-
70-
The conan package system is written in a way that it checks if the package itself or one of its dependencies has been changed since the last successful build. If nothing has changed, then the build and archiving step is skipped.
71-
Since even this check takes a certain amount of time, an additional optimization has been implemented. All changed files are collected since the last successful build of the complete thirdparty/branch build. And only those directly affected projects and the tiers below are triggered to be rebuild. This shortens the build time enormously. If one of the files `Jenkinsfile`, `JenkinsfileLibrary`, or `build_configuration.yml` is part of any changeset, then this optimization is skipped and all tiers with all projects are build.
72-
73-
### Build Configuration
74-
The build configuration is described in the `build_configuration.yml` file, which references all the libraries and tools needed to build MeVisLab.
75-
Organizing the dependencies can be very tedious and cumbersome, especially when attempting to describe the smallest possible dependency graph.
76-
To simplify this, dependencies are broken down into different tiers, with the content of each tier organized according to the dependencies of the individual libraries and tools.
77-
For instance, if library A depends on another library B, then B must be referenced in one of the upper tiers (e.g. a tier with a lower number).
78-
79-
The build of each library and tool for all specified platforms and build types must finish within a defined time frame. There is a default timeout that is used for all packages.
80-
However, if a certain package requires significantly more time, there is the possibility to define a timeout exception.
81-
82-
These are the parameters that are defined in the file:
83-
84-
| Parameter | Description |
85-
| --------- | ------------|
86-
| timeout_default: | Default time in minutes for all packages not specified otherwise |
87-
| timeout_exception: | A map of all packages with their individual timeouts |
88-
| tiers: | An ordered list of all tiers, starting with tier0 |

recipes/7zip/conanfile.py

Lines changed: 23 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@
33
from conan.tools.layout import basic_layout
44
from conan.tools.microsoft import NMakeToolchain
55
from conans.errors import ConanInvalidConfiguration
6+
import os
67

78
required_conan_version = ">=2.2.2"
89

910

1011
class ConanRecipe(ConanFile):
1112
name = "7zip"
12-
version = "24.06"
13-
license = ("LGPL-2.1-or-later", "BSD-3-Clause")
13+
version = "24.08"
14+
license = "LGPL-2.1-or-later AND BSD-3-Clause"
1415
homepage = "https://www.7-zip.org"
1516
description = "7-Zip is a file archiver with a high compression ratio"
1617
settings = "os", "arch", "compiler", "build_type"
@@ -39,7 +40,7 @@ def source(self):
3940
version = "".join(self.version.split("."))
4041
get(
4142
self,
42-
sha256="2aa1660c773525b2ed84d6cd7ff0680c786ec0893b87e4db44654dcb7f5ac8b5",
43+
sha256="aa04aac906a04df59e7301f4c69e9f48808e6c8ecae4eb697703a47bfb0ac042",
4344
url=f"https://sourceforge.net/projects/sevenzip/files/7-Zip/{self.version}/7z{version}-src.tar.xz",
4445
)
4546

@@ -48,17 +49,29 @@ def generate(self):
4849
tc.generate()
4950

5051
def build(self):
51-
make_file = self.source_path / "CPP" / "Build.mak"
52-
make_file.chmod(0o644)
52+
make_file = os.path.join(self.source_folder, "CPP", "Build.mak")
53+
os.chmod(make_file, 0o644)
5354
replace_in_file(self, make_file, "-MT", f"-{self.settings.compiler.runtime}")
5455
replace_in_file(self, make_file, "-MD", f"-{self.settings.compiler.runtime}")
55-
self.run(f"nmake /f makefile PLATFORM=x64", cwd=self.source_path / "CPP" / "7zip")
56+
self.run(f"nmake /f makefile PLATFORM=x64", cwd=os.path.join(self.source_folder, "CPP", "7zip"))
5657

5758
def package(self):
58-
copy(self, "License.txt", dst=self.package_path / "licenses", src=self.source_path / "DOC")
59-
copy(self, "unRarLicense.txt", dst=self.package_path / "licenses", src=self.source_path / "DOC")
60-
copy(self, "*/7z.exe", dst=self.package_path / "bin", src=self.source_path / "CPP" / "7zip", keep_path=False)
61-
copy(self, "*/7z.dll", dst=self.package_path / "bin", src=self.source_path / "CPP" / "7zip", keep_path=False)
59+
copy(self, "License.txt", dst=os.path.join(self.package_folder, "licenses"), src=os.path.join(self.source_folder, "DOC"))
60+
copy(self, "unRarLicense.txt", dst=os.path.join(self.package_folder, "licenses"), src=os.path.join(self.source_folder, "DOC"))
61+
copy(
62+
self,
63+
"*/7z.exe",
64+
dst=os.path.join(self.package_folder, "bin"),
65+
src=os.path.join(self.source_folder, "CPP", "7zip"),
66+
keep_path=False,
67+
)
68+
copy(
69+
self,
70+
"*/7z.dll",
71+
dst=os.path.join(self.package_folder, "bin"),
72+
src=os.path.join(self.source_folder, "CPP", "7zip"),
73+
keep_path=False,
74+
)
6275

6376
def package_info(self):
6477
self.cpp_info.includedirs.clear()

recipes/abseil/conanfile.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
class ConanRecipe(ConanFile):
1010
name = "abseil"
11-
version = "20240116.2"
11+
version = "20240722.0"
1212
homepage = "https://abseil.io"
1313
description = "Collection of C++ libraries from Google"
1414
license = "Apache-2.0"
@@ -24,7 +24,7 @@ def layout(self):
2424
def source(self):
2525
get(
2626
self,
27-
sha256="733726b8c3a6d39a4120d7e45ea8b41a434cdacde401cba500f14236c49b39dc",
27+
sha256="f50e5ac311a81382da7fa75b97310e4b9006474f9560ac46f54a9967f07d4ae3",
2828
url=f"https://github.com/abseil/abseil-cpp/archive/refs/tags/{self.version}.tar.gz",
2929
strip_root=True,
3030
)
@@ -45,10 +45,10 @@ def build(self):
4545
cmake.build()
4646

4747
def package(self):
48-
copy(self, pattern="LICENSE", src=self.source_path, dst=self.package_path / "licenses")
48+
copy(self, pattern="LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses"))
4949
cmake = CMake(self)
5050
cmake.install()
51-
rmdir(self, self.package_path / "lib" / "pkgconfig")
51+
rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig"))
5252

5353
def package_info(self):
5454
self.cpp_info.builddirs.append(os.path.join("lib", "cmake"))

recipes/assimp/conanfile.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,14 @@
22
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
33
from conan.tools.files import patch, collect_libs, copy, get, rmdir
44
from conan.tools.microsoft import is_msvc
5+
import os
56

67
required_conan_version = ">=2.2.2"
78

89

910
class ConanRecipe(ConanFile):
1011
name = "assimp"
11-
version = "5.4.1"
12+
version = "5.4.2"
1213
homepage = "https://www.assimp.org"
1314
description = "library to import and export various 3d-model-formats including scene-post-processing to generate missing render data"
1415
license = "BSD-3-Clause"
@@ -25,7 +26,7 @@ def requirements(self):
2526
def source(self):
2627
get(
2728
self,
28-
sha256="08837ee7c50b98ca72d2c9e66510ca6640681db8800aa2d3b1fcd61ccc615113",
29+
sha256="03e38d123f6bf19a48658d197fd09c9a69db88c076b56a476ab2da9f5eb87dcc",
2930
url=f"https://github.com/assimp/assimp/archive/v{self.version}.zip",
3031
strip_root=True,
3132
)
@@ -65,12 +66,12 @@ def build(self):
6566
cmake.build()
6667

6768
def package(self):
68-
copy(self, "LICENSE", src=self.source_path, dst=self.package_path / "licenses")
69-
copy(self, "*.pdb", src=self.build_path / "bin", dst=self.package_path / "bin", keep_path=False)
69+
copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses"))
70+
copy(self, "*.pdb", src=os.path.join(self.build_folder, "bin"), dst=os.path.join(self.package_folder, "bin"), keep_path=False)
7071
cmake = CMake(self)
7172
cmake.install()
72-
rmdir(self, self.package_path / "lib" / "cmake")
73-
rmdir(self, self.package_path / "lib" / "pkgconfig")
73+
rmdir(self, os.path.join(self.package_folder, "lib", "cmake"))
74+
rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig"))
7475

7576
def package_info(self):
7677
self.cpp_info.set_property("cmake_file_name", "assimp")

recipes/c-blosc/conanfile.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import os
12
from conan import ConanFile
23
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
34
from conan.tools.files import copy, get, rmdir, collect_libs
@@ -7,7 +8,7 @@
78

89
class ConanRecipe(ConanFile):
910
name = "c-blosc"
10-
version = "1.21.5"
11+
version = "1.21.6"
1112
homepage = "https://www.blosc.org"
1213
description = "An extremely fast, multi-threaded, meta-compressor library"
1314
license = "BSD-3-Clause"
@@ -30,7 +31,7 @@ def requirements(self):
3031

3132
def source(self):
3233
get(self,
33-
sha256="32e61961bbf81ffea6ff30e9d70fca36c86178afd3e3cfa13376adec8c687509",
34+
sha256="9fcd60301aae28f97f1301b735f966cc19e7c49b6b4321b839b4579a0c156f38",
3435
url=f"https://github.com/Blosc/c-blosc/archive/refs/tags/v{self.version}.tar.gz",
3536
strip_root=True
3637
)
@@ -87,11 +88,11 @@ def build(self):
8788
cmake.build()
8889

8990
def package(self):
90-
copy(self, "LICENSE.txt", src=self.source_path, dst=self.package_path / "licenses")
91-
copy(self, "*.pdb", src=self.build_path, dst=self.package_path / "bin", keep_path=False, excludes="*vc???.pdb")
91+
copy(self, "LICENSE.txt", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses"))
92+
copy(self, "*.pdb", src=self.build_folder, dst=os.path.join(self.package_folder, "bin"), keep_path=False, excludes="*vc???.pdb")
9293
cmake = CMake(self)
9394
cmake.install()
94-
rmdir(self, self.package_path / "lib" / "pkgconfig")
95+
rmdir(self, os.path.join(self.package_folder, "lib", "pkgconfig"))
9596

9697
def package_info(self):
9798
self.cpp_info.set_property("pkg_config_name", "blosc")

recipes/conan_generator/conanfile.py

Lines changed: 40 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -104,20 +104,47 @@ def __init__(self, conanfile):
104104
self.conanfile = conanfile
105105

106106
def _get_licenses_of_dependency(self, dependency):
107-
# support several licenses:
107+
108+
def partition_all(s: str, separators: tuple[str]):
109+
if separators:
110+
before, sep, after = s.partition(separators[0])
111+
if sep:
112+
# separator occurred in sub-string, also separate strings left and right of it
113+
return partition_all(before, separators[1:]) + [sep] + partition_all(after, separators)
114+
else:
115+
# separator didn't occur, try next separator
116+
return partition_all(s, separators[1:])
117+
elif s:
118+
return [s]
119+
else:
120+
return []
121+
122+
separators = (" ", "(", ")")
123+
non_parts = separators + ("AND", "OR")
108124
licenses = dependency.license
109-
if not isinstance(licenses, (list, tuple)):
110-
licenses = [licenses]
125+
if isinstance(licenses, (list, tuple)):
126+
# support license lists:
127+
license_list = licenses
128+
licenses = " AND ".join(licenses)
129+
else:
130+
# split potential SPDX license expression
131+
license_list = partition_all(licenses, separators)
111132
license_names = []
112-
for license_id in licenses:
133+
for license_id in license_list:
134+
if license_id in non_parts:
135+
# license_names.append(license_id) # should we retain the license expression???
136+
continue
113137
lic = spdx_licenses.get(license_id.lower(), other_licenses.get(license_id.lower()))
114-
if not lic:
115-
self.conanfile.output.info("\n\n")
116-
self.conanfile.output.error(f"Invalid license: '{license_id}'")
117-
self.conanfile.output.info("Please use a SPDX license identifier (https://spdx.org/licenses/).")
118-
else:
138+
if lic:
119139
license_names.append(lic['name'])
120-
return licenses, license_names
140+
else:
141+
# use license id unchanged
142+
license_names.append(license_id)
143+
if not license_id.lower().startswith("licenseref-"):
144+
self.conanfile.output.info("\n\n")
145+
self.conanfile.output.error(f"Invalid license: '{license_id}' in {dependency.ref.name}")
146+
self.conanfile.output.info("Please use a SPDX license identifier (https://spdx.org/licenses/).")
147+
return licenses, ", ".join(license_names)
121148

122149

123150
class ThirdPartyInformationDeps(_ThirdPartyInformationBase):
@@ -140,8 +167,8 @@ def generate(self, package_id="MeVis/ThirdParty"):
140167
"id": pkg_name.lower(),
141168
"name": get_display_name(dependency),
142169
"version": str(dependency.ref.version),
143-
"license": ", ".join(licenses),
144-
"license_name": ", ".join(license_names),
170+
"license": licenses,
171+
"license_name": license_names,
145172
"homepage": dependency.homepage,
146173
"description": dependency.description,
147174
# TODO MeVisLab shows all licenses anyway.
@@ -236,7 +263,7 @@ def get_content(self):
236263
"cpp_info": dependency.cpp_info,
237264
"name": get_display_name(dependency),
238265
"version": str(dependency.ref.version),
239-
"license": ", ".join(licenses),
266+
"license": licenses,
240267
"public_sdk_only": public_sdk_only,
241268
"description": dependency.description,
242269
"homepage": dependency.homepage,

0 commit comments

Comments
 (0)