-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Have been iterating build.sh Current issue is that when a venv is being setup to build the wheel, setuptools cannot be found despite it being installed by conda via requirements. Trying to install setuptools via pip fails too. Similarly, cmake can't find conda installed SWIG, however requires it be conda installed to allow build to suceed. May be able to address this one by manually locating paths to pass to CMake.
- Loading branch information
Showing
3 changed files
with
77 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
"%PYTHON%" -m pip install "pyflamegpu-2.0.0rc1+cuda122-cp38-cp38-linux_x86_64.whl" | ||
if errorlevel 1 exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/bin/bash | ||
|
||
build_threads=${FLAMEGPU_CONDA_BUILD_THREADS:-1} | ||
[[ -z "$FLAMEGPU_CONDA_CUDA_ARCHITECTURES" ]] && build_arch="" || build_arch="-DCMAKE_CUDA_ARCHITECTURES=$FLAMEGPU_CONDA_CUDA_ARCHITECTURES" | ||
|
||
# Setup python packages | ||
# Issues with CMake locating ones installed by conda | ||
|
||
pip install setuptools wheel build astpretty | ||
|
||
mkdir -p build && cd build | ||
|
||
#cmake .. -DCMAKE_BUILD_TYPE=Release -DFLAMEGPU_BUILD_PYTHON=ON -DFLAMEGPU_BUILD_PYTHON_CONDA=ON | ||
#temp faster build | ||
cmake .. -DCMAKE_BUILD_TYPE=Release -DFLAMEGPU_BUILD_PYTHON=ON -DFLAMEGPU_BUILD_PYTHON_VENV=OFF -DFLAMEGPU_BUILD_PYTHON_CONDA=ON $build_arch | ||
|
||
# Build python wheel | ||
cmake --build . --target pyflamegpu --parallel ${build_threads} | ||
|
||
# Install built wheel | ||
pip install lib/Release/python/dist/pyflamegpu-2.0.0rc1+cuda122-cp38-cp38-linux_x86_64.whl | ||
|
||
# Cleanup | ||
cd . | ||
rm -rf build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package: | ||
name: "pyflamegpu" | ||
version: "2.0.0rc1" | ||
|
||
source: | ||
git_url: https://github.com/FLAMEGPU/FLAMEGPU2.git | ||
git_rev: v2.0.0-rc | ||
git_depth: 1 # Shallow | ||
|
||
# requires: conda config --add channels conda-forge | ||
requirements: | ||
build: | ||
- {{ compiler('cxx') }} | ||
- cuda-toolkit | ||
- swig ==4.0.2 # CMake can't find this, but needs it to build swig from src? (>= does not work either), alt find where conda puts swig and pass path to CMake | ||
- cmake | ||
- python | ||
- pip | ||
- setuptools >=40.8.0 # CMake can't find this when installed by conda | ||
- wheel | ||
- build | ||
- astpretty | ||
run: | ||
- python | ||
- cuda-toolkit | ||
|
||
#build: | ||
# track_features: | ||
# - feature2 | ||
# run_exports: | ||
# strong: | ||
# - _pyflamegpu | ||
# - libnvrtc | ||
# - libcuda | ||
# - libcudart | ||
# - libdl | ||
# - libstdc++ | ||
# - libgcc | ||
# - librt | ||
# - libpthread | ||
|
||
test: | ||
imports: | ||
- pyflamegpu | ||
|
||
about: | ||
home: https://flamegpu.com/ | ||
license: MIT | ||
license_family: MIT | ||
summary: GPU accelerated agent based modelling framework for Python |