Skip to content

Commit

Permalink
more updates
Browse files Browse the repository at this point in the history
  • Loading branch information
charlesneimog committed Dec 20, 2024
1 parent d9f73c0 commit 020defe
Show file tree
Hide file tree
Showing 15 changed files with 114 additions and 502 deletions.
19 changes: 19 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,15 @@ set(PDCMAKE_DIR
CACHE PATH "Path to pd.cmake")
include(${PDCMAKE_DIR}/pd.cmake)

if(CMAKE_BUILD_TYPE STREQUAL "Debug")
add_compile_definitions(PY4PD_DEBUG)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0") # Adds debugging symbols and disables optimization
message(STATUS "Building in Debug Mode")
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3 -DNDEBUG") # Optimized for Release mode, disables debugging symbols
message(STATUS "Building in Release Mode")
endif()

# ╭──────────────────────────────────────╮
# │ Object Definitions │
# ╰──────────────────────────────────────╯
Expand Down Expand Up @@ -36,6 +45,15 @@ endif()

message(STATUS "NumPy include directory: ${NUMPY_INCLUDE_DIR}")

# Print numpy version
execute_process(
COMMAND python${PYVERSION} -c "import numpy; print(numpy.__version__)"
OUTPUT_VARIABLE NUMPY_VERSION
OUTPUT_STRIP_TRAILING_WHITESPACE
RESULT_VARIABLE EXEC_RESULT)

message(STATUS "NumPy version: ${NUMPY_VERSION}")

# ──────────── Python Include ────────────
if(WIN32)
execute_process(
Expand Down Expand Up @@ -117,3 +135,4 @@ pd_add_datafile(py4pd "${PY4PD_HELP_FILES}")
pd_add_datafile(py4pd "${CMAKE_SOURCE_DIR}/Resources/py.py")
pd_add_datafile(py4pd "${CMAKE_SOURCE_DIR}/LICENSE")
pd_add_datafile(py4pd "${CMAKE_SOURCE_DIR}/README.md")
pd_add_datafile(py4pd "${CMAKE_SOURCE_DIR}/Resources/Help-Files/" DESTINATION "py4pd/help")
4 changes: 0 additions & 4 deletions Documentation/pd-users/methods.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ Next, I present all methods used in `py4pd` object. The methods are messages tha

Create a new `.py` script.

- :my-icons-pd: __[functions](#functions)__

Print all the functions inside a script.

- :my-icons-pd: __[reload](#reload)__

Reload the Python Function.
Expand Down
143 changes: 0 additions & 143 deletions Documentation/projects.md

This file was deleted.

18 changes: 7 additions & 11 deletions Documentation/projects/project1.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
!!! danger "Nerd stuff"
This is a section for people that run Python, check how to use the [`py4pd`](../pd-users/py4pd-module.md) library instead.

---

<div class="grid cards" markdown>

- :simple-python: [__Hello World__](project1.md)
- :simple-python: [__Simple Pd Object__](project2.md)
- :simple-python: [__First Library__](project3.md)
- :simple-python: [__Audio Processing__](project1.md)

</div>

# Project 1

Once you install Python and `py4pd`, the simple way to use Python inside PureData is by `.py` files. You must organize your work as
Expand Down Expand Up @@ -51,3 +40,10 @@ And after that you can use `[py4pd myscript mylistsum]` to load the object and a
<p align="center">
<img src="../../assets/project1-2.png" width="50%" loading="lazy" style="border-radius: 0px; box-shadow: 0px 4px 8px rgba(1, 0, 1, 0.2);">
</p>

---

<div class="grid cards" markdown>
- :simple-python: [__Simple Pd Object__](project2.md)
- :simple-python: [__First Library__](project3.md)
</div>
3 changes: 0 additions & 3 deletions Documentation/py4pd-libs/hello_world/README.md

This file was deleted.

101 changes: 0 additions & 101 deletions Documentation/python-users/file.md

This file was deleted.

4 changes: 4 additions & 0 deletions Documentation/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ hide:

=== ":material-linux: Linux"

!!! danger "Be careful of conflicts with numpy installed on the system"
Sometimes, if numpy is already installed on your system (with the same version), `py4pd` may not work. This is a known limitation, and I haven't found a solution for it yet besides **uninstall numpy from the system**. Be carefull.


On `Linux`:

* Open the terminal.
Expand Down
Loading

0 comments on commit 020defe

Please sign in to comment.