-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from ITISFoundation/working_version
Working wheel for python environment
- Loading branch information
Showing
7 changed files
with
75 additions
and
17 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 |
---|---|---|
|
@@ -28,8 +28,9 @@ jobs: | |
- uses: pypa/[email protected] | ||
env: | ||
CIBW_BUILD: ${{ matrix.python }}*${{ matrix.arch }} | ||
CIBW_BEFORE_ALL: "yum install -y gcc-gfortran lapack-devel boost169-devel boost169-filesystem boost169-program-options boost169-regex boost169-serialization blas-devel" | ||
#CIBW_BEFORE_ALL: "yum install -y gcc-gfortran lapack-devel boost169-devel boost169-filesystem boost169-program-options boost169-regex boost169-serialization blas-devel" | ||
- name: Upload wheels | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: wheels-${{ matrix.os }}-${{ matrix.python }}-${{ matrix.arch }} | ||
path: wheelhouse/*.whl |
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 |
---|---|---|
|
@@ -247,3 +247,4 @@ pyrightconfig.json | |
build.sh | ||
dakota | ||
dakota_wheel-* | ||
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
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,21 @@ | ||
diff --git a/cmake/DakotaFindPython.cmake b/cmake/DakotaFindPython.cmake | ||
index 43f9fb9..f4c4e28 100644 | ||
--- a/cmake/DakotaFindPython.cmake | ||
+++ b/cmake/DakotaFindPython.cmake | ||
@@ -8,7 +8,7 @@ macro(dakota_find_python) | ||
if(DAKOTA_PYTHON_DIRECT_INTERFACE OR DAKOTA_PYTHON_SURROGATES OR | ||
DAKOTA_PYTHON_WRAPPER OR DAKOTA_PYBIND11) | ||
message(STATUS "Dakota enabling Python (Development) for direct or surrogate interface") | ||
- list(APPEND dakota_python_components Development) | ||
+ list(APPEND dakota_python_components Development.Module) | ||
|
||
if (DAKOTA_PYTHON_DIRECT_INTERFACE_NUMPY) | ||
message(STATUS "Dakota enabling Python direct interface with NumPy") | ||
@@ -18,6 +18,7 @@ macro(dakota_find_python) | ||
endif() | ||
|
||
find_package(Python REQUIRED ${dakota_python_components}) | ||
+ # find_package(Python COMPONENTS ${dakota_python_components} REQUIRED) | ||
|
||
# pybind11, C3, Acro, etc., use older CMake FindPythonInterp, so we | ||
# coerce it to use same as Dakota; more complex situations may |
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,20 @@ | ||
#!/bin/bash | ||
|
||
set -ex | ||
|
||
WHEEL_DIR=$1 | ||
|
||
WHEEL_NAME=$(basename $(ls ${WHEEL_DIR}/*.whl) .whl) | ||
|
||
echo "Fixing ${WHEEL_DIR}/${WHEEL_NAME}.whl" | ||
|
||
cd ${WHEEL_DIR} | ||
|
||
unzip ${WHEEL_DIR}/${WHEEL_NAME}.whl -d ${WHEEL_NAME} | ||
|
||
find ${WHEEL_NAME} -type f -name "*.so" -exec patchelf --set-rpath '$ORIGIN/../../itis_dakota.libs' '{}' \; | ||
find ${WHEEL_NAME}/itis_dakota.libs -type f -name "*.so.*" -exec patchelf --set-rpath '$ORIGIN/' '{}' \; | ||
|
||
cd ${WHEEL_NAME} | ||
zip -r ${WHEEL_NAME}.whl * | ||
mv ${WHEEL_NAME}.whl .. |