Skip to content

Manylinux changes #92

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 46 commits into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
63660c1
Removed manylinux 2010 builds and files. Removed manylinux2010 from b…
pkittenis Jan 15, 2025
9874cd7
Updated manylinux build script to use embedded libssh. Removed archiv…
pkittenis Jan 16, 2025
2b5fdb3
Cleanup appveyor cfg
pkittenis Jan 16, 2025
ac0aea1
Updated CI cfg
pkittenis Jan 16, 2025
3c1c412
Updated appveyor cfg
pkittenis Jan 16, 2025
367d624
Updated dockerfiles
pkittenis Jan 17, 2025
a0efa66
Updated CI cfg
pkittenis Jan 22, 2025
f2b0081
Updated CI cfg
pkittenis Jan 22, 2025
67d6ba5
Removed zlib archive, added source.
pkittenis Jan 22, 2025
0d6d045
Updated dockerfiles, ci cfg
pkittenis Jan 22, 2025
b4aa009
Updated dockerfiles
pkittenis Jan 22, 2025
8d22014
Updated dockerfiles
pkittenis Jan 22, 2025
cb06758
Updated CI cfg
pkittenis Jan 22, 2025
4e34450
Updated dockerfiles
pkittenis Jan 22, 2025
02cfb95
Added krb5 source. Updated dockerfiles.
pkittenis Jan 22, 2025
7d2407c
Updated build scripts
pkittenis Jan 22, 2025
5da417e
Updated dockerfiles
pkittenis Jan 22, 2025
5a4ef5c
Updated dockerfiles, CI cfg
pkittenis Jan 22, 2025
62346c2
Updated build script
pkittenis Jan 22, 2025
fa45a14
Updated build script
pkittenis Jan 22, 2025
8c15772
Updated build scripts
pkittenis Jan 22, 2025
350fa8c
Updated dockerfiles
pkittenis Jan 22, 2025
a72f692
Updated dockerfiles
pkittenis Jan 22, 2025
35502e9
Updated dockerfiles
pkittenis Jan 22, 2025
03a4d61
Updated dockerfiles
pkittenis Jan 22, 2025
8c9cb56
Updated dockerfiles
pkittenis Jan 22, 2025
492e81a
Updated build scripts
pkittenis Jan 22, 2025
c7ff5ae
Updated dockerfiles
pkittenis Jan 22, 2025
d147fa1
Updated dockerfiles
pkittenis Jan 22, 2025
c7db378
Updated dockerfiles, krb win script
pkittenis Jan 22, 2025
aaf7d94
Updated dockerfile
pkittenis Jan 22, 2025
8b9f97d
Updated embedded libssh to 0.11.1
pkittenis Jan 22, 2025
3c45174
Updated CI tests
pkittenis Jan 22, 2025
67d23cb
Updated CI tests
pkittenis Jan 22, 2025
d3af59a
Updated dockerfiles, changelog
pkittenis Jan 22, 2025
f2d2a93
Updated dockerfile
pkittenis Jan 22, 2025
11309bd
Updated dockerfiles
pkittenis Jan 22, 2025
27dd6e1
Updated CI cfg
pkittenis Jan 22, 2025
998ec19
Updated appveyor cfg
pkittenis Jan 22, 2025
4595c18
Updated changelog, readme
pkittenis Jan 22, 2025
c01d6cc
Updated setup.py
pkittenis Jan 22, 2025
43475ee
Updated windows krb script
pkittenis Jan 22, 2025
eff6692
Updated lfs
pkittenis Jan 22, 2025
4d667a1
Updated appveyor cfg
pkittenis Jan 22, 2025
ea18520
Updated appveyor cfg
pkittenis Jan 22, 2025
ca0e3da
Updated appveyor cfg
pkittenis Jan 22, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
19 changes: 13 additions & 6 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ build:
verbosity: minimal
skip_branch_with_pr: true
image: Visual Studio 2019
clone_script: echo Skip AppVeyor Clone

environment:
global:
Expand All @@ -32,7 +33,7 @@ environment:
PYTHON_DEF: "C:\\Python38-x64"
PYTHON_VERSION: "3.8"
# Python versions to build wheels for
PYTHONVERS: C:\Python38-x64 C:\Python39-x64 C:\Python310-x64 C:\Python311-x64 C:\Python312-x64
PYTHONVERS: C:\Python37-x64 C:\Python38-x64 C:\Python39-x64 C:\Python310-x64 C:\Python311-x64 C:\Python312-x64 C:\Python313-x64
PYTHON_ARCH: "64"

install:
Expand All @@ -45,6 +46,17 @@ install:
https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
throw "There are newer queued builds for this pull request, failing early." }

# Git checkout
- git config --global filter.lfs.smudge "git-lfs smudge --skip -- %f"
- git config --global filter.lfs.process "git-lfs filter-process --skip"
- git init %APPVEYOR_BUILD_FOLDER%
- cd %APPVEYOR_BUILD_FOLDER%
- git remote add origin https://github.com/%APPVEYOR_REPO_NAME%.git
- git fetch -q origin %APPVEYOR_REPO_COMMIT%
- git fetch --tags
- git checkout -qf %APPVEYOR_REPO_COMMIT%

- set OPENSSL_DIR="C:\OpenSSL-v34-Win64"
- set VCLIBDIR=%WINDIR%\System32
- cp %VCLIBDIR%/vcruntime140.dll ssh/
Expand All @@ -60,11 +72,6 @@ install:
# do not cause a version change.
- "%PYTHON_DEF%\\python.exe ci/appveyor/fix_version.py ."
- mv -f .git .git.bak
- 7z x ci\appveyor\zlib1211.zip
# - appveyor DownloadFile http://web.mit.edu/kerberos/dist/kfw/4.1/kfw-4.1-amd64.msi
# - msiexec /i kfw-4.1-amd64.msi /passive /qn
# - ps: ls "C:\Program Files\MIT\Kerberos\"
# - cp "C:\Program Files\MIT\Kerberos\*.dll" ssh/
- ps: ls ssh/*.dll
- ps: ls ssh
- ps: ls
Expand Down
20 changes: 10 additions & 10 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
command: |
pip uninstall -y cython
pip install -e .
python -c 'from ssh.session import Session; Session()'
eval "$(ssh-agent -s)"
name: Build
- run:
Expand Down Expand Up @@ -80,7 +81,7 @@ jobs:
- run:
name: deps
command: |
brew install cmake git-lfs krb5 python libssh
brew install cmake python libssh
brew link --force openssl
brew link --force libssh
pip3 install twine
Expand All @@ -94,20 +95,15 @@ jobs:
- run:
name: Upload Wheel
command: |
twine upload --skip-existing -u $PYPI_USER -p $PYPI_PASSWORD wheels/*
if [[ ! -z "$CIRCLE_TAG" ]]; then
twine upload --skip-existing -u $PYPI_USER -p $PYPI_PASSWORD wheels/*
fi

manylinux-x86_64:
machine:
image: ubuntu-2004:current
steps: &manylinux-steps
- checkout
- run:
name: Git LFS
command: |
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
sudo apt-get install git-lfs
git lfs install
git lfs pull
- run:
name: Deps
command: |
Expand All @@ -119,6 +115,8 @@ jobs:
- run:
name: Build Wheels
command: |
export LIBSSH=0.11.1
export KRB=1.21.3
if [[ -z "${CIRCLE_PR_NUMBER}" ]]; then
echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin;
fi
Expand All @@ -131,7 +129,9 @@ jobs:
- run:
name: Upload Wheels
command: |
twine upload --skip-existing -u $PYPI_USER -p $PYPI_PASSWORD dist/* wheelhouse/*
if [[ ! -z "$CIRCLE_TAG" ]]; then
twine upload --skip-existing -u $PYPI_USER -p $PYPI_PASSWORD dist/* wheelhouse/*
fi

manylinux-aarch64:
machine:
Expand Down
5 changes: 1 addition & 4 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,5 +1,2 @@
*.tar.gz filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
ci/appveyor/zlib1211.zip export-subst
ssh/_version.py export-subst
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ libssh/compile_commands.json
/.idea
/ci/integration_tests/unit_test_cert_key-cert.pub
/doc/_build
ci/docker/manylinux/*.tar.gz
ci/appveyor/zlib-1.2.11.zip
20 changes: 20 additions & 0 deletions Changelog.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,26 @@
Change Log
=============

1.1.1
+++++

Changes
--------

No code changes.


Packaging
----------

* Added Windows Python 3.7 and 3.13 wheel builds.
* Removed manylinux 2010 wheels.
* Wheel builds now use embedded libssh.
* Source distribution now uses embedded libssh.
* Added embedded krb5 for wheel builds.
* Dockerfiles and scripts updates.


1.1.0
+++++

Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Bindings for libssh_ C library.
Installation
_____________

Binary wheels are provided for Linux (manylinux 2010), OSX (10.14 and 10.15 for brew Python), and Windows 64-bit (Python 3.6/3.7/3.8).
Binary wheels are provided for Linux (manylinux 2014, x86_64 and aarch64), OSX (12, 13 and 14 for brew Python), and Windows 64-bit (Python 3.7+).

Wheels have *no dependencies*.

Expand Down
1 change: 1 addition & 0 deletions _setup_libssh.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def build_ssh():
check_call("""cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../local \
-DWITH_GSSAPI=ON \
-DWITH_EXAMPLES=OFF \
-DUNIT_TESTING=OFF \
../libssh""",
shell=True, env=os.environ)
check_call(['make', '-j%s' % (cpu_count(),), 'all', 'install'])
Expand Down
2 changes: 1 addition & 1 deletion ci/appveyor/build_krb.bat
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ refreshenv
set KRB_INSTALL_DIR=%APPVEYOR_HOME_DIR%/src/lib
set CPU=AMD64
setenv /x64 /release
cd kfw-4.1/src
cd krb-1.21.3/src
make -f Makefile.in prep-windows
make
make install
Expand Down
1 change: 1 addition & 0 deletions ci/appveyor/build_ssh.bat
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ cmake ..\libssh ^
-DZLIB_INCLUDE_DIR=C:/zlib/include ^
-DWITH_GSSAPI=ON ^
-DWITH_EXAMPLES=OFF ^
-DUNIT_TESTING=OFF ^
-DOPENSSL_ROOT_DIR=%OPENSSL_DIR%


Expand Down
3 changes: 0 additions & 3 deletions ci/appveyor/zlib1211.zip

This file was deleted.

6 changes: 4 additions & 2 deletions ci/build-manylinux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,12 @@
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

tar -czf ci/docker/manylinux/libssh-${LIBSSH}.tar.gz libssh
tar -czf ci/docker/manylinux/krb5-${KRB}.tar.gz krb5-${KRB}


docker_repo="parallelssh/ssh-manylinux"
docker_files=(
"ci/docker/manylinux/Dockerfile"
"ci/docker/manylinux/Dockerfile.2014_x86_64"
# "ci/docker/manylinux/Dockerfile.manylinux_2_24_x86_64"
# "ci/docker/manylinux/Dockerfile.manylinux_2_28_x86_64"
Expand Down Expand Up @@ -53,7 +55,7 @@ for docker_file in "${docker_files[@]}"; do
fi
echo "Docker tag is ${docker_tag}"
docker pull $docker_tag || echo
docker build --pull --cache-from $docker_tag ci/docker/manylinux -t $docker_tag -f "${docker_file}"
docker build --progress=plain --pull --cache-from $docker_tag ci/docker/manylinux -t $docker_tag -f "${docker_file}"
if [[ -z "${CIRCLE_PULL_REQUEST}" ]]; then docker push $docker_tag; fi
docker run --rm -v "$(pwd)":/io $docker_tag /io/ci/build-wheels.sh
ls wheelhouse/
Expand Down
2 changes: 2 additions & 0 deletions ci/build-wheels.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ done

# Bundle external shared libraries into the wheels
for whl in wheelhouse/*.whl; do
# auditwheel show "$whl"
auditwheel repair "$whl" -w /io/wheelhouse/
auditwheel show "$whl"
done

# Install packages and test
Expand Down
48 changes: 0 additions & 48 deletions ci/docker/manylinux/Dockerfile

This file was deleted.

35 changes: 19 additions & 16 deletions ci/docker/manylinux/Dockerfile.2014_x86_64
Original file line number Diff line number Diff line change
@@ -1,35 +1,38 @@
FROM quay.io/pypa/manylinux2014_x86_64

ENV OPENSSL openssl-3.4.0
ENV LIBSSH 0.11.1
ENV KRB 1.21.3
ENV SYSTEM_LIBSSH 1
ENV CFLAGS "-g0 -s"
ENV OPENSSL=openssl-3.4.0
ENV LIBSSH=0.11.1
ENV SYSTEM_LIBSSH=1
ENV KRB=1.21.3
ENV CFLAGS="-g0 -s"

RUN yum install zlib-devel cmake3 perl-IPC-Cmd -y

ADD libssh-${LIBSSH}.tar.xz libssh.tar.xz
ADD libssh-${LIBSSH}.tar.gz libssh.tar.gz
ADD krb5-${KRB}.tar.gz krb5.tar.gz
ADD https://www.openssl.org/source/${OPENSSL}.tar.gz ${OPENSSL}.tar.gz
ADD krb5-${KRB}.tar.xz krb5-${KRB}.tar.xz


# Kerberos
RUN cd krb5.tar.gz/krb5-${KRB}/src && \
./configure && \
make -j6 && \
make install


RUN tar -xzf ${OPENSSL}.tar.gz
# Openssl
RUN cd ${OPENSSL} && \
./config --prefix=/usr --openssldir=/usr/openssl threads shared && \
make -j6 && make install_sw

# Kerberos
RUN cd krb5-${KRB}.tar.xz/krb5-${KRB}/src && \
./configure && \
make -j6 && \
make install

# Libssh
RUN mkdir -p build_libssh && cd build_libssh && \
cmake3 ../libssh.tar.xz/libssh-${LIBSSH} -DCMAKE_BUILD_TYPE=Release \
-DWITH_GSSAPI=ON -DWITH_EXAMPLES=OFF && \
RUN cc --version; openssl version -a; mkdir -p build_libssh && cd build_libssh && \
cmake3 ../libssh.tar.gz/libssh -DCMAKE_BUILD_TYPE=Release \
-DWITH_GSSAPI=ON -DWITH_EXAMPLES=OFF -DUNIT_TESTING=OFF && \
make -j6 install/strip

RUN rm -rf ${OPENSSL}* libssh build_libssh krb5-${KRB}.tar.xz
RUN rm -rf ${OPENSSL}* libssh.tar.gz build_libssh krb5.tar.gz

VOLUME /var/cache
37 changes: 20 additions & 17 deletions ci/docker/manylinux/Dockerfile.aarch64
Original file line number Diff line number Diff line change
@@ -1,35 +1,38 @@
FROM quay.io/pypa/manylinux2014_aarch64

ENV OPENSSL openssl-3.4.0
ENV LIBSSH 0.11.1
ENV KRB 1.21.3
ENV SYSTEM_LIBSSH 1
ENV CFLAGS "-g0 -s"
ENV OPENSSL=openssl-3.4.0
ENV LIBSSH=0.11.1
ENV SYSTEM_LIBSSH=1
ENV KRB=1.21.3
ENV CFLAGS="-g0 -s"

RUN yum install epel-release -y && yum install zlib-devel cmake3 perl-IPC-Cmd -y
RUN yum install epel-release -y && yum install zlib-devel cmake3 perl-IPC-Cmd -y && yum remove -y openssl

ADD libssh-${LIBSSH}.tar.xz libssh.tar.xz
ADD libssh-${LIBSSH}.tar.gz libssh.tar.gz
ADD krb5-${KRB}.tar.gz krb5.tar.gz
ADD https://www.openssl.org/source/${OPENSSL}.tar.gz ${OPENSSL}.tar.gz
ADD krb5-${KRB}.tar.xz krb5-${KRB}.tar.xz


# Kerberos
RUN cd krb5.tar.gz/krb5-${KRB}/src && \
./configure && \
make -j6 && \
make install


RUN tar -xzf ${OPENSSL}.tar.gz
# Openssl
RUN cd ${OPENSSL} && \
./config --prefix=/usr --openssldir=/usr/openssl threads shared && \
make -j6 && make install_sw

# Kerberos
RUN cd krb5-${KRB}.tar.xz/krb5-${KRB}/src && \
./configure && \
make -j6 && \
make install

# Libssh
RUN mkdir -p build_libssh && cd build_libssh && \
cmake3 ../libssh.tar.xz/libssh-${LIBSSH} -DCMAKE_BUILD_TYPE=Release \
-DWITH_GSSAPI=ON -DWITH_EXAMPLES=OFF && \
RUN cc --version; openssl version -a; mkdir -p build_libssh && cd build_libssh && \
cmake3 ../libssh.tar.gz/libssh -DCMAKE_BUILD_TYPE=Release \
-DWITH_GSSAPI=ON -DWITH_EXAMPLES=OFF -DUNIT_TESTING=OFF && \
make -j6 install/strip

RUN rm -rf ${OPENSSL}* libssh build_libssh krb5-${KRB}.tar.xz
RUN rm -rf ${OPENSSL}* libssh.tar.gz build_libssh krb5.tar.gz

VOLUME /var/cache
Loading