Skip to content

Commit 4b0a7a8

Browse files
authored
Libssh2 upg (#179)
* Upgraded libssh2 to 1.10.0. * Regenerated with latest cython. * Updated docker files for new libssh2 and openssl versions. Removed obsolete file. * Updated readthedocs config. * Updated setup.py, CI cfgs, CI scripts. * Updated Changelog.
1 parent 0064a2d commit 4b0a7a8

File tree

583 files changed

+212304
-6306
lines changed

Some content is hidden

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

583 files changed

+212304
-6306
lines changed

.appveyor.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ build_script:
6969
- for %%I in (%PYTHONVERS%) do cp C:/zlib/lib/zlibstatic.lib %%I/libs/
7070
- for %%I in (%PYTHONVERS%) do ls %%I/libs/
7171
- ci\\appveyor\\build_ssh2.bat
72-
- for %%I in (%PYTHONVERS%) do cp src/src/libssh2.lib %%I/libs/ || cp src/src/Release/libssh2.lib %%I/libs/
72+
- for %%I in (%PYTHONVERS%) do cp build_dir/src/libssh2.lib %%I/libs/ || cp build_dir/src/Release/libssh2.lib %%I/libs/
7373
- rm -f ssh2/*.c
7474
- ps: ls ssh2
7575
- for %%I in (%PYTHONVERS%) do %%I\python.exe -V

.circleci/config.yml

+4-8
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# This file is part of ssh2-python.
2-
# Copyright (C) 2017-2021 Panos Kittenis and contributors.
2+
# Copyright (C) 2017-2022 Panos Kittenis and contributors.
33
#
44
# This library is free software; you can redistribute it and/or
55
# modify it under the terms of the GNU Lesser General Public
@@ -34,6 +34,7 @@ jobs:
3434
- run:
3535
name: Deps
3636
command: |
37+
sudo apt-get update
3738
sudo apt-get install cmake openssh-server
3839
pip install -r requirements_dev.txt
3940
- python/save-cache:
@@ -89,7 +90,7 @@ jobs:
8990
9091
manylinux-x86_64:
9192
machine:
92-
image: ubuntu-1604:201903-01
93+
image: ubuntu-2004:202201-02
9394
steps: &manylinux-steps
9495
- checkout
9596
- python/load-cache:
@@ -106,7 +107,6 @@ jobs:
106107
name: Deps
107108
command: |
108109
sudo apt-get install python3-pip
109-
pyenv global 3.7.0 || pyenv global 3.9.1
110110
pip install -U pip
111111
pip install twine
112112
which twine
@@ -145,7 +145,6 @@ workflows:
145145
parameters:
146146
python_ver:
147147
- "3.6"
148-
- "3.7"
149148
- "3.8"
150149
- "3.9"
151150
- "3.10"
@@ -164,11 +163,8 @@ workflows:
164163
matrix:
165164
parameters:
166165
xcode_ver:
166+
- "14.0.0"
167167
- "13.1.0"
168-
- "13.0.0"
169-
- "12.5.1"
170-
- "11.6.0"
171-
- "11.1.0"
172168
filters:
173169
tags:
174170
only: /.*/

.environment.yml

-8
This file was deleted.

.github/CODEOWNERS

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @pkittenis

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ dist
44
build
55
*~
66
*.so
7-
src
7+
build_dir
88
wheelhouse
99
.idea/
1010
ssh2/libssh2.so*

.readthedocs.yml

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
conda:
2-
file: .environment.yml
1+
version: 2
2+
build:
3+
apt_packages:
4+
- cmake
5+
- openssl
36
python:
4-
setup_py_install: true
7+
install:
8+
- method: pip
9+
path: .

Changelog.rst

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

4+
1.0.0
5+
++++++
6+
7+
Changes
8+
--------
9+
10+
* Upgraded embedded and wheel libssh2 to 1.10.0.
11+
* Upgraded wheel OpenSSL to 1.1.1q.
12+
* Added testing for Python 3.10.
13+
* Removed testing for Python 3.7.
14+
15+
Packaging
16+
----------
17+
18+
* Added OSX 12.0 wheels.
19+
* Removed OSX <= 10.0 wheels.
20+
421
0.27.0
522
++++++
623

MANIFEST.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ recursive-exclude docker *
33
include _setup_libssh2.py
44
include versioneer.py
55
include ssh2/_version.py
6-
exclude .travis.yml
6+
recursive-exclude .circleci
77
include LICENSE
88
include ssh2/*.pyx
99
include ssh2/*.pxd

_setup_libssh2.py

+5-6
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
from subprocess import check_call
2020
from glob import glob
2121
from shutil import copy2
22-
from multiprocessing import cpu_count
2322

2423

2524
def build_ssh2():
@@ -29,16 +28,16 @@ def build_ssh2():
2928
if os.path.exists('/usr/local/opt/openssl'):
3029
os.environ['OPENSSL_ROOT_DIR'] = '/usr/local/opt/openssl'
3130

32-
if not os.path.exists('src'):
33-
os.mkdir('src')
31+
if not os.path.exists('build_dir'):
32+
os.mkdir('build_dir')
3433

35-
os.chdir('src')
36-
check_call('cmake ../libssh2 -DBUILD_SHARED_LIBS=ON \
34+
os.chdir('build_dir')
35+
check_call('cmake ../libssh2/libssh2 -DBUILD_SHARED_LIBS=ON \
3736
-DENABLE_ZLIB_COMPRESSION=ON -DENABLE_CRYPT_NONE=ON \
3837
-DENABLE_MAC_NONE=ON -DCRYPTO_BACKEND=OpenSSL',
3938
shell=True, env=os.environ)
4039
check_call('cmake --build . --config Release', shell=True, env=os.environ)
4140
os.chdir('..')
4241

43-
for src in glob('src/src/libssh2.so*'):
42+
for src in glob('build_dir/src/libssh2.so*'):
4443
copy2(src, 'ssh2/')

ci/appveyor/build_ssh2.bat

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
mkdir src
2-
cd src
1+
mkdir build_dir
2+
cd build_dir
33

44
ECHO "Building with platform %MSVC%"
5-
cmake ..\libssh2 -G "NMake Makefiles" ^
5+
cmake ..\libssh2\libssh2 -G "NMake Makefiles" ^
66
-DCMAKE_BUILD_TYPE=Release ^
77
-DCRYPTO_BACKEND=OpenSSL ^
88
-G"%MSVC%" ^

ci/build-manylinux.sh

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash -xe
22
# This file is part of ssh2-python.
3-
# Copyright (C) 2017-2021 Panos Kittenis and contributors.
3+
# Copyright (C) 2017-2022 Panos Kittenis and contributors.
44
#
55
# This library is free software; you can redistribute it and/or
66
# modify it under the terms of the GNU Lesser General Public
@@ -21,18 +21,18 @@ docker_files=("ci/docker/manylinux/Dockerfile" "ci/docker/manylinux/Dockerfile.2
2121
rm -rf build ssh2/libssh2.* ssh2/*.so
2222
python ci/appveyor/fix_version.py .
2323

24-
if [[ `uname -m` == "aarch64" ]]; then
24+
if [[ $(uname -m) == "aarch64" ]]; then
2525
docker_tag="${docker_tag}:aarch64"
2626
docker_files=("ci/docker/manylinux/Dockerfile.aarch64")
2727
fi
2828

29-
for docker_file in ${docker_files[@]}; do
29+
for docker_file in "${docker_files[@]}"; do
3030
if [[ ${docker_file} == "ci/docker/manylinux/Dockerfile_2014_x86_64" ]]; then
31-
docker_tag = "${docker_tag}:2014_x86_64"
31+
docker_tag="${docker_tag}:2014_x86_64"
3232
fi
3333
docker pull $docker_tag || echo
3434
docker build --pull --cache-from $docker_tag ci/docker/manylinux -t $docker_tag -f ${docker_file}
3535
if [[ -z "${CIRCLE_PULL_REQUEST}" ]]; then docker push $docker_tag; fi
36-
docker run --rm -v `pwd`:/io $docker_tag /io/ci/build-wheels.sh
36+
docker run --rm -v "$(pwd)":/io $docker_tag /io/ci/build-wheels.sh
3737
ls wheelhouse/
3838
done

ci/build-ssh2.sh

-6
This file was deleted.

ci/build-wheels.sh

+6-10
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash -xe
22
# This file is part of ssh2-python.
3-
# Copyright (C) 2017-2021 Panos Kittenis and contributors.
3+
# Copyright (C) 2017-2022 Panos Kittenis and contributors.
44
#
55
# This library is free software; you can redistribute it and/or
66
# modify it under the terms of the GNU Lesser General Public
@@ -15,12 +15,10 @@
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-
echo "Travis tag: $TRAVIS_TAG"
19-
2018
# Compile wheels
2119
# For testing
2220
# for PYBIN in `ls -1d /opt/python/cp36-cp36m/bin | grep -v cpython`; do
23-
for PYBIN in `ls -1d /opt/python/*/bin | grep -v cpython`; do
21+
for PYBIN in $(ls -1d /opt/python/*/bin | grep -v cpython); do
2422
"${PYBIN}/pip" wheel /io/ -w wheelhouse/
2523
done
2624

@@ -30,9 +28,7 @@ for whl in wheelhouse/*.whl; do
3028
done
3129

3230
# Install packages and test
33-
if [[ ! -z "$TRAVIS_TAG" ]]; then
34-
for PYBIN in `ls -1d /opt/python/*/bin | grep -v cpython`; do
35-
"${PYBIN}/pip" install ssh2-python --no-index -f /io/wheelhouse
36-
(cd "$HOME"; "${PYBIN}/python" -c 'from ssh2.session import Session; Session()')
37-
done
38-
fi
31+
for PYBIN in $(ls -1d /opt/python/*/bin | grep -v cpython); do
32+
"${PYBIN}/pip" install ssh2-python --no-index -f /io/wheelhouse
33+
(cd "$HOME"; "${PYBIN}/python" -c 'from ssh2.session import Session; Session()')
34+
done

ci/docker/manylinux/Dockerfile

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# This file is part of ssh2-python.
2-
# Copyright (C) 2017-2021 Panos Kittenis and contributors.
2+
# Copyright (C) 2017-2022 Panos Kittenis and contributors.
33
#
44
# This library is free software; you can redistribute it and/or
55
# modify it under the terms of the GNU Lesser General Public
@@ -15,9 +15,9 @@
1515
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
1616
FROM quay.io/pypa/manylinux2010_x86_64
1717

18-
ENV OPENSSL openssl-1.1.1g
18+
ENV OPENSSL openssl-1.1.1q
1919
ENV SYSTEM_LIBSSH2 1
20-
ENV LIBSSH2_VERSION 1.9.0
20+
ENV LIBSSH2_VERSION 1.10.0
2121

2222
RUN yum install zlib-devel -y
2323

@@ -32,7 +32,7 @@ RUN cd ${OPENSSL} && \
3232

3333
# Libssh2
3434
RUN mkdir -p build_libssh2 && cd build_libssh2 && \
35-
cmake ../libssh2-${LIBSSH2_VERSION}.tar.gz/libssh2-libssh2-${LIBSSH2_VERSION} \
35+
cmake ../libssh2-${LIBSSH2_VERSION}.tar.gz/libssh2-${LIBSSH2_VERSION} \
3636
-DBUILD_SHARED_LIBS=ON -DENABLE_ZLIB_COMPRESSION=ON \
3737
-DENABLE_CRYPT_NONE=ON -DENABLE_MAC_NONE=ON -DCMAKE_INSTALL_PREFIX=/usr && \
3838
cmake --build . --config Release --target install

ci/docker/manylinux/Dockerfile.2014_x86_64

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# This file is part of ssh2-python.
2-
# Copyright (C) 2017-2021 Panos Kittenis and contributors.
2+
# Copyright (C) 2017-2022 Panos Kittenis and contributors.
33
#
44
# This library is free software; you can redistribute it and/or
55
# modify it under the terms of the GNU Lesser General Public
@@ -15,9 +15,9 @@
1515
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
1616
FROM quay.io/pypa/manylinux2014_x86_64
1717

18-
ENV OPENSSL openssl-1.1.1g
18+
ENV OPENSSL openssl-1.1.1q
1919
ENV SYSTEM_LIBSSH2 1
20-
ENV LIBSSH2_VERSION 1.9.0
20+
ENV LIBSSH2_VERSION 1.10.0
2121

2222
RUN yum install zlib-devel -y
2323

@@ -32,7 +32,7 @@ RUN cd ${OPENSSL} && \
3232

3333
# Libssh2
3434
RUN mkdir -p build_libssh2 && cd build_libssh2 && \
35-
cmake ../libssh2-${LIBSSH2_VERSION}.tar.gz/libssh2-libssh2-${LIBSSH2_VERSION} \
35+
cmake ../libssh2-${LIBSSH2_VERSION}.tar.gz/libssh2-${LIBSSH2_VERSION} \
3636
-DBUILD_SHARED_LIBS=ON -DENABLE_ZLIB_COMPRESSION=ON \
3737
-DENABLE_CRYPT_NONE=ON -DENABLE_MAC_NONE=ON -DCMAKE_INSTALL_PREFIX=/usr && \
3838
cmake --build . --config Release --target install

ci/docker/manylinux/Dockerfile.aarch64

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# This file is part of ssh2-python.
2-
# Copyright (C) 2017-2021 Panos Kittenis and contributors.
2+
# Copyright (C) 2017-2022 Panos Kittenis and contributors.
33
#
44
# This library is free software; you can redistribute it and/or
55
# modify it under the terms of the GNU Lesser General Public
@@ -15,9 +15,9 @@
1515
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
1616
FROM quay.io/pypa/manylinux2014_aarch64
1717

18-
ENV OPENSSL openssl-1.1.1g
18+
ENV OPENSSL openssl-1.1.1q
1919
ENV SYSTEM_LIBSSH2 1
20-
ENV LIBSSH2_VERSION 1.9.0
20+
ENV LIBSSH2_VERSION 1.10.0
2121

2222
RUN yum install zlib-devel -y
2323

@@ -32,7 +32,7 @@ RUN cd ${OPENSSL} && \
3232

3333
# Libssh2
3434
RUN mkdir -p build_libssh2 && cd build_libssh2 && \
35-
cmake ../libssh2-${LIBSSH2_VERSION}.tar.gz/libssh2-libssh2-${LIBSSH2_VERSION} \
35+
cmake ../libssh2-${LIBSSH2_VERSION}.tar.gz/libssh2-${LIBSSH2_VERSION} \
3636
-DBUILD_SHARED_LIBS=ON -DENABLE_ZLIB_COMPRESSION=ON \
3737
-DENABLE_CRYPT_NONE=ON -DENABLE_MAC_NONE=ON -DCMAKE_INSTALL_PREFIX=/usr && \
3838
cmake --build . --config Release --target install
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
version https://git-lfs.github.com/spec/v1
2+
oid sha256:2d64e90f3ded394b91d3a2e774ca203a4179f69aebee03003e5a6fa621e41d51
3+
size 965044

ci/docker/manylinux/libssh2-1.9.0.tar.gz

-3
This file was deleted.

ci/install-ssh2.sh

-10
This file was deleted.

ci/osx-wheel.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash -xe
22
# This file is part of ssh2-python.
3-
# Copyright (C) 2017-2021 Panos Kittenis and contributors.
3+
# Copyright (C) 2017-2022 Panos Kittenis and contributors.
44
#
55
# This library is free software; you can redistribute it and/or
66
# modify it under the terms of the GNU Lesser General Public

libssh2/CMakeLists.txt

+8
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,14 @@ if(BUILD_TESTING)
9898
add_subdirectory(tests)
9999
endif()
100100

101+
option(LINT "Check style while building" OFF)
102+
if(LINT)
103+
add_custom_target(lint ALL
104+
./ci/checksrc.sh
105+
WORKING_DIRECTORY ${libssh2_SOURCE_DIR})
106+
add_dependencies(libssh2 lint)
107+
endif()
108+
101109
add_subdirectory(docs)
102110

103111
feature_summary(WHAT ALL)

libssh2/COPYING

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22
* Copyright (c) 2005,2006 Mikhail Gusarov <[email protected]>
33
* Copyright (c) 2006-2007 The Written Word, Inc.
44
* Copyright (c) 2007 Eli Fant <[email protected]>
5-
* Copyright (c) 2009-2014 Daniel Stenberg
5+
* Copyright (c) 2009-2021 Daniel Stenberg
66
* Copyright (C) 2008, 2009 Simon Josefsson
7+
* Copyright (c) 2000 Markus Friedl
8+
* Copyright (c) 2015 Microsoft Corp.
79
* All rights reserved.
810
*
911
* Redistribution and use in source and binary forms,

libssh2/ChangeLog

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
see NEWS

0 commit comments

Comments
 (0)