jolt 0.9.123__py3-none-any.whl → 0.9.435__py3-none-any.whl
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.
- jolt/__init__.py +80 -7
- jolt/__main__.py +9 -1
- jolt/bin/fstree-darwin-x86_64 +0 -0
- jolt/bin/fstree-linux-x86_64 +0 -0
- jolt/cache.py +832 -362
- jolt/chroot.py +156 -0
- jolt/cli.py +281 -162
- jolt/common_pb2.py +63 -0
- jolt/common_pb2_grpc.py +4 -0
- jolt/config.py +98 -41
- jolt/error.py +19 -4
- jolt/filesystem.py +2 -6
- jolt/graph.py +705 -117
- jolt/hooks.py +43 -0
- jolt/influence.py +122 -3
- jolt/loader.py +369 -121
- jolt/log.py +225 -63
- jolt/manifest.py +28 -38
- jolt/options.py +35 -10
- jolt/pkgs/abseil.py +42 -0
- jolt/pkgs/asio.py +25 -0
- jolt/pkgs/autoconf.py +41 -0
- jolt/pkgs/automake.py +41 -0
- jolt/pkgs/b2.py +31 -0
- jolt/pkgs/boost.py +111 -0
- jolt/pkgs/boringssl.py +32 -0
- jolt/pkgs/busybox.py +39 -0
- jolt/pkgs/bzip2.py +43 -0
- jolt/pkgs/cares.py +29 -0
- jolt/pkgs/catch2.py +36 -0
- jolt/pkgs/cbindgen.py +17 -0
- jolt/pkgs/cista.py +19 -0
- jolt/pkgs/clang.py +44 -0
- jolt/pkgs/cli11.py +24 -0
- jolt/pkgs/cmake.py +48 -0
- jolt/pkgs/cpython.py +196 -0
- jolt/pkgs/crun.py +29 -0
- jolt/pkgs/curl.py +38 -0
- jolt/pkgs/dbus.py +18 -0
- jolt/pkgs/double_conversion.py +24 -0
- jolt/pkgs/fastfloat.py +21 -0
- jolt/pkgs/ffmpeg.py +28 -0
- jolt/pkgs/flatbuffers.py +29 -0
- jolt/pkgs/fmt.py +27 -0
- jolt/pkgs/fstree.py +20 -0
- jolt/pkgs/gflags.py +18 -0
- jolt/pkgs/glib.py +18 -0
- jolt/pkgs/glog.py +25 -0
- jolt/pkgs/glslang.py +21 -0
- jolt/pkgs/golang.py +16 -11
- jolt/pkgs/googlebenchmark.py +18 -0
- jolt/pkgs/googletest.py +46 -0
- jolt/pkgs/gperf.py +15 -0
- jolt/pkgs/grpc.py +73 -0
- jolt/pkgs/hdf5.py +19 -0
- jolt/pkgs/help2man.py +14 -0
- jolt/pkgs/inja.py +28 -0
- jolt/pkgs/jsoncpp.py +31 -0
- jolt/pkgs/libarchive.py +43 -0
- jolt/pkgs/libcap.py +44 -0
- jolt/pkgs/libdrm.py +44 -0
- jolt/pkgs/libedit.py +42 -0
- jolt/pkgs/libevent.py +31 -0
- jolt/pkgs/libexpat.py +27 -0
- jolt/pkgs/libfastjson.py +21 -0
- jolt/pkgs/libffi.py +16 -0
- jolt/pkgs/libglvnd.py +30 -0
- jolt/pkgs/libogg.py +28 -0
- jolt/pkgs/libpciaccess.py +18 -0
- jolt/pkgs/libseccomp.py +21 -0
- jolt/pkgs/libtirpc.py +24 -0
- jolt/pkgs/libtool.py +42 -0
- jolt/pkgs/libunwind.py +35 -0
- jolt/pkgs/libva.py +18 -0
- jolt/pkgs/libvorbis.py +33 -0
- jolt/pkgs/libxml2.py +35 -0
- jolt/pkgs/libxslt.py +17 -0
- jolt/pkgs/libyajl.py +16 -0
- jolt/pkgs/llvm.py +81 -0
- jolt/pkgs/lua.py +54 -0
- jolt/pkgs/lz4.py +26 -0
- jolt/pkgs/m4.py +14 -0
- jolt/pkgs/make.py +17 -0
- jolt/pkgs/mesa.py +81 -0
- jolt/pkgs/meson.py +17 -0
- jolt/pkgs/mstch.py +28 -0
- jolt/pkgs/mysql.py +60 -0
- jolt/pkgs/nasm.py +49 -0
- jolt/pkgs/ncurses.py +30 -0
- jolt/pkgs/ng_log.py +25 -0
- jolt/pkgs/ninja.py +45 -0
- jolt/pkgs/nlohmann_json.py +25 -0
- jolt/pkgs/nodejs.py +19 -11
- jolt/pkgs/opencv.py +24 -0
- jolt/pkgs/openjdk.py +26 -0
- jolt/pkgs/openssl.py +103 -0
- jolt/pkgs/paho.py +76 -0
- jolt/pkgs/patchelf.py +16 -0
- jolt/pkgs/perl.py +42 -0
- jolt/pkgs/pkgconfig.py +64 -0
- jolt/pkgs/poco.py +39 -0
- jolt/pkgs/protobuf.py +77 -0
- jolt/pkgs/pugixml.py +27 -0
- jolt/pkgs/python.py +19 -0
- jolt/pkgs/qt.py +35 -0
- jolt/pkgs/rapidjson.py +26 -0
- jolt/pkgs/rapidyaml.py +28 -0
- jolt/pkgs/re2.py +30 -0
- jolt/pkgs/re2c.py +17 -0
- jolt/pkgs/readline.py +15 -0
- jolt/pkgs/rust.py +41 -0
- jolt/pkgs/sdl.py +28 -0
- jolt/pkgs/simdjson.py +27 -0
- jolt/pkgs/soci.py +46 -0
- jolt/pkgs/spdlog.py +29 -0
- jolt/pkgs/spirv_llvm.py +21 -0
- jolt/pkgs/spirv_tools.py +24 -0
- jolt/pkgs/sqlite.py +83 -0
- jolt/pkgs/ssl.py +12 -0
- jolt/pkgs/texinfo.py +15 -0
- jolt/pkgs/tomlplusplus.py +22 -0
- jolt/pkgs/wayland.py +26 -0
- jolt/pkgs/x11.py +58 -0
- jolt/pkgs/xerces_c.py +20 -0
- jolt/pkgs/xorg.py +360 -0
- jolt/pkgs/xz.py +29 -0
- jolt/pkgs/yamlcpp.py +30 -0
- jolt/pkgs/zeromq.py +47 -0
- jolt/pkgs/zlib.py +87 -0
- jolt/pkgs/zstd.py +33 -0
- jolt/plugins/alias.py +3 -0
- jolt/plugins/allure.py +5 -2
- jolt/plugins/autotools.py +66 -0
- jolt/plugins/cache.py +133 -0
- jolt/plugins/cmake.py +74 -6
- jolt/plugins/conan.py +238 -0
- jolt/plugins/cxx.py +698 -0
- jolt/plugins/cxxinfo.py +7 -0
- jolt/plugins/dashboard.py +1 -1
- jolt/plugins/docker.py +80 -23
- jolt/plugins/email.py +2 -2
- jolt/plugins/email.xslt +144 -101
- jolt/plugins/environ.py +11 -0
- jolt/plugins/fetch.py +141 -0
- jolt/plugins/gdb.py +39 -19
- jolt/plugins/gerrit.py +1 -14
- jolt/plugins/git.py +283 -85
- jolt/plugins/googletest.py +2 -1
- jolt/plugins/http.py +36 -38
- jolt/plugins/libtool.py +63 -0
- jolt/plugins/linux.py +990 -0
- jolt/plugins/logstash.py +4 -4
- jolt/plugins/meson.py +61 -0
- jolt/plugins/ninja-compdb.py +99 -30
- jolt/plugins/ninja.py +468 -166
- jolt/plugins/paths.py +11 -1
- jolt/plugins/pkgconfig.py +219 -0
- jolt/plugins/podman.py +136 -92
- jolt/plugins/python.py +137 -0
- jolt/plugins/remote_execution/__init__.py +0 -0
- jolt/plugins/remote_execution/administration_pb2.py +46 -0
- jolt/plugins/remote_execution/administration_pb2_grpc.py +170 -0
- jolt/plugins/remote_execution/log_pb2.py +32 -0
- jolt/plugins/remote_execution/log_pb2_grpc.py +68 -0
- jolt/plugins/remote_execution/scheduler_pb2.py +41 -0
- jolt/plugins/remote_execution/scheduler_pb2_grpc.py +141 -0
- jolt/plugins/remote_execution/worker_pb2.py +38 -0
- jolt/plugins/remote_execution/worker_pb2_grpc.py +112 -0
- jolt/plugins/report.py +12 -2
- jolt/plugins/rust.py +25 -0
- jolt/plugins/scheduler.py +710 -0
- jolt/plugins/selfdeploy/setup.py +8 -4
- jolt/plugins/selfdeploy.py +138 -88
- jolt/plugins/strings.py +35 -22
- jolt/plugins/symlinks.py +26 -11
- jolt/plugins/telemetry.py +5 -2
- jolt/plugins/timeline.py +13 -3
- jolt/plugins/volume.py +46 -48
- jolt/scheduler.py +589 -192
- jolt/tasks.py +625 -121
- jolt/templates/timeline.html.template +44 -47
- jolt/timer.py +22 -0
- jolt/tools.py +638 -282
- jolt/utils.py +211 -7
- jolt/version.py +1 -1
- jolt/xmldom.py +12 -2
- {jolt-0.9.123.dist-info → jolt-0.9.435.dist-info}/METADATA +97 -38
- jolt-0.9.435.dist-info/RECORD +207 -0
- {jolt-0.9.123.dist-info → jolt-0.9.435.dist-info}/WHEEL +1 -1
- jolt/plugins/amqp.py +0 -834
- jolt/plugins/debian.py +0 -338
- jolt/plugins/ftp.py +0 -181
- jolt/plugins/repo.py +0 -253
- jolt-0.9.123.dist-info/RECORD +0 -77
- {jolt-0.9.123.dist-info → jolt-0.9.435.dist-info}/entry_points.txt +0 -0
- {jolt-0.9.123.dist-info → jolt-0.9.435.dist-info}/top_level.txt +0 -0
jolt/plugins/http.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from requests.auth import HTTPBasicAuth
|
|
2
2
|
from requests.exceptions import ConnectTimeout, RequestException
|
|
3
|
+
from urllib.parse import urlparse, urlunparse
|
|
3
4
|
import keyring
|
|
4
5
|
import getpass
|
|
5
6
|
|
|
@@ -9,6 +10,7 @@ from jolt import cache
|
|
|
9
10
|
from jolt import log
|
|
10
11
|
from jolt import config
|
|
11
12
|
from jolt import filesystem as fs
|
|
13
|
+
from jolt import tools
|
|
12
14
|
from jolt.error import raise_error_if, JoltError
|
|
13
15
|
|
|
14
16
|
|
|
@@ -21,10 +23,9 @@ class Http(cache.StorageProvider):
|
|
|
21
23
|
def __init__(self, cache):
|
|
22
24
|
super(Http, self).__init__()
|
|
23
25
|
self._cache = cache
|
|
24
|
-
self._uri = config.get(NAME, "uri")
|
|
26
|
+
self._uri = config.get(NAME, "uri", "http://cache")
|
|
27
|
+
self._uri = self._uri.rstrip("/")
|
|
25
28
|
raise_error_if(not self._uri, "HTTP URI not configured")
|
|
26
|
-
if self._uri[-1] != "/":
|
|
27
|
-
self._uri += "/"
|
|
28
29
|
self._upload = config.getboolean(NAME, "upload", True)
|
|
29
30
|
self._download = config.getboolean(NAME, "download", True)
|
|
30
31
|
self._disabled = False
|
|
@@ -49,65 +50,62 @@ class Http(cache.StorageProvider):
|
|
|
49
50
|
|
|
50
51
|
return HTTPBasicAuth(username, password)
|
|
51
52
|
|
|
52
|
-
def _get_url(self,
|
|
53
|
-
return
|
|
53
|
+
def _get_url(self, artifact):
|
|
54
|
+
return artifact.tools.expand(
|
|
55
|
+
"{uri}/{name}/{file}",
|
|
54
56
|
uri=self._uri,
|
|
55
|
-
name=
|
|
57
|
+
name=artifact.task.name,
|
|
56
58
|
file=fs.path.basename(artifact.get_archive_path()))
|
|
57
59
|
|
|
58
60
|
@utils.retried.on_exception((RequestException, JoltError))
|
|
59
|
-
def download(self,
|
|
61
|
+
def download(self, artifact, force=False):
|
|
60
62
|
if self._disabled:
|
|
61
63
|
return False
|
|
62
64
|
if not self._download and not force:
|
|
63
65
|
return False
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
url = self._get_url(artifact)
|
|
67
|
+
return artifact.tools.download(
|
|
68
|
+
url,
|
|
69
|
+
artifact.get_archive_path(),
|
|
70
|
+
exceptions=False,
|
|
71
|
+
timeout=TIMEOUT)
|
|
69
72
|
|
|
70
73
|
def download_enabled(self):
|
|
71
74
|
return not self._disabled and self._download
|
|
72
75
|
|
|
73
76
|
@utils.retried.on_exception((RequestException))
|
|
74
|
-
def upload(self,
|
|
77
|
+
def upload(self, artifact, force=False):
|
|
75
78
|
if self._disabled:
|
|
76
79
|
return True
|
|
77
80
|
if not self._upload and not force:
|
|
78
81
|
return True
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
timeout=TIMEOUT)
|
|
87
|
-
return False
|
|
82
|
+
url = self._get_url(artifact)
|
|
83
|
+
archive = artifact.get_archive()
|
|
84
|
+
return artifact.tools.upload(
|
|
85
|
+
archive, url,
|
|
86
|
+
exceptions=False,
|
|
87
|
+
auth=self._get_auth(),
|
|
88
|
+
timeout=TIMEOUT)
|
|
88
89
|
|
|
89
90
|
def upload_enabled(self):
|
|
90
91
|
return not self._disabled and self._upload
|
|
91
92
|
|
|
92
93
|
@utils.retried.on_exception((RequestException))
|
|
93
|
-
def location(self,
|
|
94
|
+
def location(self, artifact):
|
|
94
95
|
if self._disabled:
|
|
95
96
|
return False
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
url = self.
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
log.debug("[HTTP] Response: {0}", response.status_code)
|
|
109
|
-
return url if response.status_code == 200 else ''
|
|
110
|
-
return False
|
|
97
|
+
|
|
98
|
+
url = self._get_url(artifact)
|
|
99
|
+
try:
|
|
100
|
+
response = tools.http_session.head(url, stream=True, timeout=TIMEOUT_HEAD, auth=self._get_auth())
|
|
101
|
+
except ConnectTimeout:
|
|
102
|
+
self._disabled = True
|
|
103
|
+
log.warning("[HTTP] failed to establish server connection, disabled")
|
|
104
|
+
return False
|
|
105
|
+
|
|
106
|
+
log.debug("[HTTP] Head ({}): {}", response.status_code, url)
|
|
107
|
+
url = urlunparse(urlparse(url))
|
|
108
|
+
return url if response.status_code == 200 else ''
|
|
111
109
|
|
|
112
110
|
|
|
113
111
|
@cache.RegisterStorage
|
jolt/plugins/libtool.py
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
from jolt import attributes
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class Libtool(object):
|
|
5
|
+
def __init__(self, tools):
|
|
6
|
+
self.tools = tools
|
|
7
|
+
|
|
8
|
+
def relocate(self, artifact, dirs=["lib"], prefix=None):
|
|
9
|
+
prefix = str(artifact.strings.install_prefix) if prefix is None else prefix
|
|
10
|
+
for dir in dirs:
|
|
11
|
+
with self.tools.cwd(artifact.path, dir):
|
|
12
|
+
for file in self.tools.glob("*.la"):
|
|
13
|
+
self.tools.replace_in_file(file, prefix, artifact.final_path)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def relocate(dirs=["lib"]):
|
|
17
|
+
"""
|
|
18
|
+
Relocate libtool archive files (.la) published by task.
|
|
19
|
+
|
|
20
|
+
When an artifact is published, all .la files found in the specified
|
|
21
|
+
directories will have their install prefix updated to the artifact's final path.
|
|
22
|
+
The original install prefix is stored in the artifact's strings metadata
|
|
23
|
+
under the key 'libtool_prefix' for use during unpacking.
|
|
24
|
+
|
|
25
|
+
:param dirs: List of directories inside the artifact to relocate .la files in.
|
|
26
|
+
|
|
27
|
+
"""
|
|
28
|
+
|
|
29
|
+
def decorate(cls):
|
|
30
|
+
original_publish = cls.publish
|
|
31
|
+
original_unpack = cls.unpack
|
|
32
|
+
|
|
33
|
+
def publish(self, artifact, tools):
|
|
34
|
+
original_publish(self, artifact, tools)
|
|
35
|
+
lt = Libtool(tools)
|
|
36
|
+
lt.relocate(artifact, dirs, prefix=artifact.strings.install_prefix)
|
|
37
|
+
artifact.libtool_prefix = artifact.final_path
|
|
38
|
+
|
|
39
|
+
def unpack(self, artifact, tools):
|
|
40
|
+
original_unpack(self, artifact, tools)
|
|
41
|
+
lt = Libtool(tools)
|
|
42
|
+
lt.relocate(artifact, dirs, prefix=artifact.strings.libtool_prefix)
|
|
43
|
+
artifact.strings.libtool_prefix = None
|
|
44
|
+
|
|
45
|
+
cls.publish = publish
|
|
46
|
+
cls.unpack = unpack
|
|
47
|
+
|
|
48
|
+
return cls
|
|
49
|
+
|
|
50
|
+
return decorate
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
def requires():
|
|
54
|
+
""" Decorator to add Libtool requirement to a task. """
|
|
55
|
+
|
|
56
|
+
import jolt.pkgs.libtool
|
|
57
|
+
|
|
58
|
+
def decorate(cls):
|
|
59
|
+
cls = attributes.requires("requires_libtool")(cls)
|
|
60
|
+
cls.requires_libtool = ["libtool"]
|
|
61
|
+
return cls
|
|
62
|
+
|
|
63
|
+
return decorate
|