Skip to content
46 changes: 46 additions & 0 deletions packages/boost-python/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
package:
name: boost-python
version: 1.90.0
tag:
- library
- static_library
source:
url: https://github.com/boostorg/boost/releases/download/boost-1.90.0/boost-1.90.0-b2-nodocs.tar.gz
Comment thread
fxcoudert marked this conversation as resolved.
sha256: e848446c6fec62d8a96b44ed7352238b3de040b8b9facd4d6963b32f541e00f5
extract_dir: boost-1.90.0

build:
type: static_library
script: |
export INSTALL_DIR=${WASM_LIBRARY_DIR}
./bootstrap.sh --prefix=${INSTALL_DIR} --with-libraries=python \
--with-python=python$PYMAJOR.$PYMINOR

# https://github.com/emscripten-core/emscripten/issues/17052
# Without this, boost outputs WASM modules not static library archives as an output.
# I don't understand why... the jam file used by boost is quite hard to understand.
printf "using clang : emscripten : emcc : <archiver>emar <ranlib>emranlib <linker>emlink ;\n" | tee -a ./project-config.jam

# Bypass the standard python detection in the build system
sed -i 's/using python/#using python/' ./project-config.jam
printf "using python : $PYMAJOR.$PYMINOR : python$PYMAJOR.$PYMINOR : $PYTHONINCLUDE : $HOSTINSTALLDIR/lib/python$PYMAJOR.$PYMINOR.a ;\n" | tee -a ./project-config.jam

# Work around emscripten limited support in boost-container
# https://github.com/boostorg/container/issues/276
sed -i 's/#if defined(BOOST_HAS_PTHREADS)/#if 1/' ./boost/container/detail/thread_mutex.hpp

./b2 variant=release toolset=clang-emscripten link=static threading=single --disable-icu \
cxxflags="$SIDE_MODULE_CXXFLAGS -fwasm-exceptions -DBOOST_SP_DISABLE_THREADS=1" \
cflags="$SIDE_MODULE_CFLAGS -fwasm-exceptions -DBOOST_SP_DISABLE_THREADS=1" \
linkflags="-fpic $SIDE_MODULE_LDFLAGS" \
python=$PYMAJOR.$PYMINOR \
--layout=system -j"${PYODIDE_JOBS:-3}" --prefix=${INSTALL_DIR} \
-d2 install

about:
home: https://www.boost.org/
summary: Free peer-reviewed portable C++ source libraries.
license: Boost
extra:
recipe-maintainers:
- johnwason
67 changes: 67 additions & 0 deletions packages/rdkit/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
package:
name: rdkit
version: 2025.9.5
source:
url: https://github.com/rdkit/rdkit/archive/refs/tags/Release_2025_09_5.tar.gz
sha256: 1ac784a5f83a7db10aa50be0cd213eba7c1f3436ed4da12363e57589b571db46
requirements:
host:
- boost-python
- matplotlib
- numpy
- pandas
run:
- matplotlib
- numpy
- pandas

build:
script: |
export INSTALL_DIR=${WASM_LIBRARY_DIR}
export NUMPY_INCLUDE_DIR="$HOSTINSTALLDIR/lib/python$PYMAJOR.$PYMINOR/site-packages/numpy/_core/include/"
echo '============================================'
find $INSTALL_DIR
echo '============================================'
emcmake cmake -DCMAKE_INSTALL_PREFIX=${INSTALL_DIR} \
-DCMAKE_BUILD_TYPE=Release \
-DRDK_INSTALL_INTREE=ON \
-DRDK_INSTALL_STATIC_LIBS=ON \
-DRDK_BUILD_CPP_TESTS=ON \
-DRDK_BUILD_PYTHON_WRAPPERS=ON \
-DRDK_BUILD_COORDGEN_SUPPORT=ON \
-DRDK_BUILD_MAEPARSER_SUPPORT=ON \
-DRDK_OPTIMIZE_POPCNT=ON \
-DRDK_BUILD_TEST_GZIP=ON \
-DRDK_BUILD_FREESASA_SUPPORT=ON \
-DRDK_BUILD_AVALON_SUPPORT=ON \
-DRDK_BUILD_INCHI_SUPPORT=ON \
-DRDK_BUILD_YAEHMOP_SUPPORT=ON \
-DRDK_BUILD_XYZ2MOL_SUPPORT=ON \
-DRDK_BUILD_CAIRO_SUPPORT=ON \
-DRDK_BUILD_SWIG_WRAPPERS=OFF \
-DRDK_SWIG_STATIC=OFF \
-DRDK_BUILD_THREADSAFE_SSS=ON \
-DRDK_TEST_MULTITHREADED=ON \
-DRDK_BUILD_CFFI_LIB=ON \
-DBoost_INCLUDE_DIR=$WASM_LIBRARY_DIR/include \
-DBoost_LIBRARY_DIR=$WASM_LIBRARY_DIR/lib \
-DBoost_NO_SYSTEM_PATHS=ON \
-DRDK_BOOST_PYTHON3_NAME=python$PYMAJOR.$PYMINOR \
-DPython3_INCLUDE_DIRS=$PYTHONINCLUDE \
-DPython3_EXECUTABLE=python$PYMAJOR.$PYMINOR \
-DPython3_LIBRARY=$HOSTINSTALLDIR/lib/python$PYMAJOR.$PYMINOR.a \
-DPYTHON3_NUMPY_INCLUDE_DIRS=$NUMPY_INCLUDE_DIR \
-DCMAKE_INCLUDE_PATH="$WASM_LIBRARY_DIR/include" \
-DCMAKE_LIBRARY_PATH="$WASM_LIBRARY_DIR/lib"

emmake make -j 2
emmake make -j 2 install
Comment thread
fxcoudert marked this conversation as resolved.
Outdated

about:
home: https://github.com/rdkit/rdkit
PyPI: https://pypi.org/project/rdkit
summary: A collection of chemoinformatics and machine-learning software written in C++ and Python
license: BSD-3-Clause
extra:
recipe-maintainers:
- fxcoudert
Loading