@@ -15,7 +15,7 @@ git config --global --add safe.directory ${GITHUB_WORKSPACE}
15
15
BRANCH_NAME=` git rev-parse --abbrev-ref HEAD`
16
16
echo " BRANCH_NAME: ${BRANCH_NAME} "
17
17
18
- # Read for what python wheels have to be built .
18
+ # Detect the Python version .
19
19
if [[ ${HEYOKA_PY_BUILD_TYPE} == * 38* ]]; then
20
20
PYTHON_DIR=" cp38-cp38"
21
21
elif [[ ${HEYOKA_PY_BUILD_TYPE} == * 39* ]]; then
33
33
exit 1
34
34
fi
35
35
36
- # Report the inferred directory whwere python is found.
36
+ # Report the inferred directory where python is found.
37
37
echo " PYTHON_DIR: ${PYTHON_DIR} "
38
38
39
- # The numpy version heyoka.py will be built against.
40
- if [[ ${HEYOKA_PY_BUILD_TYPE} == * 312* || ${HEYOKA_PY_BUILD_TYPE} == * 313* ]]; then
41
- export NUMPY_VERSION=" 1.26.*"
42
- else
43
- export NUMPY_VERSION=" 1.24.*"
44
- fi
45
-
46
39
# The heyoka version to be used for releases.
47
40
export HEYOKA_VERSION_RELEASE=" 6.1.0"
48
41
54
47
echo " Non-tag build detected"
55
48
fi
56
49
57
- # Python mandatory deps.
58
- # NOTE: explicit installation of setuptools is apparently
59
- # needed in Python 3.13.
60
- /opt/python/${PYTHON_DIR} /bin/pip install numpy==${NUMPY_VERSION} cloudpickle setuptools
61
- # Python optional deps.
62
- /opt/python/${PYTHON_DIR} /bin/pip install sympy mpmath skyfield
63
-
64
- # In the pagmo2/manylinux2014_x86_64_with_deps:latest image in dockerhub
65
- # the working directory is /root/install, we will install heyoka there.
50
+ # In the manylinux image in dockerhub the working directory is /root/install, we will install heyoka there.
66
51
cd /root/install
67
52
68
53
# Install heyoka.
@@ -85,30 +70,19 @@ cmake -DHEYOKA_WITH_MPPP=yes \
85
70
-DCMAKE_BUILD_TYPE=Release ../;
86
71
make -j4 install
87
72
88
- # Install heyoka.py.
73
+ # Build the heyoka.py wheel .
89
74
cd ${GITHUB_WORKSPACE}
90
- mkdir build
91
- cd build
92
- cmake -DCMAKE_BUILD_TYPE=Release \
93
- -DHEYOKA_PY_ENABLE_IPO=ON \
94
- -DPython3_EXECUTABLE=/opt/python/${PYTHON_DIR} /bin/python ../;
95
- make -j4 install
96
-
97
- # Making the wheel and installing it
98
- cd wheel
99
- # Move the installed heyoka.py files into the current dir.
100
- mv ` /opt/python/${PYTHON_DIR} /bin/python -c ' import site; print(site.getsitepackages()[0])' ` /heyoka ./
101
- # Create the wheel and repair it.
75
+ /opt/python/${PYTHON_DIR} /bin/pip wheel . -v
76
+ # Repair it.
102
77
# NOTE: this is temporary because some libraries in the docker
103
78
# image are installed in lib64 rather than lib and they are
104
79
# not picked up properly by the linker.
105
80
export LD_LIBRARY_PATH=" /usr/local/lib64:/usr/local/lib"
106
- /opt/python/${PYTHON_DIR} /bin/python setup.py bdist_wheel
107
- auditwheel repair dist/heyoka* -w ./dist2
81
+ auditwheel repair ./heyoka* .whl -w ./repaired_wheel
108
82
# Try to install it and run the tests.
109
83
unset LD_LIBRARY_PATH
110
84
cd /
111
- /opt/python/${PYTHON_DIR} /bin/pip install ${GITHUB_WORKSPACE} /build/wheel/dist2 /heyoka*
85
+ /opt/python/${PYTHON_DIR} /bin/pip install ${GITHUB_WORKSPACE} /repaired_wheel /heyoka*
112
86
cd ${GITHUB_WORKSPACE} /tools
113
87
/opt/python/${PYTHON_DIR} /bin/python ci_test_runner.py
114
88
cd /
0 commit comments