forked from trueagi-io/hyperon-experimental
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make python package buildable by cibuildwheel tool
Make hyperonc and hyperonpy two separate CMake projects. Re-write setup.py to build hyperonpy using CMake. hyperonc is expected to be installed before hyperonpy is built. Add different tricks to make it buildable under cibuildwheel containers: - add install-hyperonc.sh which builds and install hyperonc - pass repo and commit into install-hyperon.sh to install correct versions of hyperonc - allow build only static hyperonc because shared library cannot be built under musllinux-x86_64 - ignore mulllinux-i686 where Rust compiler cannot be installed Add root project to build both hyperonc and hyperonpy.
- Loading branch information
Showing
11 changed files
with
236 additions
and
62 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
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
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,8 @@ | ||
@PACKAGE_INIT@ | ||
|
||
set_and_check(hyperonc_INCLUDE_DIRS "@PACKAGE_INCLUDE_INSTALL_PATH@") | ||
set_and_check(hyperonc_STATIC_LIBRARY "@PACKAGE_STATIC_LIBRARY_INSTALL_PATH@") | ||
set_and_check(hyperonc_SHARED_LIBRARY "@PACKAGE_SHARED_LIBRARY_INSTALL_PATH@") | ||
|
||
check_required_components(hyperonc) | ||
|
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
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
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
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 |
---|---|---|
|
@@ -4,3 +4,4 @@ __pycache__ | |
/build | ||
/*.so | ||
/*.dylib | ||
/wheelhouse |
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
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,49 @@ | ||
#!/bin/sh | ||
|
||
HYPERONC_URL=https://github.com/trueagi-io/hyperon-experimental.git | ||
HYPERONC_REV=main | ||
while getopts 'u:r:' opt; do | ||
case "$opt" in | ||
u) | ||
HYPERONC_URL="$OPTARG" | ||
;; | ||
r) | ||
HYPERONC_REV="$OPTARG" | ||
;; | ||
?|h) | ||
echo "Usage: $(basename $0) [-u hyperonc_repo_url] [-r hyperonc_revision]" | ||
exit 1 | ||
;; | ||
esac | ||
done | ||
|
||
echo "hyperonc repository URL $HYPERONC_URL" | ||
echo "hyperonc revision $HYPERONC_REV" | ||
|
||
# This is to build subunit from Conan on CentOS based manylinux images. | ||
if test "$AUDITWHEEL_POLICY" = "manylinux2014"; then | ||
yum install -y perl-devel | ||
fi | ||
|
||
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > /tmp/rustup.sh | ||
sh /tmp/rustup.sh -y && rm /tmp/rustup.sh | ||
export PATH="${PATH}:${HOME}/.cargo/bin" | ||
cargo install cbindgen | ||
|
||
python3 -m pip install conan==1.60.1 pip==23.1.2 | ||
PATH="${PATH}:${HOME}/.local/bin" | ||
conan profile new --detect default | ||
|
||
mkdir -p ${HOME}/hyperonc | ||
cd ${HOME}/hyperonc | ||
git init | ||
git remote add origin $HYPERONC_URL | ||
git fetch origin $HYPERONC_REV | ||
git reset --hard FETCH_HEAD | ||
|
||
mkdir -p ${HOME}/hyperonc/c/build | ||
cd ${HOME}/hyperonc/c/build | ||
cmake -DBUILD_SHARED_LIBS=OFF -DCMAKE_BUILD_TYPE=Release .. | ||
make | ||
make check | ||
make install |
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
Oops, something went wrong.