|
14 | 14 | # You should have received a copy of the GNU Lesser General Public |
15 | 15 | # License along with this library; if not, write to the Free Software |
16 | 16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
17 | | -LIBSSH2_DIR="/opt/homebrew/opt/libssh2/lib" |
| 17 | +SYSTEM_LIBSSH2_DIR="/opt/homebrew/opt/libssh2/lib" |
| 18 | +MY_LIBSSH2_DIR="build_dir/src/" |
18 | 19 | LIBSSH2_INCLUDE_DIR="/opt/homebrew/opt/libssh2/include" |
19 | | -export LDFLAGS="-L${LIBSSH2_DIR}" |
| 20 | +set +x |
| 21 | + |
20 | 22 | export CPPFLAGS="-I${LIBSSH2_INCLUDE_DIR}" |
| 23 | +sudo cp -a libssh2/include/* /opt/homebrew/opt/libssh2/include/ |
21 | 24 |
|
22 | 25 | pip3 install -U virtualenv |
23 | 26 | python3 -m virtualenv -p "$(which python3)" venv |
24 | 27 |
|
25 | | -set +x |
26 | 28 | source venv/bin/activate |
27 | | -set -x |
28 | 29 |
|
29 | 30 | python -V |
30 | 31 | pip3 install -U setuptools pip |
31 | 32 | pip3 install -U delocate wheel |
32 | | -SYSTEM_LIBSSH2=1 python3 setup.py bdist_wheel |
33 | | -ls -lhtr ${LIBSSH2_DIR} |
| 33 | +unset SYSTEM_LIBSSH2 |
| 34 | + |
| 35 | +python3 setup.py bdist_wheel |
| 36 | + |
| 37 | +sudo cp -a ${MY_LIBSSH2_DIR}/libssh2* ${SYSTEM_LIBSSH2_DIR}/ |
| 38 | +ls -lhtr ${SYSTEM_LIBSSH2_DIR} |
| 39 | + |
34 | 40 | delocate-listdeps dist/*.whl |
35 | 41 | delocate-wheel -v -w wheels dist/*.whl |
36 | 42 | delocate-listdeps wheels/*.whl |
37 | 43 |
|
38 | 44 | ls -l wheels/*.whl |
39 | | -rm -f ${LIBSSH2_DIR}/libssh2* |
| 45 | +rm -f ${SYSTEM_LIBSSH2_DIR}/libssh2* |
| 46 | +rm -rf build_dir |
| 47 | +ls -lhtr ${SYSTEM_LIBSSH2_DIR} |
| 48 | + |
40 | 49 | pip3 install -v wheels/*.whl |
| 50 | + |
41 | 51 | pwd; mkdir -p temp; cd temp; pwd |
42 | 52 | python3 -c "from ssh2.session import Session; Session()" && echo "Import successful" |
43 | 53 | cd ..; pwd |
44 | | -set +x |
| 54 | + |
45 | 55 | deactivate |
| 56 | + |
46 | 57 | set -x |
0 commit comments