Skip to content

Commit 0931e21

Browse files
author
Pan
committed
Updated setup.py, ssh build script and associated files to build and set library run time path for embedded libssh. Removed unused file.
1 parent 18ab721 commit 0931e21

File tree

5 files changed

+22
-55
lines changed

5 files changed

+22
-55
lines changed

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,5 @@ exclude .travis.yml
55
include LICENSE
66
include ssh/*.pyx
77
include ssh/*.pxd
8+
recursive-include libssh *
9+
include ci/build_ssh.sh

README.rst

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,27 @@
11
ssh-python
22
============
33

4-
Wrapper for libssh_ C library.
5-
4+
Bindings for libssh_ C library.
65

76
Installation
87
_____________
98

109
Currently only installation from source is provided. Binary wheels to follow.
1110

12-
To install from source, run the following after cloning the repository
11+
To install from source, run the following:
1312

1413
.. code-block:: shell
1514
16-
python setup.py install
15+
pip install ssh-python
16+
17+
18+
Project is beta status.
1719

1820

1921
Prerequisites
2022
--------------
2123

22-
* OpenSSL library and development headers
24+
* OpenSSL *or* gcrypt library and development headers
2325
* Optionally Zlib library and development headers for compression
2426

2527
``Libssh`` source code is embedded in this project and will be built when installation is triggered per above instructions. Versions of ``libssh`` other than the one embedded in this project are not supported.
@@ -71,8 +73,7 @@ _________
7173
The library uses `Cython`_ based native code extensions as wrappers to ``libssh``.
7274

7375
* Thread safe - GIL is released as much as possible
74-
* Very low overhead
75-
* Super fast as a consequence of the excellent C library it uses and prodigious use of native code
76+
* Very low overhead thin wrapper
7677
* Object oriented - memory freed automatically and safely as objects are garbage collected by Python
7778
* Use Python semantics where applicable, such as context manager and iterator support for opening and reading from channels and SFTP file handles
7879
* Raise errors as Python exceptions

ci/build_ssh.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ mkdir -p src && cd src
88
cmake -DCMAKE_BUILD_TYPE=Release ../libssh
99
make -j6
1010
cd ..
11+
cp src/src/libssh.so.4 ssh/

setup.py

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def build_ssh():
3232
'--help' in sys.argv[1:] or
3333
sys.argv[1] in (
3434
'--help-commands', 'egg_info', '--version', 'clean',
35-
'--long-description')) and
35+
'sdist', '--long-description')) and
3636
__name__ == '__main__'):
3737
build_ssh()
3838

@@ -73,13 +73,13 @@ def build_ssh():
7373
include_dirs=["libssh/include"],
7474
libraries=_libs,
7575
library_dirs=[_lib_dir],
76-
runtime_library_dirs=[_lib_dir],
76+
runtime_library_dirs=["$ORIGIN/."],
7777
extra_compile_args=_comp_args,
7878
**cython_args
7979
)
8080
for i in range(len(sources))]
8181

82-
package_data = {'ssh': ['*.pxd']}
82+
package_data = {'ssh': ['*.pxd', 'libssh.so.4']}
8383

8484
if ON_WINDOWS:
8585
package_data['ssh'].extend([
@@ -108,9 +108,11 @@ def build_ssh():
108108
include_package_data=True,
109109
platforms='any',
110110
classifiers=[
111+
'Development Status :: 4 - Beta',
111112
'License :: OSI Approved :: GNU Lesser General Public License v2 (LGPLv2)',
112113
'Intended Audience :: Developers',
113114
'Operating System :: OS Independent',
115+
'Programming Language :: C',
114116
'Programming Language :: Python',
115117
'Programming Language :: Python :: 2',
116118
'Programming Language :: Python :: 2.6',
@@ -119,9 +121,15 @@ def build_ssh():
119121
'Programming Language :: Python :: 3.4',
120122
'Programming Language :: Python :: 3.5',
121123
'Programming Language :: Python :: 3.6',
124+
'Programming Language :: Python :: 3.7',
125+
'Topic :: System :: Shells',
126+
'Topic :: System :: Networking',
127+
'Topic :: Software Development :: Libraries',
122128
'Topic :: Software Development :: Libraries :: Python Modules',
129+
'Operating System :: POSIX',
123130
'Operating System :: POSIX :: Linux',
124131
'Operating System :: POSIX :: BSD',
132+
'Operating System :: MacOS :: MacOS X',
125133
],
126134
ext_modules=extensions,
127135
package_data=package_data,

ssh/ssh.pyx

Lines changed: 0 additions & 45 deletions
This file was deleted.

0 commit comments

Comments
 (0)