Skip to content

Implement remaining libssh2 API #1

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 6 commits into from
Aug 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
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
38 changes: 38 additions & 0 deletions Changelog.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
Change Log
=============

0.4.0
------

Changes
________

* Implemented SCP send and recv methods, all versions.
* Conditional compilation of features requiring newer versions of libssh2.
* Implemented channel receive window adjust, x11_*, poll and handle extended data methods.
* Implemented session get/set blocking, get/set timeout.
* Updated agent connection error exception name.
* Renamed session method name to match libssh2.
* Info extension classes for SCP file stat structure.


0.3.1
------

Changes
_________

* Added context manager to SFTP handle
* Implemented SFTP write, seek, stat, fstat and last_error methods.
* Implemented SFTPAttribute object creation and de-allocation - added unit test.


0.3.0
--------

Changes
________

* Updated API
* Updated session, channel, agent and pkey to accept any string type arguments.
* Added get_exit_signal implementation for channel.
53 changes: 22 additions & 31 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,56 +7,47 @@
from multiprocessing import cpu_count

import versioneer
from setuptools import setup, find_packages, Extension
from setuptools import setup, find_packages

cpython = platform.python_implementation() == 'CPython'

try:
from Cython.Build import cythonize
from Cython.Distutils.extension import Extension
from Cython.Distutils import build_ext
except ImportError:
from setuptools import Extension
USING_CYTHON = False
else:
USING_CYTHON = True

ext = 'pyx' if USING_CYTHON else 'c'
sources = ['ssh2/*.%s' % (ext,)]
sources = glob('ssh2/*.%s' % (ext,))
_libs = ['ssh2']
_comp_args = ["-ggdb"] # , "-O3"]
_embedded_lib = bool(os.environ.get('EMBEDDED_LIB'))
cython_args = {'cython_compile_time_env': {'EMBEDDED_LIB': _embedded_lib}} \
if USING_CYTHON else {}

extensions = [
Extension(sources[i].split('.')[0].replace('/', '.'),
sources=[sources[i]],
libraries=_libs,
extra_compile_args=_comp_args,
**cython_args
# For conditional compilation
# pyrex_compile_time_env
)
for i in range(len(sources))]

cmdclass = versioneer.get_cmdclass()
if USING_CYTHON:
extensions = [
Extension('ssh2/*',
sources=sources,
libraries=_libs,
extra_compile_args=_comp_args,
# For conditional compilation
# pyrex_compile_time_env
)
]
extensions = cythonize(
extensions,
compiler_directives={'embedsignature': True,
'optimize.use_switch': True,
'boundscheck': False,
'wraparound': False,
},
nthreads=cpu_count())
else:
sources = glob(sources[0])
extensions = [
Extension(sources[i].split('.')[0].replace('/', '.'),
sources=[sources[i]],
libraries=_libs,
extra_compile_args=_comp_args,
# For conditional compilation
# pyrex_compile_time_env
)
for i in range(len(sources))]
cmdclass['build_ext'] = build_ext

setup(
name='ssh2-python',
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
cmdclass=cmdclass,
url='https://github.com/ParallelSSH/ssh2-python',
license='LGPLv2',
author='Panos Kittenis',
Expand Down
Loading