Skip to content

Commit c9e475f

Browse files
authored
Manylinux changes (#92)
* Removed manylinux 2010 builds and files. Removed manylinux2010 from build script. * Updated manylinux build script to use embedded libssh. Removed archive files. Updated embedded build script, CI cfgs. * Updated appveyor cfg * Updated embedded libssh. * Updated CI cfgs * Updated dockerfiles * Removed zlib archive, added source. * Added krb5 source. * Updated build scripts
1 parent d90ea3e commit c9e475f

File tree

5,013 files changed

+1060064
-13126
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

5,013 files changed

+1060064
-13126
lines changed

Diff for: .appveyor.yml

+13-6
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ build:
1919
verbosity: minimal
2020
skip_branch_with_pr: true
2121
image: Visual Studio 2019
22+
clone_script: echo Skip AppVeyor Clone
2223

2324
environment:
2425
global:
@@ -32,7 +33,7 @@ environment:
3233
PYTHON_DEF: "C:\\Python38-x64"
3334
PYTHON_VERSION: "3.8"
3435
# Python versions to build wheels for
35-
PYTHONVERS: C:\Python38-x64 C:\Python39-x64 C:\Python310-x64 C:\Python311-x64 C:\Python312-x64
36+
PYTHONVERS: C:\Python37-x64 C:\Python38-x64 C:\Python39-x64 C:\Python310-x64 C:\Python311-x64 C:\Python312-x64 C:\Python313-x64
3637
PYTHON_ARCH: "64"
3738

3839
install:
@@ -45,6 +46,17 @@ install:
4546
https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
4647
Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
4748
throw "There are newer queued builds for this pull request, failing early." }
49+
50+
# Git checkout
51+
- git config --global filter.lfs.smudge "git-lfs smudge --skip -- %f"
52+
- git config --global filter.lfs.process "git-lfs filter-process --skip"
53+
- git init %APPVEYOR_BUILD_FOLDER%
54+
- cd %APPVEYOR_BUILD_FOLDER%
55+
- git remote add origin https://github.com/%APPVEYOR_REPO_NAME%.git
56+
- git fetch -q origin %APPVEYOR_REPO_COMMIT%
57+
- git fetch --tags
58+
- git checkout -qf %APPVEYOR_REPO_COMMIT%
59+
4860
- set OPENSSL_DIR="C:\OpenSSL-v34-Win64"
4961
- set VCLIBDIR=%WINDIR%\System32
5062
- cp %VCLIBDIR%/vcruntime140.dll ssh/
@@ -60,11 +72,6 @@ install:
6072
# do not cause a version change.
6173
- "%PYTHON_DEF%\\python.exe ci/appveyor/fix_version.py ."
6274
- mv -f .git .git.bak
63-
- 7z x ci\appveyor\zlib1211.zip
64-
# - appveyor DownloadFile http://web.mit.edu/kerberos/dist/kfw/4.1/kfw-4.1-amd64.msi
65-
# - msiexec /i kfw-4.1-amd64.msi /passive /qn
66-
# - ps: ls "C:\Program Files\MIT\Kerberos\"
67-
# - cp "C:\Program Files\MIT\Kerberos\*.dll" ssh/
6875
- ps: ls ssh/*.dll
6976
- ps: ls ssh
7077
- ps: ls

Diff for: .circleci/config.yml

+10-10
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ jobs:
3636
command: |
3737
pip uninstall -y cython
3838
pip install -e .
39+
python -c 'from ssh.session import Session; Session()'
3940
eval "$(ssh-agent -s)"
4041
name: Build
4142
- run:
@@ -80,7 +81,7 @@ jobs:
8081
- run:
8182
name: deps
8283
command: |
83-
brew install cmake git-lfs krb5 python libssh
84+
brew install cmake python libssh
8485
brew link --force openssl
8586
brew link --force libssh
8687
pip3 install twine
@@ -94,20 +95,15 @@ jobs:
9495
- run:
9596
name: Upload Wheel
9697
command: |
97-
twine upload --skip-existing -u $PYPI_USER -p $PYPI_PASSWORD wheels/*
98+
if [[ ! -z "$CIRCLE_TAG" ]]; then
99+
twine upload --skip-existing -u $PYPI_USER -p $PYPI_PASSWORD wheels/*
100+
fi
98101
99102
manylinux-x86_64:
100103
machine:
101104
image: ubuntu-2004:current
102105
steps: &manylinux-steps
103106
- checkout
104-
- run:
105-
name: Git LFS
106-
command: |
107-
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
108-
sudo apt-get install git-lfs
109-
git lfs install
110-
git lfs pull
111107
- run:
112108
name: Deps
113109
command: |
@@ -119,6 +115,8 @@ jobs:
119115
- run:
120116
name: Build Wheels
121117
command: |
118+
export LIBSSH=0.11.1
119+
export KRB=1.21.3
122120
if [[ -z "${CIRCLE_PR_NUMBER}" ]]; then
123121
echo "$DOCKER_PASSWORD" | docker login -u="$DOCKER_USERNAME" --password-stdin;
124122
fi
@@ -131,7 +129,9 @@ jobs:
131129
- run:
132130
name: Upload Wheels
133131
command: |
134-
twine upload --skip-existing -u $PYPI_USER -p $PYPI_PASSWORD dist/* wheelhouse/*
132+
if [[ ! -z "$CIRCLE_TAG" ]]; then
133+
twine upload --skip-existing -u $PYPI_USER -p $PYPI_PASSWORD dist/* wheelhouse/*
134+
fi
135135
136136
manylinux-aarch64:
137137
machine:

Diff for: .gitattributes

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
1-
*.tar.gz filter=lfs diff=lfs merge=lfs -text
2-
*.rpm filter=lfs diff=lfs merge=lfs -text
3-
*.zip filter=lfs diff=lfs merge=lfs -text
4-
*.xz filter=lfs diff=lfs merge=lfs -text
1+
ci/appveyor/zlib1211.zip export-subst
52
ssh/_version.py export-subst

Diff for: .gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@ libssh/compile_commands.json
1111
/.idea
1212
/ci/integration_tests/unit_test_cert_key-cert.pub
1313
/doc/_build
14+
ci/docker/manylinux/*.tar.gz
15+
ci/appveyor/zlib-1.2.11.zip

Diff for: Changelog.rst

+20
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,26 @@
11
Change Log
22
=============
33

4+
1.1.1
5+
+++++
6+
7+
Changes
8+
--------
9+
10+
No code changes.
11+
12+
13+
Packaging
14+
----------
15+
16+
* Added Windows Python 3.7 and 3.13 wheel builds.
17+
* Removed manylinux 2010 wheels.
18+
* Wheel builds now use embedded libssh.
19+
* Source distribution now uses embedded libssh.
20+
* Added embedded krb5 for wheel builds.
21+
* Dockerfiles and scripts updates.
22+
23+
424
1.1.0
525
+++++
626

Diff for: README.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Bindings for libssh_ C library.
2525
Installation
2626
_____________
2727

28-
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).
28+
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+).
2929

3030
Wheels have *no dependencies*.
3131

Diff for: _setup_libssh.py

+1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ def build_ssh():
4545
check_call("""cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=../local \
4646
-DWITH_GSSAPI=ON \
4747
-DWITH_EXAMPLES=OFF \
48+
-DUNIT_TESTING=OFF \
4849
../libssh""",
4950
shell=True, env=os.environ)
5051
check_call(['make', '-j%s' % (cpu_count(),), 'all', 'install'])

Diff for: ci/appveyor/build_krb.bat

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ refreshenv
22
set KRB_INSTALL_DIR=%APPVEYOR_HOME_DIR%/src/lib
33
set CPU=AMD64
44
setenv /x64 /release
5-
cd kfw-4.1/src
5+
cd krb-1.21.3/src
66
make -f Makefile.in prep-windows
77
make
88
make install

Diff for: ci/appveyor/build_ssh.bat

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ cmake ..\libssh ^
1010
-DZLIB_INCLUDE_DIR=C:/zlib/include ^
1111
-DWITH_GSSAPI=ON ^
1212
-DWITH_EXAMPLES=OFF ^
13+
-DUNIT_TESTING=OFF ^
1314
-DOPENSSL_ROOT_DIR=%OPENSSL_DIR%
1415

1516

Diff for: ci/appveyor/zlib1211.zip

-3
This file was deleted.

Diff for: ci/build-manylinux.sh

+4-2
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,12 @@
1515
# License along with this library; if not, write to the Free Software
1616
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
1717

18+
tar -czf ci/docker/manylinux/libssh-${LIBSSH}.tar.gz libssh
19+
tar -czf ci/docker/manylinux/krb5-${KRB}.tar.gz krb5-${KRB}
20+
1821

1922
docker_repo="parallelssh/ssh-manylinux"
2023
docker_files=(
21-
"ci/docker/manylinux/Dockerfile"
2224
"ci/docker/manylinux/Dockerfile.2014_x86_64"
2325
# "ci/docker/manylinux/Dockerfile.manylinux_2_24_x86_64"
2426
# "ci/docker/manylinux/Dockerfile.manylinux_2_28_x86_64"
@@ -53,7 +55,7 @@ for docker_file in "${docker_files[@]}"; do
5355
fi
5456
echo "Docker tag is ${docker_tag}"
5557
docker pull $docker_tag || echo
56-
docker build --pull --cache-from $docker_tag ci/docker/manylinux -t $docker_tag -f "${docker_file}"
58+
docker build --progress=plain --pull --cache-from $docker_tag ci/docker/manylinux -t $docker_tag -f "${docker_file}"
5759
if [[ -z "${CIRCLE_PULL_REQUEST}" ]]; then docker push $docker_tag; fi
5860
docker run --rm -v "$(pwd)":/io $docker_tag /io/ci/build-wheels.sh
5961
ls wheelhouse/

Diff for: ci/build-wheels.sh

+2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ done
2626

2727
# Bundle external shared libraries into the wheels
2828
for whl in wheelhouse/*.whl; do
29+
# auditwheel show "$whl"
2930
auditwheel repair "$whl" -w /io/wheelhouse/
31+
auditwheel show "$whl"
3032
done
3133

3234
# Install packages and test

Diff for: ci/docker/manylinux/Dockerfile

-48
This file was deleted.

Diff for: ci/docker/manylinux/Dockerfile.2014_x86_64

+19-16
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,38 @@
11
FROM quay.io/pypa/manylinux2014_x86_64
22

3-
ENV OPENSSL openssl-3.4.0
4-
ENV LIBSSH 0.11.1
5-
ENV KRB 1.21.3
6-
ENV SYSTEM_LIBSSH 1
7-
ENV CFLAGS "-g0 -s"
3+
ENV OPENSSL=openssl-3.4.0
4+
ENV LIBSSH=0.11.1
5+
ENV SYSTEM_LIBSSH=1
6+
ENV KRB=1.21.3
7+
ENV CFLAGS="-g0 -s"
88

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

11-
ADD libssh-${LIBSSH}.tar.xz libssh.tar.xz
11+
ADD libssh-${LIBSSH}.tar.gz libssh.tar.gz
12+
ADD krb5-${KRB}.tar.gz krb5.tar.gz
1213
ADD https://www.openssl.org/source/${OPENSSL}.tar.gz ${OPENSSL}.tar.gz
13-
ADD krb5-${KRB}.tar.xz krb5-${KRB}.tar.xz
14+
15+
16+
# Kerberos
17+
RUN cd krb5.tar.gz/krb5-${KRB}/src && \
18+
./configure && \
19+
make -j6 && \
20+
make install
21+
1422

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

21-
# Kerberos
22-
RUN cd krb5-${KRB}.tar.xz/krb5-${KRB}/src && \
23-
./configure && \
24-
make -j6 && \
25-
make install
2629

2730
# Libssh
28-
RUN mkdir -p build_libssh && cd build_libssh && \
29-
cmake3 ../libssh.tar.xz/libssh-${LIBSSH} -DCMAKE_BUILD_TYPE=Release \
30-
-DWITH_GSSAPI=ON -DWITH_EXAMPLES=OFF && \
31+
RUN cc --version; openssl version -a; mkdir -p build_libssh && cd build_libssh && \
32+
cmake3 ../libssh.tar.gz/libssh -DCMAKE_BUILD_TYPE=Release \
33+
-DWITH_GSSAPI=ON -DWITH_EXAMPLES=OFF -DUNIT_TESTING=OFF && \
3134
make -j6 install/strip
3235

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

3538
VOLUME /var/cache

Diff for: ci/docker/manylinux/Dockerfile.aarch64

+20-17
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,38 @@
11
FROM quay.io/pypa/manylinux2014_aarch64
22

3-
ENV OPENSSL openssl-3.4.0
4-
ENV LIBSSH 0.11.1
5-
ENV KRB 1.21.3
6-
ENV SYSTEM_LIBSSH 1
7-
ENV CFLAGS "-g0 -s"
3+
ENV OPENSSL=openssl-3.4.0
4+
ENV LIBSSH=0.11.1
5+
ENV SYSTEM_LIBSSH=1
6+
ENV KRB=1.21.3
7+
ENV CFLAGS="-g0 -s"
88

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

11-
ADD libssh-${LIBSSH}.tar.xz libssh.tar.xz
11+
ADD libssh-${LIBSSH}.tar.gz libssh.tar.gz
12+
ADD krb5-${KRB}.tar.gz krb5.tar.gz
1213
ADD https://www.openssl.org/source/${OPENSSL}.tar.gz ${OPENSSL}.tar.gz
13-
ADD krb5-${KRB}.tar.xz krb5-${KRB}.tar.xz
14+
15+
16+
# Kerberos
17+
RUN cd krb5.tar.gz/krb5-${KRB}/src && \
18+
./configure && \
19+
make -j6 && \
20+
make install
21+
1422

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

21-
# Kerberos
22-
RUN cd krb5-${KRB}.tar.xz/krb5-${KRB}/src && \
23-
./configure && \
24-
make -j6 && \
25-
make install
2629

2730
# Libssh
28-
RUN mkdir -p build_libssh && cd build_libssh && \
29-
cmake3 ../libssh.tar.xz/libssh-${LIBSSH} -DCMAKE_BUILD_TYPE=Release \
30-
-DWITH_GSSAPI=ON -DWITH_EXAMPLES=OFF && \
31+
RUN cc --version; openssl version -a; mkdir -p build_libssh && cd build_libssh && \
32+
cmake3 ../libssh.tar.gz/libssh -DCMAKE_BUILD_TYPE=Release \
33+
-DWITH_GSSAPI=ON -DWITH_EXAMPLES=OFF -DUNIT_TESTING=OFF && \
3134
make -j6 install/strip
3235

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

3538
VOLUME /var/cache

0 commit comments

Comments
 (0)