build(wheels): added wheel generation scripts and social logo
This commit is contained in:
BIN
assets/logo/GridFireSocialPreview.png
Normal file
BIN
assets/logo/GridFireSocialPreview.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 73 KiB |
108
assets/logo/GridFireSocialPreview.svg
Normal file
108
assets/logo/GridFireSocialPreview.svg
Normal file
@@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||
|
||||
<svg
|
||||
version="1.1"
|
||||
id="svg1"
|
||||
width="1280"
|
||||
height="640"
|
||||
viewBox="0 0 1280 640"
|
||||
sodipodi:docname="repository-open-graph-template(1).png"
|
||||
xml:space="preserve"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"><defs
|
||||
id="defs1" /><sodipodi:namedview
|
||||
id="namedview1"
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#000000"
|
||||
borderopacity="0.25"
|
||||
inkscape:showpageshadow="2"
|
||||
inkscape:pageopacity="0.0"
|
||||
inkscape:pagecheckerboard="0"
|
||||
inkscape:deskcolor="#d1d1d1"
|
||||
showgrid="false"><inkscape:page
|
||||
x="0"
|
||||
y="0"
|
||||
width="1280"
|
||||
height="640"
|
||||
id="page2"
|
||||
margin="0"
|
||||
bleed="0" /></sodipodi:namedview><g
|
||||
inkscape:groupmode="layer"
|
||||
inkscape:label="Image"
|
||||
id="g1"><g
|
||||
inkscape:label="Layer 1"
|
||||
id="layer1"
|
||||
transform="matrix(2.8086632,0,0,2.8086632,43.27439,47.178107)"><text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;font-size:35.2777px;font-family:Federation;-inkscape-font-specification:'Federation Medium';text-align:start;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#000000;stroke:#000000;stroke-width:0.165"
|
||||
x="126.09238"
|
||||
y="247.10724"
|
||||
id="text1"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan1"
|
||||
style="stroke-width:0.165"
|
||||
x="126.09238"
|
||||
y="247.10724" /></text><path
|
||||
d="m 83.725847,65.260425 5.92665,-13.22913 H 46.366798 l -2.43416,0.42334 c -0.74083,0.21166 -1.58749,0.63499 -2.53999,1.26999 -1.48166,1.16417 -2.75166,2.96333 -3.80999,5.39749 l -2.64582,6.13831 z M 19.802718,115.00194 h 33.972389 c 2.75166,0 5.07999,-0.74083 7.09081,-2.11666 2.2225,-1.79916 3.59832,-3.49249 4.33916,-5.29166 l 14.18162,-32.279065 h -23.60076 l -5.92665,13.22913 h 4.12749 l 1.16416,0.84666 c 0.42333,0.74084 0.635,1.37583 0.635,1.79917 l -0.42333,1.58749 -1.79916,3.70416 -1.05833,1.48166 -1.16417,1.26999 c -0.84666,0.635 -1.79916,0.952495 -2.85749,0.952495 h -7.090809 c -1.16416,0 -2.11666,-0.211665 -2.96332,-0.740825 -0.635,-0.74083 -0.9525,-1.48166 -0.9525,-2.01083 l 0.42333,-1.79916 8.99581,-20.2141 h -16.50995 l -12.80579,28.998235 c -1.05833,2.53999 -1.5875,4.65666 -1.5875,6.34999 0,2.85749 1.27,4.23332 3.80999,4.23332 z m 50.693999,0 h 16.50995 l 11.64163,-26.352425 h 8.784133 c 1.27,0 1.90499,0.74083 1.90499,2.2225 l -0.42333,1.79916 -0.42333,1.69333 -9.101633,20.637435 h 16.298283 l 9.94831,-22.542435 c 0.3175,-0.635 0.42333,-1.37583 0.42333,-2.11666 0,-1.69333 -0.635,-3.06916 -1.79916,-4.23332 -1.16417,-1.05833 -2.32833,-1.58749 -3.38666,-1.58749 2.85749,0 5.29165,-0.635 7.30248,-1.79917 2.01083,-1.58749 3.38665,-3.28082 4.23332,-5.29165 l 7.61997,-17.25077 c 0.3175,-0.52917 0.42334,-1.16417 0.42334,-1.905 0,-1.58749 -0.74083,-3.06916 -2.11666,-4.33915 -1.69333,-1.27 -3.06916,-1.905 -4.02166,-1.905 H 98.330797 Z M 112.93576,75.420395 h -8.57249 l 4.65666,-10.15997 h 7.72581 c 2.32833,0 3.49249,0.74083 3.49249,2.11666 l -0.3175,1.05833 -2.32832,5.29165 c -0.635,0.74083 -1.27,1.16416 -2.01083,1.37583 z m 10.90079,39.581545 H 139.902 L 160.01,70.022905 h -15.85351 z m 53.4456,-62.970645 -27.93991,62.970645 h 39.58154 c 3.28083,0 6.13832,-0.84666 8.36081,-2.43416 2.22249,-1.58749 3.80999,-3.59832 4.86832,-6.03249 l 20.2141,-45.825685 c 0.635,-1.90499 0.9525,-3.28082 0.9525,-4.23332 0,-2.96332 -1.27,-4.44499 -3.80999,-4.44499 z m 10.5833,13.22913 h 6.13832 c 5.18582,0 7.83164,1.16416 7.83164,3.49249 0,0.74083 -0.21167,1.58749 -0.635,2.53999 l -10.2658,23.28326 c -0.9525,2.11666 -1.90499,3.59832 -2.85749,4.33915 -0.9525,0.84667 -2.32833,1.269995 -4.12749,1.269995 h -11.53579 z"
|
||||
id="text2"
|
||||
style="font-weight:500;font-size:105.833px;font-family:Federation;-inkscape-font-specification:'Federation Medium';fill:#577bb7;stroke:#577bb7;stroke-width:0.165"
|
||||
aria-label="Grid"
|
||||
sodipodi:nodetypes="ccccccccssccccccccccccssccccccsscccsccccccscccccscscccccsccccccccccccssccssccsscccscc" /><g
|
||||
id="text3"
|
||||
transform="translate(-111.65638,-152.86187)"><text
|
||||
xml:space="preserve"
|
||||
style="font-weight:500;font-size:105.833px;font-family:Federation;-inkscape-font-specification:'Federation Medium';text-align:start;writing-mode:lr-tb;direction:ltr;text-anchor:start;fill:#567989;fill-opacity:1;stroke:#577b24;stroke-width:0.165;stroke-opacity:1"
|
||||
x="205.80164"
|
||||
y="334.35223"
|
||||
id="text4"><tspan
|
||||
sodipodi:role="line"
|
||||
id="tspan2"
|
||||
style="fill:#567989;fill-opacity:1;stroke-width:0.165"
|
||||
x="205.80164"
|
||||
y="334.35223">FIRE</tspan></text></g><path
|
||||
style="fill:#bd4700;fill-opacity:1;stroke:none;stroke-width:0.0770683"
|
||||
d="m 141.91916,58.575645 c -1.87461,-9.4366 7.21572,-7.38641 14.33434,-33.5308 1.16711,-4.28649 2.69828,-13.061139 2.69828,-13.061139 3.84631,17.927789 -4.41963,36.563269 4.96316,37.240939 3.24439,0.23433 3.02126,-9.74929 3.02126,-9.74929 4.59141,4.03462 5.73365,9.57887 4.9471,14.75162 -0.55258,3.63402 -3.48315,6.74343 -6.39407,8.83063 -3.8879,2.78771 -6.92313,4.89273 -13.56517,4.05555 -5.91117,-0.7451 -9.12635,-4.11499 -10.0049,-8.53751 z"
|
||||
id="path3"
|
||||
sodipodi:nodetypes="aacacaasa" /><path
|
||||
style="fill:#ec7c00;fill-opacity:1;stroke:none;stroke-width:0.0575509"
|
||||
d="m 143.85228,58.868835 c -0.75196,-5.96384 6.44008,-10.11284 8.92038,-15.57762 1.41841,-3.12512 2.45402,-6.43583 3.36889,-9.75366 0.87267,-3.16479 2.01148,-9.64487 2.01148,-9.64487 2.18039,7.63566 -4.587,25.99435 4.25023,28.17098 3.28029,0.80795 5.75069,-2.48662 6.04745,-8.57874 0.26249,0.2119 1.37311,6.9481 0.58871,10.29927 -0.77789,3.32336 -2.51801,6.64199 -5.04199,8.83288 -3.2352,2.80822 -6.79985,5.17467 -11.81458,4.54336 -4.46292,-0.56189 -7.82729,-4.29992 -8.33057,-8.2916 z"
|
||||
id="path3-8"
|
||||
sodipodi:nodetypes="aaacacaasa" /><path
|
||||
style="fill:#ebcc8e;fill-opacity:1;stroke:none;stroke-width:0.0333678"
|
||||
d="m 159.83986,62.060975 c 1.20881,-3.8451 -3.41969,-7.27126 -4.28967,-11.19192 -0.45514,-2.05121 -0.58847,-4.20161 -0.45503,-6.30936 0.22192,-3.5059 2.07515,-10.33071 2.07515,-10.33071 0,0 -2.7575,7.42619 -3.39064,10.48135 -0.63315,3.05515 -0.48353,6.60628 -1.74925,9.58427 -1.32044,3.10675 -4.46542,2.86319 -2.38909,-5.52621 -1.43067,3.32391 -5.02115,5.9137 -4.66306,9.40574 0.39851,3.88602 4.06385,8.5454 7.17915,8.93857 2.73415,0.34502 6.73895,-2.05059 7.68244,-5.05173 z"
|
||||
id="path3-8-1"
|
||||
sodipodi:nodetypes="aaaczscasa" /><path
|
||||
style="fill:#ffffe0;fill-opacity:1;stroke:none;stroke-width:0.0770683"
|
||||
d="m 152.10845,67.148685 c 1.33923,0.28225 2.8816,-0.44789 3.88763,-1.43099 1.23332,-1.2052 2.07771,-3.10429 2.00025,-4.85763 -0.1006,-2.27582 -3.13834,-5.96235 -3.13834,-5.96235 -0.50373,6.89748 -4.81734,4.21153 -5.97574,7.59737 -0.32656,0.95445 0.12493,2.11857 0.68132,2.93787 0.58438,0.86062 1.62684,1.52227 2.54488,1.71573 z"
|
||||
id="path4"
|
||||
sodipodi:nodetypes="saasaas" /></g><text
|
||||
xml:space="preserve"
|
||||
style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:66.6026px;font-family:'Times New Roman';-inkscape-font-specification:'Times New Roman, ';text-align:center;writing-mode:lr-tb;direction:ltr;text-anchor:middle;fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:0.623023;stroke-opacity:1"
|
||||
x="916.25836"
|
||||
y="146.05331"
|
||||
id="text7"
|
||||
transform="scale(1.0375714,0.96378911)"><tspan
|
||||
sodipodi:role="line"
|
||||
x="916.25836"
|
||||
y="146.05331"
|
||||
id="tspan8"
|
||||
style="text-align:center;text-anchor:middle;stroke-width:0.623023">GridFire is a part </tspan><tspan
|
||||
sodipodi:role="line"
|
||||
x="916.25836"
|
||||
y="229.30656"
|
||||
id="tspan9"
|
||||
style="text-align:center;text-anchor:middle;stroke-width:0.623023">of 4D-STAR and</tspan><tspan
|
||||
sodipodi:role="line"
|
||||
x="916.25836"
|
||||
y="312.55981"
|
||||
id="tspan10"
|
||||
style="text-align:center;text-anchor:middle;stroke-width:0.623023">a SERiF project</tspan></text><rect
|
||||
style="fill:none;fill-opacity:1;stroke:#005200;stroke-width:3.26929;stroke-dasharray:none;stroke-opacity:1"
|
||||
id="rect10"
|
||||
width="497.11057"
|
||||
height="242.75038"
|
||||
x="700.80981"
|
||||
y="84.434914" /></g></svg>
|
||||
|
After Width: | Height: | Size: 8.5 KiB |
37
utils/wheels/build-wheels-linux_aarch64.sh
Executable file
37
utils/wheels/build-wheels-linux_aarch64.sh
Executable file
@@ -0,0 +1,37 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
if [[ $# -ne 1 ]]; then
|
||||
echo "Usage: $0 <git-repo-url>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
REPO_URL="$1"
|
||||
WORK_DIR="$(pwd)"
|
||||
WHEEL_DIR="${WORK_DIR}/wheels_linux_aarch64"
|
||||
|
||||
echo "➤ Creating wheel output directory at ${WHEEL_DIR}"
|
||||
mkdir -p "${WHEEL_DIR}"
|
||||
|
||||
TMPDIR="$(mktemp -d)"
|
||||
echo "➤ Cloning ${REPO_URL} → ${TMPDIR}/project"
|
||||
git clone "${REPO_URL}" "${TMPDIR}/project"
|
||||
|
||||
for IMAGE in \
|
||||
tboudreaux/manylinux_2_28_aarch64_boost_1_88_0:latest
|
||||
do
|
||||
docker run --rm \
|
||||
-v "${WHEEL_DIR}":/io/wheels \
|
||||
-v "${TMPDIR}/project":/io/project \
|
||||
"${IMAGE}" \
|
||||
/bin/bash -eux -c '
|
||||
cd /io/project
|
||||
for PY in /opt/python/*/bin/python; do
|
||||
"$PY" -m pip install --upgrade pip setuptools wheel meson meson-python
|
||||
CC=clang CXX=clang++ "$PY" -m pip wheel . --config-settings=setup-args=-Dunity=on -w /io/wheels -vv
|
||||
auditwheel repair /io/wheels/*.whl -w /io/wheels
|
||||
done
|
||||
|
||||
echo "✅ Linux wheels ready in /io/wheels"
|
||||
'
|
||||
done
|
||||
37
utils/wheels/build-wheels-linux_x86_64.sh
Executable file
37
utils/wheels/build-wheels-linux_x86_64.sh
Executable file
@@ -0,0 +1,37 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
if [[ $# -ne 1 ]]; then
|
||||
echo "Usage: $0 <git-repo-url>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
REPO_URL="$1"
|
||||
WORK_DIR="$(pwd)"
|
||||
WHEEL_DIR="${WORK_DIR}/wheels_linux_x86_64"
|
||||
|
||||
echo "➤ Creating wheel output directory at ${WHEEL_DIR}"
|
||||
mkdir -p "${WHEEL_DIR}"
|
||||
|
||||
TMPDIR="$(mktemp -d)"
|
||||
echo "➤ Cloning ${REPO_URL} → ${TMPDIR}/project"
|
||||
git clone "${REPO_URL}" "${TMPDIR}/project"
|
||||
|
||||
for IMAGE in \
|
||||
tboudreaux/manylinux_2_28_x86_64_boost_1_88_0:latest
|
||||
do
|
||||
docker run --rm \
|
||||
-v "${WHEEL_DIR}":/io/wheels \
|
||||
-v "${TMPDIR}/project":/io/project \
|
||||
"${IMAGE}" \
|
||||
/bin/bash -eux -c '
|
||||
cd /io/project
|
||||
for PY in /opt/python/*/bin/python; do
|
||||
"$PY" -m pip install --upgrade pip setuptools wheel meson meson-python
|
||||
CC=clang CXX=clang++ "$PY" -m pip wheel . --config-settings=setup-args=-Dunity=on -w /io/wheels -vv
|
||||
auditwheel repair /io/wheels/*.whl -w /io/wheels
|
||||
done
|
||||
|
||||
echo "✅ Linux wheels ready in /io/wheels"
|
||||
'
|
||||
done
|
||||
70
utils/wheels/build-wheels-macos_aarch64.sh
Executable file
70
utils/wheels/build-wheels-macos_aarch64.sh
Executable file
@@ -0,0 +1,70 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
if [[ $(uname -m) != "arm64" ]]; then
|
||||
echo "Error: This script is intended to run on an Apple Silicon (arm64) Mac."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ $# -ne 1 ]]; then
|
||||
echo "Usage: $0 <git-repo-url>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# --- Initial Setup ---
|
||||
REPO_URL="$1"
|
||||
WORK_DIR="$(pwd)"
|
||||
WHEEL_DIR="${WORK_DIR}/wheels_macos_aarch64_tmp"
|
||||
FINAL_WHEEL_DIR="${WORK_DIR}/wheels_macos_aarch64"
|
||||
|
||||
echo "➤ Creating wheel output directories"
|
||||
mkdir -p "${WHEEL_DIR}"
|
||||
mkdir -p "${FINAL_WHEEL_DIR}"
|
||||
|
||||
TMPDIR="$(mktemp -d)"
|
||||
echo "➤ Cloning ${REPO_URL} → ${TMPDIR}/project"
|
||||
git clone --depth 1 "${REPO_URL}" "${TMPDIR}/project"
|
||||
cd "${TMPDIR}/project"
|
||||
|
||||
# --- macOS Build Configuration ---
|
||||
export MACOSX_DEPLOYMENT_TARGET=12.0
|
||||
|
||||
PYTHON_VERSIONS=("3.8.20" "3.9.23" "3.10.18" "3.11.13" "3.12.11" "3.13.5" "3.13.5t" "3.14.0rc1" "3.14.0rc1t" 'pypy3.10-7.3.19' "pypy3.11-7.3.20")
|
||||
|
||||
if ! command -v pyenv &> /dev/null; then
|
||||
echo "Error: pyenv not found. Please install it to manage Python versions."
|
||||
exit 1
|
||||
fi
|
||||
eval "$(pyenv init -)"
|
||||
|
||||
for PY_VERSION in "${PYTHON_VERSIONS[@]}"; do
|
||||
(
|
||||
set -e
|
||||
|
||||
if ! pyenv versions --bare --filter="${PY_VERSION}." &>/dev/null; then
|
||||
echo "⚠️ Python version matching '${PY_VERSION}.*' not found by pyenv. Skipping."
|
||||
continue
|
||||
fi
|
||||
|
||||
pyenv shell "${PY_VERSION}"
|
||||
|
||||
PY="$(pyenv which python)"
|
||||
echo "➤ Building for $($PY --version) on macOS arm64 (target: ${MACOSX_DEPLOYMENT_TARGET})"
|
||||
|
||||
"$PY" -m pip install --upgrade pip setuptools wheel meson meson-python delocate
|
||||
|
||||
CC=clang CXX=clang++ "$PY" -m pip wheel . \
|
||||
--config-settings=setup-args=-Dunity=on \
|
||||
-w "${WHEEL_DIR}" -vv
|
||||
|
||||
echo "➤ Repairing wheel(s) with delocate"
|
||||
delocate-wheel -w "${FINAL_WHEEL_DIR}" "${WHEEL_DIR}"/*.whl
|
||||
|
||||
rm "${WHEEL_DIR}"/*.whl
|
||||
|
||||
)
|
||||
done
|
||||
|
||||
rm -rf "${TMPDIR}"
|
||||
rm -rf "${WHEEL_DIR}"
|
||||
|
||||
14
utils/wheels/installPyEnvVersions.sh
Executable file
14
utils/wheels/installPyEnvVersions.sh
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
pyenv install 3.8.20
|
||||
pyenv install 3.9.23
|
||||
pyenv install 3.10.18
|
||||
pyenv install 3.11.13
|
||||
pyenv install 3.12.11
|
||||
pyenv install 3.13.5
|
||||
pyenv install 3.13.5t
|
||||
pyenv install 3.14.0rc1
|
||||
pyenv install 3.14.0rc1t
|
||||
pyenv install pypy3.10-7.3.19
|
||||
pyenv install pypy3.11-7.3.20
|
||||
|
||||
28
utils/wheels/readme.md
Normal file
28
utils/wheels/readme.md
Normal file
@@ -0,0 +1,28 @@
|
||||
# Wheel Generation
|
||||
This directory contains scripts to generate precompiled python wheels for GridFire
|
||||
|
||||
# Notes
|
||||
- MacOS wheels can only be generated on macos
|
||||
- aarch64 wheels can only be generated on aarch64 machines
|
||||
- x86_64 wheels can only be generated on x86_64 machines
|
||||
- linux wheels can be generated on any linux machine, but the target architecture must match the machine architecture
|
||||
- Running each script will take **a very long time** (could be upwards of half of a day depending on your system) and will require roughly 2GB of disk space
|
||||
- When generating MacOS wheels, you must have all the correct versions of python installed with `pyenv`. Run the script `utils/wheels/installPyEnvVersions.sh` to install the correct versions of python.
|
||||
|
||||
# Usage
|
||||
Once you know you are on the correct machine, run the script for your desired architecture and operating system. For example, to generate a macos x86_64 wheel, run:
|
||||
|
||||
```bash
|
||||
./build-wheels-macos-aarch64.sh https://github.com/4D-STAR/GridFire
|
||||
```
|
||||
|
||||
Once you have all the wheels generated (which will likely require multiple systems), copy all the wheels into a single
|
||||
directory (lets assume its called `wheels` and in the root of the directory) and then run (from the root of the repository):
|
||||
|
||||
```bash
|
||||
python -m pip install --upgrade build
|
||||
python -m build --sdist --outdir wheels
|
||||
twine upload wheels/*
|
||||
```
|
||||
|
||||
Thie will also take a while (it needs to upload all the wheels to PyPI) but will result in all the wheels being uploaded to PyPI.
|
||||
Reference in New Issue
Block a user