pd4web 2.0.0__tar.gz → 2.0.2__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.
Files changed (55) hide show
  1. {pd4web-2.0.0 → pd4web-2.0.2}/PKG-INFO +3 -29
  2. {pd4web-2.0.0 → pd4web-2.0.2}/README.md +2 -28
  3. {pd4web-2.0.0 → pd4web-2.0.2}/Sources/Libraries/else.cmake +3 -2
  4. {pd4web-2.0.0 → pd4web-2.0.2}/Sources/pd4web/Libraries.py +23 -13
  5. {pd4web-2.0.0 → pd4web-2.0.2}/Sources/pd4web/Patch.py +2 -0
  6. {pd4web-2.0.0 → pd4web-2.0.2}/pyproject.toml +1 -1
  7. {pd4web-2.0.0 → pd4web-2.0.2}/LICENSE +0 -0
  8. {pd4web-2.0.0 → pd4web-2.0.2}/Sources/.clang-format +0 -0
  9. {pd4web-2.0.0 → pd4web-2.0.2}/Sources/.prettierrc +0 -0
  10. {pd4web-2.0.0 → pd4web-2.0.2}/Sources/.yamlftm +0 -0
  11. {pd4web-2.0.0 → pd4web-2.0.2}/Sources/Libraries/Libraries.yaml +0 -0
  12. {pd4web-2.0.0 → pd4web-2.0.2}/Sources/Libraries/cyclone.cmake +0 -0
  13. {pd4web-2.0.0 → pd4web-2.0.2}/Sources/Libraries/earplug.cmake +0 -0
  14. {pd4web-2.0.0 → pd4web-2.0.2}/Sources/Libraries/libpd.cmake +0 -0
  15. {pd4web-2.0.0 → pd4web-2.0.2}/Sources/Libraries/o.scofo~.cmake +0 -0
  16. {pd4web-2.0.0 → pd4web-2.0.2}/Sources/Libraries/pd.cmake/.git +0 -0
  17. {pd4web-2.0.0 → pd4web-2.0.2}/Sources/Libraries/pd.cmake/.github/workflows/c-cpp.yml +0 -0
  18. {pd4web-2.0.0 → pd4web-2.0.2}/Sources/Libraries/pd.cmake/.gitignore +0 -0
  19. {pd4web-2.0.0 → pd4web-2.0.2}/Sources/Libraries/pd.cmake/CMakeLists.txt +0 -0
  20. {pd4web-2.0.0 → pd4web-2.0.2}/Sources/Libraries/pd.cmake/Examples/.clang-format +0 -0
  21. {pd4web-2.0.0 → pd4web-2.0.2}/Sources/Libraries/pd.cmake/Examples/CMakeLists.txt +0 -0
  22. {pd4web-2.0.0 → pd4web-2.0.2}/Sources/Libraries/pd.cmake/Examples/fft~/fft~-help.pd +0 -0
  23. {pd4web-2.0.0 → pd4web-2.0.2}/Sources/Libraries/pd.cmake/Examples/fft~/fft~.cpp +0 -0
  24. {pd4web-2.0.0 → pd4web-2.0.2}/Sources/Libraries/pd.cmake/Examples/simple/simple-help.pd +0 -0
  25. {pd4web-2.0.0 → pd4web-2.0.2}/Sources/Libraries/pd.cmake/Examples/simple/simple-patch.pd +0 -0
  26. {pd4web-2.0.0 → pd4web-2.0.2}/Sources/Libraries/pd.cmake/Examples/simple/simple.cpp +0 -0
  27. {pd4web-2.0.0 → pd4web-2.0.2}/Sources/Libraries/pd.cmake/Examples/simple~/simple~-help.pd +0 -0
  28. {pd4web-2.0.0 → pd4web-2.0.2}/Sources/Libraries/pd.cmake/Examples/simple~/simple~.cpp +0 -0
  29. {pd4web-2.0.0 → pd4web-2.0.2}/Sources/Libraries/pd.cmake/LICENSE +0 -0
  30. {pd4web-2.0.0 → pd4web-2.0.2}/Sources/Libraries/pd.cmake/README.md +0 -0
  31. {pd4web-2.0.0 → pd4web-2.0.2}/Sources/Libraries/pd.cmake/Tests/01.Deprecated-Functions/CMakeLists.txt +0 -0
  32. {pd4web-2.0.0 → pd4web-2.0.2}/Sources/Libraries/pd.cmake/Tests/CMakeLists.txt +0 -0
  33. {pd4web-2.0.0 → pd4web-2.0.2}/Sources/Libraries/pd.cmake/pd.cmake +0 -0
  34. {pd4web-2.0.0 → pd4web-2.0.2}/Sources/Libraries/pmpd.cmake +0 -0
  35. {pd4web-2.0.0 → pd4web-2.0.2}/Sources/Libraries/timbreIDLib.cmake +0 -0
  36. {pd4web-2.0.0 → pd4web-2.0.2}/Sources/__init__.py +0 -0
  37. {pd4web-2.0.0 → pd4web-2.0.2}/Sources/cmake-format.yaml +0 -0
  38. {pd4web-2.0.0 → pd4web-2.0.2}/Sources/config.h +0 -0
  39. {pd4web-2.0.0 → pd4web-2.0.2}/Sources/externals.cpp +0 -0
  40. {pd4web-2.0.0 → pd4web-2.0.2}/Sources/favicon.ico +0 -0
  41. {pd4web-2.0.0 → pd4web-2.0.2}/Sources/index.html +0 -0
  42. {pd4web-2.0.0 → pd4web-2.0.2}/Sources/pd4web/Builder.py +0 -0
  43. {pd4web-2.0.0 → pd4web-2.0.2}/Sources/pd4web/Compilers.py +0 -0
  44. {pd4web-2.0.0 → pd4web-2.0.2}/Sources/pd4web/Emscripten.py +0 -0
  45. {pd4web-2.0.0 → pd4web-2.0.2}/Sources/pd4web/Helpers.py +0 -0
  46. {pd4web-2.0.0 → pd4web-2.0.2}/Sources/pd4web/Objects.py +0 -0
  47. {pd4web-2.0.0 → pd4web-2.0.2}/Sources/pd4web/Pd4Web.py +0 -0
  48. {pd4web-2.0.0 → pd4web-2.0.2}/Sources/pd4web/__init__.py +0 -0
  49. {pd4web-2.0.0 → pd4web-2.0.2}/Sources/pd4web.cpp +0 -0
  50. {pd4web-2.0.0 → pd4web-2.0.2}/Sources/pd4web.gitignore +0 -0
  51. {pd4web-2.0.0 → pd4web-2.0.2}/Sources/pd4web.gui.js +0 -0
  52. {pd4web-2.0.0 → pd4web-2.0.2}/Sources/pd4web.hpp +0 -0
  53. {pd4web-2.0.0 → pd4web-2.0.2}/Sources/pd4web.midi.js +0 -0
  54. {pd4web-2.0.0 → pd4web-2.0.2}/Sources/pd4web.style.css +0 -0
  55. {pd4web-2.0.0 → pd4web-2.0.2}/Sources/pd4web.threads.js +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pd4web
3
- Version: 2.0.0
3
+ Version: 2.0.2
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
@@ -42,40 +42,14 @@ Description-Content-Type: text/markdown
42
42
  </p>
43
43
 
44
44
  <p align="center">
45
- <a href="https://github.com/charlesneimog/pd4web/actions/workflows/pd4web-tests.yml"><img src="https://github.com/charlesneimog/pd4web/actions/workflows/pd4web-tests.yml/badge.svg" alt="Tests"></a>
45
+ <a href="https://github.com/charlesneimog/pd4web/actions/workflows/pd4web-tests.yml"><img src="https://github.com/charlesneimog/pd4web/actions/workflows/Tests.yml/badge.svg" alt="Tests"></a>
46
46
  </p>
47
47
 
48
48
  `pd4web` lets you run PureData patches directly in web browsers. It stands out from alternatives like [hvcc](https://github.com/Wasted-Audio/hvcc) and [WebPd](https://github.com/sebpiq/WebPd) by compiling the source code of [libpd](https://github.com/libpd/libpd), thanks to the work of [claudeha](https://github.com/claudeha). With `pd4web`, you can compile any PureData Vanilla patch, along with a list of more than 800 externals and abstractions.
49
49
 
50
50
  <h3 align="center">Examples</h3>
51
- <p align="center">Click to Expand!</p>
52
51
 
53
- <details>
54
- <summary><b>1. Simple Patch</b></summary>
55
- <p align="center">
56
- <img src="https://github.com/charlesneimog/pd4web/blob/main/docs/img/Simple-patch.png" width="80%" alt="Logo">
57
- </p>
58
- </details>
59
-
60
- <details>
61
- <summary><b>2. Interaction with p5js</b></summary>
62
- <p align="center">
63
- <img src="https://github.com/charlesneimog/pd4web/blob/main/docs/img/Compiled-I.png" width="70%" alt="Logo">
64
- </p>
65
- <p align="center">
66
- <a href="https://charlesneimog.github.io/Projeto/">WebSite</a>
67
- </p>
68
- </details>
69
-
70
- <details>
71
- <summary><b>3. Live Score (VexFlow) </b></summary>
72
- <p align="center">
73
- <img src="https://github.com/charlesneimog/pd4web/blob/main/docs/img/Canticos.png" width="70%" alt="Logo">
74
- </p>
75
- <p align="center">
76
- <a href="https://charlesneimog.github.io/Canticos-de-Silicio-I/webpatch/">WebSite</a>
77
- </p>
78
- </details>
52
+ * Check some examples [here](https://charlesneimog.github.io/pd4web/tests/).
79
53
 
80
54
  -----
81
55
  <h3 align="center">Questions, doubts, help</h3>
@@ -20,40 +20,14 @@
20
20
  </p>
21
21
 
22
22
  <p align="center">
23
- <a href="https://github.com/charlesneimog/pd4web/actions/workflows/pd4web-tests.yml"><img src="https://github.com/charlesneimog/pd4web/actions/workflows/pd4web-tests.yml/badge.svg" alt="Tests"></a>
23
+ <a href="https://github.com/charlesneimog/pd4web/actions/workflows/pd4web-tests.yml"><img src="https://github.com/charlesneimog/pd4web/actions/workflows/Tests.yml/badge.svg" alt="Tests"></a>
24
24
  </p>
25
25
 
26
26
  `pd4web` lets you run PureData patches directly in web browsers. It stands out from alternatives like [hvcc](https://github.com/Wasted-Audio/hvcc) and [WebPd](https://github.com/sebpiq/WebPd) by compiling the source code of [libpd](https://github.com/libpd/libpd), thanks to the work of [claudeha](https://github.com/claudeha). With `pd4web`, you can compile any PureData Vanilla patch, along with a list of more than 800 externals and abstractions.
27
27
 
28
28
  <h3 align="center">Examples</h3>
29
- <p align="center">Click to Expand!</p>
30
29
 
31
- <details>
32
- <summary><b>1. Simple Patch</b></summary>
33
- <p align="center">
34
- <img src="https://github.com/charlesneimog/pd4web/blob/main/docs/img/Simple-patch.png" width="80%" alt="Logo">
35
- </p>
36
- </details>
37
-
38
- <details>
39
- <summary><b>2. Interaction with p5js</b></summary>
40
- <p align="center">
41
- <img src="https://github.com/charlesneimog/pd4web/blob/main/docs/img/Compiled-I.png" width="70%" alt="Logo">
42
- </p>
43
- <p align="center">
44
- <a href="https://charlesneimog.github.io/Projeto/">WebSite</a>
45
- </p>
46
- </details>
47
-
48
- <details>
49
- <summary><b>3. Live Score (VexFlow) </b></summary>
50
- <p align="center">
51
- <img src="https://github.com/charlesneimog/pd4web/blob/main/docs/img/Canticos.png" width="70%" alt="Logo">
52
- </p>
53
- <p align="center">
54
- <a href="https://charlesneimog.github.io/Canticos-de-Silicio-I/webpatch/">WebSite</a>
55
- </p>
56
- </details>
30
+ * Check some examples [here](https://charlesneimog.github.io/pd4web/tests/).
57
31
 
58
32
  -----
59
33
  <h3 align="center">Questions, doubts, help</h3>
@@ -461,14 +461,15 @@ file(GLOB BTF_SRC "${CIRCUIT_ROOT}/Libraries/BTF/*.c")
461
461
  file(GLOB COLAMD_SRC "${CIRCUIT_ROOT}/Libraries/COLAMD/*.c")
462
462
  file(GLOB COLAMD_SRC "${CIRCUIT_ROOT}/Libraries/COLAMD/*.c")
463
463
  file(GLOB KLU_SRC "${CIRCUIT_ROOT}/Libraries/KLU/*.c")
464
- file(GLOB SAMPLERATE_SRC "${CIRCUIT_ROOT}/Libraries/libsamplerate/*.c")
464
+ file(GLOB SR_SRC "${LIB_DIR}/Source/Shared/libsamplerate/*.c")
465
465
  set(SUITE_SRC "${CIRCUIT_ROOT}/Libraries/SuiteSparse_config/SuiteSparse_config.c")
466
+
466
467
  set(SIMULATOR_SRC "${CIRCUIT_ROOT}/Source/Simulator.cpp")
467
468
  set(CIRCUIT_SRC "${CIRCUIT_ROOT}/Source/circuit~.c")
468
469
 
469
470
  pd_add_external(
470
471
  circuit~
471
- "${CIRCUIT_SRC};${AMD_SRC};${BTF_SRC};${COLAMD_SRC};${KLU_SRC};${SAMPLERATE_SRC};${SUITE_SRC};${SIMULATOR_SRC}"
472
+ "${CIRCUIT_SRC};${AMD_SRC};${BTF_SRC};${COLAMD_SRC};${KLU_SRC};${SR_SRC};${SUITE_SRC};${SIMULATOR_SRC}"
472
473
  TARGET
473
474
  circuit_tilde)
474
475
 
@@ -156,8 +156,8 @@ class ExternalLibraries:
156
156
  path (str): The path to the repository containing submodules.
157
157
  """
158
158
  libPath = self.Pd4Web.APPDATA + "/Externals/" + libData.name
159
- libRepo: pygit2.Repository = pygit2.Repository(libPath)
160
159
  if os.path.exists(libPath):
160
+ libRepo: pygit2.Repository = pygit2.Repository(libPath)
161
161
  curr_commit: pygit2.Commit = libRepo.head.peel()
162
162
  lib_commit: pygit2.Commit = self.getLibCommitVersion(libRepo, libData.version)
163
163
  if curr_commit.id == lib_commit.id:
@@ -174,8 +174,9 @@ class ExternalLibraries:
174
174
  except Exception as e:
175
175
  raise Exception(f"Failed to clone repository: {str(e)}")
176
176
 
177
- tag_name = libData.version # Assuming libData.version contains either a tag or a commit hash
178
- commit = self.getLibCommitVersion(libRepo, tag_name)
177
+ libRepo: pygit2.Repository = pygit2.Repository(libPath)
178
+ tagName = libData.version # Assuming libData.version contains either a tag or a commit hash
179
+ commit = self.getLibCommitVersion(libRepo, tagName)
179
180
  libRepo.set_head(commit.id)
180
181
  libRepo.checkout_tree(commit)
181
182
  libRepo.reset(commit.id, pygit2.GIT_RESET_HARD)
@@ -186,19 +187,16 @@ class ExternalLibraries:
186
187
  submodule_collection = pygit2.submodules.SubmoduleCollection(pygit2.Repository(libPath))
187
188
  submodule_collection.init()
188
189
  submodule_collection.update()
189
- libName = libData.name
190
- libFolder = self.Pd4Web.PROJECT_ROOT + "/Pd4Web/Externals/" + libName
191
- self.Pd4Web.Objects.GetLibraryObjects(libFolder, libName)
192
190
  except:
193
191
  raise Exception("Failed to initialize submodules.")
194
192
 
195
193
  # TODO: Try to merge commits from submodules
196
- try:
197
- main_repo = pygit2.Repository(self.Pd4Web.PROJECT_ROOT)
198
- submodule_repo = pygit2.Repository(libPath)
199
-
200
- except Exception as e:
201
- raise Exception(f"Failed to merge submodule commits: {str(e)}")
194
+ # try:
195
+ # main_repo = pygit2.Repository(self.Pd4Web.PROJECT_ROOT)
196
+ # submodule_repo = pygit2.Repository(libPath)
197
+ #
198
+ # except Exception as e:
199
+ # raise Exception(f"Failed to merge submodule commits: {str(e)}")
202
200
 
203
201
  def GetLibrarySourceCode(
204
202
  self,
@@ -218,7 +216,19 @@ class ExternalLibraries:
218
216
  libFolder = self.Pd4Web.APPDATA + f"/Externals/{libData.name}"
219
217
  self.CloneLibrary(libFolder, libData)
220
218
  if not os.path.exists(self.PROJECT_ROOT + f"/Pd4Web/Externals/{libData.name}"):
221
- shutil.copytree(libFolder, self.PROJECT_ROOT + "/Pd4Web/Externals/" + libData.name, symlinks=False)
219
+
220
+ def ignore_symlinks(src, names):
221
+ return [name for name in names if os.path.islink(os.path.join(src, name))]
222
+
223
+ shutil.copytree(
224
+ libFolder,
225
+ self.PROJECT_ROOT + "/Pd4Web/Externals/" + libData.name,
226
+ symlinks=False,
227
+ ignore=ignore_symlinks,
228
+ dirs_exist_ok=True,
229
+ ignore_dangling_symlinks=True,
230
+ )
231
+
222
232
  return True
223
233
 
224
234
  def GetLibrarySourceCodeOld(
@@ -192,6 +192,8 @@ class Patch:
192
192
  externalsJson = os.path.join(self.PROJECT_ROOT, "Pd4Web/Externals/Objects.json")
193
193
  if not os.path.exists(externalsJson):
194
194
  self.Pd4Web.Libraries.GetLibrarySourceCode(line.library)
195
+ libFolder = self.Pd4Web.PROJECT_ROOT + "/Pd4Web/Externals/" + line.library
196
+ self.Pd4Web.Objects.GetLibraryObjects(libFolder, line.library)
195
197
 
196
198
  libAbs = []
197
199
  with open(externalsJson, "r") as file:
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "pd4web"
3
- version = "2.0.0"
3
+ version = "2.0.2"
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