Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Osx updates
  • Loading branch information
pkittenis committed Oct 4, 2025
commit a0d0b7ec6929aa47b257c3fd2b0edcf53d52a755
2 changes: 1 addition & 1 deletion _setup_libssh2.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@


def build_ssh2():
if bool(os.environ.get('SYSTEM_LIBSSH', False)):
if bool(os.environ.get('SYSTEM_LIbBSSH2', False)):
stderr.write("Using system libssh2..%s" % (os.sep))
return
if os.path.exists('/usr/local/opt/openssl'):
Expand Down
11 changes: 8 additions & 3 deletions ci/osx-wheel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,23 @@
SYSTEM_LIBSSH2_DIR="/opt/homebrew/opt/libssh2/lib"
MY_LIBSSH2_DIR="build_dir/src/"
LIBSSH2_INCLUDE_DIR="/opt/homebrew/opt/libssh2/include"
set +x

export CPPFLAGS="-I${LIBSSH2_INCLUDE_DIR}"
sudo cp -a libssh2/include/* /opt/homebrew/opt/libssh2/include/

pip3 install -U virtualenv
python3 -m virtualenv -p "$(which python3)" venv

set +x
source venv/bin/activate
set -x

python -V
pip3 install -U setuptools pip
pip3 install -U delocate wheel
unset SYSTEM_LIBSSH2

python3 setup.py bdist_wheel

sudo cp -a ${MY_LIBSSH2_DIR}/libssh2* ${SYSTEM_LIBSSH2_DIR}/
ls -lhtr ${SYSTEM_LIBSSH2_DIR}

Expand All @@ -42,9 +45,11 @@ ls -l wheels/*.whl
rm -f ${SYSTEM_LIBSSH2_DIR}/libssh2*
rm -f ${MY_LIBSSH2_DIR}/libssh2*
pip3 install -v wheels/*.whl

pwd; mkdir -p temp; cd temp; pwd
python3 -c "from ssh2.session import Session; Session()" && echo "Import successful"
cd ..; pwd
set +x

deactivate

set -x