Skip to content

Commit c648a7d

Browse files
committed
merged mambo into mamba
1 parent a4a407c commit c648a7d

21 files changed

+273
-2325
lines changed

CHANGELOG.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
1919

2020
- Changed the main `CMakeLists.txt` file to enable single-project build options.
2121

22-
- Added `mambo` external which uses a new way of building relocatable python3 externals. It includes a tweaked version of the `mamba` single-header c-based python3 library, and makes use of a slightly modified version of the `source/scripts/buildpy.py` script which was [developed externally](https://github.com/shakfu/buildpy). So far, shared, static, and framework builds are possible via: `make mambo-shared`, `make mambo-static` and `make mambo-framework` respectively.
22+
- Merged `mambo` features into `mamba`. `mambo` is removed as a separate subproject.
23+
24+
- Added `mambo` variant of `mamba` which uses a new way of building relocatable python3 externals. It includes a tweaked version of the `mamba` single-header c-based python3 library, and makes use of a slightly modified version of the `source/scripts/buildpy.py` script which was [developed externally](https://github.com/shakfu/buildpy). So far, shared, static, and framework builds are possible via: `make mambo-shared`, `make mambo-static` and `make mambo-framework` respectively.
2325

2426
- Added additional 'category' folders in `py-js/source` to improve classification of externals
2527

CMakeLists.txt

-6
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ option(BUILD_ZEDIT_EXTERNAL "Build the zedit external" OFF)
2727
option(BUILD_ZPY_EXTERNAL "Build the zpy external" OFF)
2828
option(BUILD_ZTHREAD_EXTERNAL "Build the zthread external" OFF)
2929
option(BUILD_JMX_EXTERNAL "Build the jmx external" OFF)
30-
option(BUILD_MAMBO_EXTERNAL "Build the mambo external" OFF)
3130

3231
# micropython external build options
3332
option(FETCH_MICROPYTHON "Download latest micropython and use that to build external" OFF)
@@ -101,7 +100,6 @@ if(BUILD_PYTHON3_EXPERIMENTAL_EXTERNALS)
101100
set(BUILD_COBRA_EXTERNAL ON)
102101
set(BUILD_KRAIT_EXTERNAL ON)
103102
set(BUILD_MAMBA_EXTERNAL ON)
104-
set(BUILD_MAMBO_EXTERNAL ON)
105103
set(BUILD_MXPY_EXTERNAL ON)
106104
endif()
107105

@@ -158,10 +156,6 @@ if(BUILD_MAMBA_EXTERNAL)
158156
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/source/projects/mamba)
159157
endif()
160158

161-
if(BUILD_MAMBO_EXTERNAL)
162-
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/source/projects/mambo)
163-
endif()
164-
165159
if(BUILD_MXPY_EXTERNAL)
166160
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/source/projects/mxpy)
167161
endif()

FAQ.md

+2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ Definitely, if python is installed using [Homebrew](https://brew.sh) you can cre
2828

2929
The `make default` build creates a lightweight external dynamically linked to your local python3 interpreter; other build variants such as `framework-pkg` embeds python3 into an external that is dynamically linked to a python3 interpreter which is part of the containing Max package; and another such as `framework-ext` embeds python into the external itself without any dependencies. There are other ways as well. The section, [Building self-contained Python3 Externals for Packages and Standalones](https://github.com/shakfu/py-js/tree/main/source/projects/py#building-self-contained-python3-externals-for-packages-and-standalones), gives an overview of the different approaches.
3030

31+
Recent work on the `mamba` single-header c library project makes it possible build relocatable python3 externals along the lines of what is possible with `py` and `pyjs`
32+
3133
## Installation
3234

3335
### Can I use two different python3 externals in the same patch?

Makefile

+18-17
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ all: default
125125
framework-pkg framework-ext \
126126
shared-pkg shared-ext shared-tiny-ext \
127127
static-pkg static-ext static-tiny-ext \
128-
mambo mambo-static mambo-shared \
129-
mambo-framework mambo-framework-pkg \
128+
mamba mamba-static mamba-shared \
129+
mamba-framework mamba-framework-pkg \
130130
jmx zthread
131131

132132
# -----------------------------------------------------------------------
@@ -159,56 +159,57 @@ projects: clean-build-dir clean-externals
159159
&& \
160160
cmake --build . --config Release
161161

162-
mambo: clean-externals
163-
$(call section,"building mambo")
162+
mamba: clean-externals
163+
$(call section,"building mamba")
164164
@mkdir -p build && \
165165
cd build && \
166166
cmake -GXcode .. \
167-
-DBUILD_MAMBO_EXTERNAL=ON \
167+
-DBUILD_MAMBA_EXTERNAL=ON \
168168
-DBUILD_VARIANT=local \
169169
&& \
170170
cmake --build . --config Release
171171

172-
mambo-static: clean-externals
173-
$(call section,"building mambo-static")
172+
173+
mamba-static: clean-externals
174+
$(call section,"building mamba-static")
174175
@./source/scripts/buildpy.py -c static-mid
175176
@mkdir -p build && \
176177
cd build && \
177178
cmake -GXcode .. \
178-
-DBUILD_MAMBO_EXTERNAL=ON \
179+
-DBUILD_MAMBA_EXTERNAL=ON \
179180
-DBUILD_VARIANT=static-ext \
180181
&& \
181182
cmake --build . --config Release
182183

183-
mambo-shared: clean-externals
184-
$(call section,"building mambo-shared")
184+
mamba-shared: clean-externals
185+
$(call section,"building mamba-shared")
185186
@./source/scripts/buildpy.py -c shared-mid
186187
@mkdir -p build && \
187188
cd build && \
188189
cmake -GXcode .. \
189-
-DBUILD_MAMBO_EXTERNAL=ON \
190+
-DBUILD_MAMBA_EXTERNAL=ON \
190191
-DBUILD_VARIANT=shared-ext \
191192
&& \
192193
cmake --build . --config Release
193194

194-
mambo-framework: clean-externals
195-
$(call section,"building mambo-framework")
195+
mamba-framework: clean-externals
196+
$(call section,"building mamba-framework")
196197
@./source/scripts/buildpy.py -c framework-mid
197198
@mkdir -p build && \
198199
cd build && \
199200
cmake -GXcode .. \
200-
-DBUILD_MAMBO_EXTERNAL=ON \
201+
-DBUILD_MAMBA_EXTERNAL=ON \
201202
-DBUILD_VARIANT=framework-ext \
202203
&& \
203204
cmake --build . --config Release
204205

205-
mambo-framework-pkg: clean-externals
206-
$(call section,"building mambo-framework-pkg")
206+
mamba-framework-pkg: clean-externals
207+
$(call section,"building mamba-framework-pkg")
207208
@./source/scripts/buildpy.py --max-package -c framework-mid
208209
@mkdir -p build && \
209210
cd build && \
210211
cmake -GXcode .. \
211-
-DBUILD_MAMBO_EXTERNAL=ON \
212+
-DBUILD_MAMBA_EXTERNAL=ON \
212213
-DBUILD_VARIANT=framework-pkg \
213214
&& \
214215
cmake --build . --config Release

README.md

-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ name | sdk | lang | description
2828
name | sdk | lang | description
2929
:--------- | :--------- | :----: | :---------------------------------------------------
3030
[mamba] | max-sdk | c | single-header c library to nest a python3 interpreter in any external
31-
[mambo] | max-sdk | c | a `mamba` variant with a relocatable python3 interpreter (shared, static, framework)
3231
[krait] | max-sdk | c++ | single-header c++ library to nest a python3 interpreter in any external
3332
[cobra] | max-sdk | c | python3 external providing deferred and clocked function execution
3433
[mxpy] | max-sdk | c | a translation of [pdpython](https://github.com/shakfu/pdpython) into Max

0 commit comments

Comments
 (0)