Skip to content
Snippets Groups Projects
Commit 5c0e491a authored by Grégoire Kubler's avatar Grégoire Kubler
Browse files

feat : enabled cibuildwheel

parent c2e599df
No related branches found
No related tags found
1 merge request!12Feat/release pip
Pipeline #46372 canceled
...@@ -16,7 +16,7 @@ include: ...@@ -16,7 +16,7 @@ include:
file: file:
# choose which jobs to run by including the corresponding files. # choose which jobs to run by including the corresponding files.
- '.gitlab/ci/ubuntu_python.gitlab-ci.yml' - '.gitlab/ci/ubuntu_python.gitlab-ci.yml'
- '.gitlab/ci/release/pip_ubuntu.gitlab-ci.yml' - '.gitlab/ci/release/pip.gitlab-ci.yml'
# Since aidge_export_cpp is a pure python package building on windows and on ubuntu doesn't differ # Since aidge_export_cpp is a pure python package building on windows and on ubuntu doesn't differ
# - '.gitlab/ci/windows_python.gitlab-ci.yml' # - '.gitlab/ci/windows_python.gitlab-ci.yml'
#!/bin/bash
set -e
if [[ "$1" == "" ]]; then
echo "build aidge deps in cibuildwheel container before building wheel."
echo "search path defines where the dependencies will be searched."
echo "Hint : In wheel containers, files are mounted on /host by default."
echo "\nusage : ./cibuildwheel_build_deps_before_build_wheel.sh $search_path"
fi
set -x
if [[ $AIDGE_DEPENDENCIES == "" ]]; then # case for aidge_ core
mkdir -p build # creating build if its not already there to hold the build of cpp files
rm -rf build/* # build from scratch
else
for repo in $AIDGE_DEPENDENCIES ; do # case for other projects
search_path=$1
REPO_PATH=$(find $search_path ! -writable -prune -o -type d \
-name "$repo" \
-not -path "*/install/*" \
-not -path "*/.git/*" \
-not -path "*/miniconda/*" \
-not -path "*/conda/*" \
-not -path "*/.local/*" \
-not -path "*/lib/*" \
-not -path "*/$repo/$repo/*" \
-not -path "*/proc/*" \
-print -quit)
if [[ -z "$REPO_PATH" ]]; then
echo "ERROR : dependency $repo not found in search_path \"$search_path\". ABORTING."
exit -1
fi
cd $REPO_PATH
mkdir -p build # creating build if its not already there to hold the build of cpp files
rm -rf build/* # build from scratch
pip install . -v
cd -
done
fi
set +x
set +e
#!/bin/bash
set -e
if [[ "$1" == "" ]]; then
echo "build aidge deps in cibuildwheel container before building wheel."
echo "search path defines where the dependencies will be searched."
echo "Hint : In wheel containers, files are mounted on /host by default."
echo "\nusage : ./cibuildwheel_build_deps_before_build_wheel.sh $search_path"
fi
set -x
if [[ $AIDGE_DEPENDENCIES == "" ]]; then # case for aidge_ core
mkdir -p build # creating build if its not already there to hold the build of cpp files
rm -rf build/* # build from scratch
else
for repo in $AIDGE_DEPENDENCIES ; do # case for other projects
search_path=$1
REPO_PATH=$(find $search_path ! -writable -prune -o -type d \
-name "$repo" \
-not -path "*/install/*" \
-not -path "*/.git/*" \
-not -path "*/miniconda/*" \
-not -path "*/conda/*" \
-not -path "*/.local/*" \
-not -path "*/lib/*" \
-not -path "*/$repo/$repo/*" \
-not -path "*/proc/*" \
-print -quit)
if [[ -z "$REPO_PATH" ]]; then
echo "ERROR : dependency $repo not found in search_path \"$search_path\". ABORTING."
exit -1
fi
cd $REPO_PATH
mkdir -p build # creating build if its not already there to hold the build of cpp files
rm -rf build/* # build from scratch
pip install . -v
cd -
done
fi
set +x
set +e
...@@ -41,6 +41,26 @@ build-backend = "setuptools.build_meta" ...@@ -41,6 +41,26 @@ build-backend = "setuptools.build_meta"
### No cibuildwheel needed here since onnx is a pure python package. ### No cibuildwheel needed here since onnx is a pure python package.
### To package aidge_onnx run : ### To package aidge_onnx run :
### pip wheel -w DEST_DIR . ### pip wheel -w DEST_DIR .
#####################################################
# CIBUILDWHEEL
[tool.cibuildwheel]
build-frontend = "build"
build=["cp38-manylinux_x86_64"] # , "cp39-manylinux_x86_64","cp310-manylinux_x86_64"]
### AIDGE DEPENDENCIES DECLARATION
[tool.cibuildwheel.linux.environment]
AIDGE_DEPENDENCIES = "" # format => "dep_1 dep_2 ... dep_n"
AIDGE_INSTALL="/AIDGE_INSTALL_CIBUILDWHEEL"
[tool.cibuildwheel.windows.environment]
AIDGE_DEPENDENCIES = '@()' # format => '@("dep_1","dep_2", ... ,"dep_n")'
AIDGE_INSTALL="../AIDGE_INSTALL_CIBUILDWHEEL/"
[tool.cibuildwheel.linux]
before-build = [
"bash .gitlab/ci/cibuildwheel_build_deps_before_build_wheel.sh /host"
]
[tool.cibuildwheel.windows]
before-build = [
"powershell -File .\\.gitlab\\ci\\cibuildwheel_build_deps_before_build_wheel.ps1"
]
##################################################### #####################################################
# SETUPTOOLS # SETUPTOOLS
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment