pd4web 2.1.2__tar.gz → 2.2.0__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.
- {pd4web-2.1.2 → pd4web-2.2.0}/PKG-INFO +1 -1
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/pd4web/Builder.py +11 -1
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/pd4web/Libraries.py +7 -4
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/pd4web/Pd4Web.py +36 -26
- {pd4web-2.1.2 → pd4web-2.2.0}/pyproject.toml +1 -1
- {pd4web-2.1.2 → pd4web-2.2.0}/LICENSE +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/README.md +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/.clang-format +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/.prettierrc +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/.yamlftm +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/Libraries/Libraries.yaml +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/Libraries/ambi~.cmake +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/Libraries/cyclone.cmake +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/Libraries/earplug.cmake +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/Libraries/else.cmake +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/Libraries/libpd.cmake +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/Libraries/o.scofo~.cmake +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/Libraries/pd.cmake/.git +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/Libraries/pd.cmake/.github/workflows/c-cpp.yml +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/Libraries/pd.cmake/.gitignore +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/Libraries/pd.cmake/CMakeLists.txt +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/Libraries/pd.cmake/Examples/.clang-format +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/Libraries/pd.cmake/Examples/CMakeLists.txt +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/Libraries/pd.cmake/Examples/fft~/fft~-help.pd +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/Libraries/pd.cmake/Examples/fft~/fft~.cpp +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/Libraries/pd.cmake/Examples/simple/simple-help.pd +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/Libraries/pd.cmake/Examples/simple/simple-patch.pd +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/Libraries/pd.cmake/Examples/simple/simple.cpp +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/Libraries/pd.cmake/Examples/simple~/simple~-help.pd +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/Libraries/pd.cmake/Examples/simple~/simple~.cpp +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/Libraries/pd.cmake/LICENSE +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/Libraries/pd.cmake/README.md +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/Libraries/pd.cmake/Tests/01.Deprecated-Functions/CMakeLists.txt +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/Libraries/pd.cmake/Tests/CMakeLists.txt +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/Libraries/pd.cmake/pd.cmake +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/Libraries/pmpd.cmake +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/Libraries/timbreIDLib.cmake +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/Templates/1/bula.md +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/Templates/1/index.html +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/Templates/2/index.html +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/Templates/2/sketch.js +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/Templates/3/index.html +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/Templates/4/index.html +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/Templates/4/sketch.js +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/Templates/5/index.html +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/Templates/5/tutorial.md +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/__init__.py +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/cmake-format.yaml +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/config.h +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/externals.cpp +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/favicon.ico +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/index.html +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/nogui.html +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/pd4web/Compilers.py +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/pd4web/Objects.py +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/pd4web/Patch.py +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/pd4web/__init__.py +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/pd4web.cpp +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/pd4web.gitignore +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/pd4web.gui.js +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/pd4web.hpp +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/pd4web.midi.js +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/pd4web.style.css +0 -0
- {pd4web-2.1.2 → pd4web-2.2.0}/Sources/pd4web.threads.js +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: pd4web
|
|
3
|
-
Version: 2.
|
|
3
|
+
Version: 2.2.0
|
|
4
4
|
Summary: pd4web compiles PureData patches with external objects for Wasm, allowing to run entire patches in web browsers.
|
|
5
5
|
Home-page: https://charlesneimog.github.io/pd4web
|
|
6
6
|
Author: Charles K. Neimog
|
|
@@ -3,6 +3,7 @@ import re
|
|
|
3
3
|
import shutil
|
|
4
4
|
import subprocess
|
|
5
5
|
import importlib.metadata as importlib_metadata
|
|
6
|
+
import yaml
|
|
6
7
|
|
|
7
8
|
# from .Patch import PatchLine
|
|
8
9
|
from .Pd4Web import Pd4Web
|
|
@@ -42,6 +43,9 @@ class GetAndBuildExternals:
|
|
|
42
43
|
self.ConfigureProject()
|
|
43
44
|
self.CompileProject()
|
|
44
45
|
self.CopyExtraJsFiles()
|
|
46
|
+
|
|
47
|
+
# Save the project versions
|
|
48
|
+
self.SaveProjectVersions()
|
|
45
49
|
|
|
46
50
|
def InitVariables(self):
|
|
47
51
|
self.cmakeFile = []
|
|
@@ -498,8 +502,14 @@ class GetAndBuildExternals:
|
|
|
498
502
|
for file in files:
|
|
499
503
|
if not os.path.exists(self.Pd4Web.PROJECT_ROOT + "/WebPatch/" + file):
|
|
500
504
|
shutil.copy(os.path.join(root, file), self.Pd4Web.PROJECT_ROOT + "/WebPatch/")
|
|
501
|
-
|
|
502
505
|
os.chdir(cwd)
|
|
506
|
+
|
|
507
|
+
def SaveProjectVersions(self):
|
|
508
|
+
# check if file exists
|
|
509
|
+
if not os.path.exists(self.Pd4Web.PROJECT_ROOT + "/Pd4Web/versions.yaml"):
|
|
510
|
+
with open(self.Pd4Web.PROJECT_ROOT + "/Pd4Web/versions.yaml", "w") as f:
|
|
511
|
+
yaml.dump(self.Pd4Web.Version, f)
|
|
512
|
+
return
|
|
503
513
|
|
|
504
514
|
def __repr__(self) -> str:
|
|
505
515
|
return f"< GetCode Object >"
|
|
@@ -145,7 +145,7 @@ class ExternalLibraries:
|
|
|
145
145
|
commit = libRepo.head.peel()
|
|
146
146
|
return commit
|
|
147
147
|
|
|
148
|
-
def CloneLibrary(self,
|
|
148
|
+
def CloneLibrary(self, libData):
|
|
149
149
|
"""
|
|
150
150
|
Initializes submodules in the specified repository path.
|
|
151
151
|
|
|
@@ -158,11 +158,12 @@ class ExternalLibraries:
|
|
|
158
158
|
curr_commit: pygit2.Commit = libRepo.head.peel()
|
|
159
159
|
lib_commit: pygit2.Commit = self.getLibCommitVersion(libRepo, libData.version)
|
|
160
160
|
if curr_commit.id == lib_commit.id:
|
|
161
|
-
|
|
162
|
-
return
|
|
161
|
+
self.Pd4Web.Version["externals"][libData.name] = str(lib_commit.id)
|
|
162
|
+
return
|
|
163
163
|
libRepo.set_head(lib_commit.id)
|
|
164
164
|
libRepo.checkout_tree(lib_commit)
|
|
165
165
|
libRepo.reset(lib_commit.id, pygit2.GIT_RESET_HARD)
|
|
166
|
+
self.Pd4Web.Version["externals"][libData.name] = str(lib_commit.id)
|
|
166
167
|
return
|
|
167
168
|
|
|
168
169
|
libLink = f"https://github.com/{libData.dev}/{libData.repo}"
|
|
@@ -187,6 +188,8 @@ class ExternalLibraries:
|
|
|
187
188
|
submodule_collection.update()
|
|
188
189
|
except:
|
|
189
190
|
self.Pd4Web.exception("Failed to initialize submodules.")
|
|
191
|
+
|
|
192
|
+
self.Pd4Web.Version["externals"][libData.name] = str(commit.id)
|
|
190
193
|
|
|
191
194
|
# TODO: Try to merge commits from submodules
|
|
192
195
|
# try:
|
|
@@ -212,7 +215,7 @@ class ExternalLibraries:
|
|
|
212
215
|
os.mkdir(self.Pd4Web.APPDATA + "/Externals")
|
|
213
216
|
|
|
214
217
|
libFolder = self.Pd4Web.APPDATA + f"/Externals/{libData.name}"
|
|
215
|
-
self.CloneLibrary(
|
|
218
|
+
self.CloneLibrary(libData)
|
|
216
219
|
if not os.path.exists(self.PROJECT_ROOT + f"/Pd4Web/Externals/{libData.name}"):
|
|
217
220
|
self.Pd4Web.print(
|
|
218
221
|
f"Copying {libData.name} to Pd4Web/Externals...",
|
|
@@ -83,6 +83,41 @@ class Pd4Web:
|
|
|
83
83
|
|
|
84
84
|
self.Execute()
|
|
85
85
|
|
|
86
|
+
def InitVariables(self):
|
|
87
|
+
from .Objects import Objects
|
|
88
|
+
from .Libraries import ExternalLibraries
|
|
89
|
+
|
|
90
|
+
self.cpuCores = os.cpu_count()
|
|
91
|
+
self.usedObjects = []
|
|
92
|
+
self.patchLinesProcessed = []
|
|
93
|
+
self.uiReceiversSymbol = []
|
|
94
|
+
self.externalsSourceCode = []
|
|
95
|
+
self.externalsLinkLibraries = []
|
|
96
|
+
self.externalsLinkLibrariesFolders = []
|
|
97
|
+
self.externalsSetupFunctions = []
|
|
98
|
+
|
|
99
|
+
self.declaredLocalAbs = []
|
|
100
|
+
self.declaredLibsObjs = []
|
|
101
|
+
self.declaredPaths = []
|
|
102
|
+
self.processedAbs = []
|
|
103
|
+
|
|
104
|
+
# Versions
|
|
105
|
+
self.Version = {}
|
|
106
|
+
self.Version["python"] = f"{sys.version_info.major}.{sys.version_info.minor}.{sys.version_info.micro}"
|
|
107
|
+
self.Version["pure-data"] = self.PD_VERSION
|
|
108
|
+
self.Version["emsdk"] = self.EMSDK_VERSION
|
|
109
|
+
self.Version["pd4web"] = importlib_metadata.version("pd4web")
|
|
110
|
+
self.Version["externals"] = {}
|
|
111
|
+
|
|
112
|
+
self.Libraries: ExternalLibraries = ExternalLibraries(self)
|
|
113
|
+
self.Objects: Objects = Objects(self)
|
|
114
|
+
|
|
115
|
+
self.env = os.environ.copy()
|
|
116
|
+
python_dir = os.path.dirname(sys.executable)
|
|
117
|
+
self.env["PATH"] = f"{python_dir};{self.env['PATH']}"
|
|
118
|
+
self.env["PYTHON"] = sys.executable
|
|
119
|
+
self.env["EMSDK_QUIET"] = "1"
|
|
120
|
+
|
|
86
121
|
def Execute(self):
|
|
87
122
|
from .Builder import GetAndBuildExternals
|
|
88
123
|
from .Compilers import ExternalsCompiler
|
|
@@ -156,32 +191,7 @@ class Pd4Web:
|
|
|
156
191
|
if not os.path.exists(self.APPDATA):
|
|
157
192
|
os.makedirs(self.APPDATA)
|
|
158
193
|
|
|
159
|
-
|
|
160
|
-
from .Objects import Objects
|
|
161
|
-
from .Libraries import ExternalLibraries
|
|
162
|
-
|
|
163
|
-
self.cpuCores = os.cpu_count()
|
|
164
|
-
self.usedObjects = []
|
|
165
|
-
self.patchLinesProcessed = []
|
|
166
|
-
self.uiReceiversSymbol = []
|
|
167
|
-
self.externalsSourceCode = []
|
|
168
|
-
self.externalsLinkLibraries = []
|
|
169
|
-
self.externalsLinkLibrariesFolders = []
|
|
170
|
-
self.externalsSetupFunctions = []
|
|
171
|
-
|
|
172
|
-
self.declaredLocalAbs = []
|
|
173
|
-
self.declaredLibsObjs = []
|
|
174
|
-
self.declaredPaths = []
|
|
175
|
-
self.processedAbs = []
|
|
176
|
-
|
|
177
|
-
self.Libraries = ExternalLibraries(self)
|
|
178
|
-
self.Objects: Objects = Objects(self)
|
|
179
|
-
|
|
180
|
-
self.env = os.environ.copy()
|
|
181
|
-
python_dir = os.path.dirname(sys.executable)
|
|
182
|
-
self.env["PATH"] = f"{python_dir};{self.env['PATH']}"
|
|
183
|
-
self.env["PYTHON"] = sys.executable
|
|
184
|
-
self.env["EMSDK_QUIET"] = "1"
|
|
194
|
+
|
|
185
195
|
|
|
186
196
|
def DownloadZip(self, url, filename, what=""):
|
|
187
197
|
self.print(f"Downloading {what}...", color="green", silence=self.SILENCE)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "pd4web"
|
|
3
|
-
version = "2.
|
|
3
|
+
version = "2.2.0"
|
|
4
4
|
description = "pd4web compiles PureData patches with external objects for Wasm, allowing to run entire patches in web browsers."
|
|
5
5
|
authors = ["Charles K. Neimog <charlesneimog@outlook.com>"]
|
|
6
6
|
readme = "README.md"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|