jolt 0.9.342__py3-none-any.whl → 0.9.429__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 +47 -0
- jolt/cache.py +358 -159
- jolt/cli.py +71 -104
- jolt/config.py +14 -26
- jolt/filesystem.py +2 -2
- jolt/graph.py +56 -28
- jolt/influence.py +67 -2
- jolt/loader.py +150 -186
- jolt/log.py +12 -2
- jolt/manifest.py +0 -46
- jolt/options.py +35 -12
- 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 +23 -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 +69 -0
- jolt/pkgs/zstd.py +33 -0
- jolt/plugins/autotools.py +66 -0
- jolt/plugins/cmake.py +74 -6
- jolt/plugins/conan.py +238 -0
- jolt/plugins/cxxinfo.py +7 -0
- jolt/plugins/docker.py +3 -3
- jolt/plugins/environ.py +11 -0
- jolt/plugins/fetch.py +141 -0
- jolt/plugins/gdb.py +10 -6
- jolt/plugins/git.py +60 -11
- jolt/plugins/libtool.py +63 -0
- jolt/plugins/linux.py +990 -0
- jolt/plugins/meson.py +61 -0
- jolt/plugins/ninja-compdb.py +11 -7
- jolt/plugins/ninja.py +245 -26
- jolt/plugins/paths.py +11 -1
- jolt/plugins/pkgconfig.py +219 -0
- jolt/plugins/podman.py +15 -41
- jolt/plugins/python.py +137 -0
- jolt/plugins/rust.py +25 -0
- jolt/plugins/scheduler.py +18 -14
- jolt/plugins/selfdeploy/setup.py +2 -1
- jolt/plugins/selfdeploy.py +21 -30
- jolt/plugins/strings.py +19 -10
- jolt/scheduler.py +428 -138
- jolt/tasks.py +159 -7
- jolt/tools.py +105 -51
- jolt/utils.py +16 -1
- jolt/version.py +1 -1
- {jolt-0.9.342.dist-info → jolt-0.9.429.dist-info}/METADATA +64 -9
- jolt-0.9.429.dist-info/RECORD +207 -0
- {jolt-0.9.342.dist-info → jolt-0.9.429.dist-info}/WHEEL +1 -1
- jolt/plugins/debian.py +0 -338
- jolt/plugins/repo.py +0 -253
- jolt-0.9.342.dist-info/RECORD +0 -93
- {jolt-0.9.342.dist-info → jolt-0.9.429.dist-info}/entry_points.txt +0 -0
- {jolt-0.9.342.dist-info → jolt-0.9.429.dist-info}/top_level.txt +0 -0
jolt/plugins/selfdeploy.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import importlib_metadata
|
|
1
2
|
import os
|
|
2
|
-
import pkg_resources
|
|
3
3
|
|
|
4
4
|
from jolt import config
|
|
5
5
|
from jolt import filesystem as fs
|
|
@@ -12,12 +12,9 @@ from jolt.cache import ArtifactCache
|
|
|
12
12
|
from jolt.error import raise_error_if
|
|
13
13
|
from jolt.graph import GraphBuilder
|
|
14
14
|
from jolt.loader import JoltLoader
|
|
15
|
-
from jolt.manifest import JoltManifest
|
|
16
15
|
from jolt.scheduler import JoltEnvironment
|
|
17
16
|
from jolt.scheduler import LocalExecutor
|
|
18
17
|
from jolt.scheduler import LocalExecutorFactory
|
|
19
|
-
from jolt.scheduler import NetworkExecutorExtension
|
|
20
|
-
from jolt.scheduler import NetworkExecutorExtensionFactory
|
|
21
18
|
from jolt.tasks import Task, TaskRegistry
|
|
22
19
|
|
|
23
20
|
|
|
@@ -99,43 +96,37 @@ class Jolt(Task):
|
|
|
99
96
|
artifact.collect(fs.path.basename(e))
|
|
100
97
|
|
|
101
98
|
|
|
102
|
-
class SelfDeployExtension(NetworkExecutorExtension):
|
|
103
|
-
@utils.cached.instance
|
|
104
|
-
def get_parameters(self, _):
|
|
105
|
-
client = get_client()
|
|
106
|
-
params = {}
|
|
107
|
-
if client.identity:
|
|
108
|
-
params["jolt_identity"] = client.identity
|
|
109
|
-
if client.url:
|
|
110
|
-
params["jolt_url"] = client.url
|
|
111
|
-
return params
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
@NetworkExecutorExtensionFactory.Register
|
|
115
|
-
class SelfDeployExtensionFactory(NetworkExecutorExtensionFactory):
|
|
116
|
-
def create(self):
|
|
117
|
-
return SelfDeployExtension()
|
|
118
|
-
|
|
119
|
-
|
|
120
99
|
@utils.cached.method
|
|
121
100
|
def get_dependencies(packages=None):
|
|
122
101
|
reqs = packages or ["jolt"]
|
|
123
102
|
pkgs = {}
|
|
103
|
+
skip = set()
|
|
124
104
|
|
|
125
105
|
while reqs:
|
|
126
106
|
req = reqs.pop()
|
|
127
107
|
|
|
128
|
-
|
|
108
|
+
try:
|
|
109
|
+
dist = importlib_metadata.distribution(req)
|
|
110
|
+
except (ImportError, importlib_metadata.PackageNotFoundError):
|
|
111
|
+
dist = None
|
|
112
|
+
except Exception:
|
|
113
|
+
dist = None
|
|
129
114
|
if dist is None:
|
|
130
|
-
|
|
131
|
-
pkgs[req] = req
|
|
115
|
+
skip.add(req)
|
|
132
116
|
continue
|
|
133
117
|
|
|
134
|
-
for dep in dist.requires
|
|
135
|
-
|
|
136
|
-
|
|
118
|
+
for dep in dist.requires or []:
|
|
119
|
+
dep = dep.split(" ", 1)[0].strip()
|
|
120
|
+
dep = dep.split("[", 1)[0].strip()
|
|
121
|
+
dep = dep.split(";", 1)[0].strip()
|
|
122
|
+
dep = dep.split(">", 1)[0].strip()
|
|
123
|
+
dep = dep.split("=", 1)[0].strip()
|
|
124
|
+
dep = dep.split("<", 1)[0].strip()
|
|
125
|
+
dep = dep.split("!", 1)[0].strip()
|
|
126
|
+
if dep not in pkgs and dep not in skip:
|
|
127
|
+
reqs.append(dep)
|
|
137
128
|
|
|
138
|
-
pkgs[req] = f"{dist.
|
|
129
|
+
pkgs[req] = f"{dist.name}=={dist.version}"
|
|
139
130
|
|
|
140
131
|
try:
|
|
141
132
|
del pkgs["jolt"]
|
|
@@ -157,7 +148,7 @@ def publish_artifact():
|
|
|
157
148
|
registry.add_task_class(Jolt)
|
|
158
149
|
acache = ArtifactCache.get()
|
|
159
150
|
env = JoltEnvironment(cache=acache, queue=None)
|
|
160
|
-
gb = GraphBuilder(registry, acache
|
|
151
|
+
gb = GraphBuilder(registry, acache)
|
|
161
152
|
dag = gb.build(["jolt"])
|
|
162
153
|
task = dag.select(lambda graph, task: True)
|
|
163
154
|
assert len(task) == 1, "Too many selfdeploy tasks found"
|
jolt/plugins/strings.py
CHANGED
|
@@ -2,23 +2,34 @@ from jolt.cache import ArtifactAttributeSetProvider
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
class StringVariableSet(object):
|
|
5
|
+
"""
|
|
6
|
+
A set of string variables for an artifact.
|
|
7
|
+
|
|
8
|
+
Example:
|
|
9
|
+
|
|
10
|
+
.. code-block:: python
|
|
11
|
+
|
|
12
|
+
artifact.strings.foo = "bar"
|
|
13
|
+
print(artifact.strings.foo)
|
|
14
|
+
|
|
15
|
+
"""
|
|
16
|
+
|
|
5
17
|
def __init__(self, artifact):
|
|
6
18
|
super(StringVariableSet, self).__setattr__("_attributes", {})
|
|
19
|
+
super(StringVariableSet, self).__setattr__("_artifact", artifact)
|
|
7
20
|
|
|
8
21
|
def _get_attributes(self):
|
|
9
22
|
return self._attributes
|
|
10
23
|
|
|
11
24
|
def __getattr__(self, name):
|
|
12
25
|
attributes = self._get_attributes()
|
|
13
|
-
|
|
14
|
-
return None
|
|
15
|
-
return attributes[name]
|
|
26
|
+
return attributes.get(name, None)
|
|
16
27
|
|
|
17
28
|
def __setattr__(self, name, value):
|
|
18
29
|
if not isinstance(value, str):
|
|
19
30
|
raise ValueError(f"Value assigned to artifact.strings.{name} must be a string, got {type(value)}")
|
|
20
31
|
attributes = self._get_attributes()
|
|
21
|
-
attributes[name] = value
|
|
32
|
+
attributes[name] = self._artifact.tools.expand(value)
|
|
22
33
|
return value
|
|
23
34
|
|
|
24
35
|
def __dict__(self):
|
|
@@ -30,6 +41,10 @@ class StringVariableSet(object):
|
|
|
30
41
|
|
|
31
42
|
@ArtifactAttributeSetProvider.Register
|
|
32
43
|
class StringVariableSetProvider(ArtifactAttributeSetProvider):
|
|
44
|
+
"""
|
|
45
|
+
A provider of string variable sets.
|
|
46
|
+
"""
|
|
47
|
+
|
|
33
48
|
def create(self, artifact):
|
|
34
49
|
setattr(artifact, "strings", StringVariableSet(artifact))
|
|
35
50
|
|
|
@@ -46,9 +61,3 @@ class StringVariableSetProvider(ArtifactAttributeSetProvider):
|
|
|
46
61
|
|
|
47
62
|
for key, value in artifact.strings.items():
|
|
48
63
|
content["strings"][key] = str(value)
|
|
49
|
-
|
|
50
|
-
def apply(self, task, artifact):
|
|
51
|
-
pass
|
|
52
|
-
|
|
53
|
-
def unapply(self, task, artifact):
|
|
54
|
-
pass
|