Skip to content

Commit bbc21c1

Browse files
authored
Pkg deps (#12)
* Workaround for travis osx issue. * Added dependencies to system packages * Minor cleanup. Added error code on SFTPIOError exceptions. * Added stage conditional flags * Updated docstrings, documentation. Added sftp handle API documentation page.
1 parent 0fd3ba7 commit bbc21c1

13 files changed

+603
-578
lines changed

.github/CONTRIBUTING.rst

-1
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,6 @@ following conventions.
336336
Travis-CI based integration tests and is required for builds to pass.
337337

338338
* Docstrings must follow the `PEP-257 <https://www.python.org/dev/peps/pep-0257>`_ conventions.
339-
style.
340339

341340
* Docstrings for *public* API endpoints should include Sphinx docstring directives
342341
for inclusion in the auto-generated Sphinx based documentation. For example::

.travis.yml

+6
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,14 @@ script:
2727
jobs:
2828
include:
2929
- os: osx
30+
if: tag IS present
3031
branches:
3132
# Hopefully this will work in future.
3233
only:
3334
- master
3435
- /^\d+\.\d+(\.\d+)?(-\S*)?$/
36+
before_install:
37+
- brew update
3538
install:
3639
- brew install libssh2
3740
- pip install -U delocate twine wheel pip setuptools
@@ -53,6 +56,7 @@ jobs:
5356
language: generic
5457
python: skip
5558
- stage: build_packages
59+
if: tag IS present
5660
os: linux
5761
python: 3.6
5862
install: skip
@@ -71,6 +75,7 @@ jobs:
7175
repo: ParallelSSH/ssh2-python
7276
tags: true
7377
- stage: deploy_pypi
78+
if: tag IS present
7479
os: linux
7580
python: 3.6
7681
install: skip
@@ -86,6 +91,7 @@ jobs:
8691
password:
8792
secure: "eEBo76bmNWArLOzLNkv8whYO81HqkYpwUu3RqBHv6PNW/sI70VSIVfPTWo8ThlNkYSBy1Sxci6eU+Vd8qYH/vaCbl4068BkzroGUqGMLHXLRLEPQjO2pxTvnQ7Nbj/Mi9enoslLJKflx2USy2iPz1yGCWZrPzjLWmEMcx6j5e3fEUGF2p6p01w/zWxmiSoyJgBsby9P8Fl5nflsNMVR/or8frK4K1T6Y2oTuEx9aYymmBPFOO5DHaedDxnhZ04KKaACIECvKrT5V3PMM1jrE3qu6hJ1LS0/mSivEdCwCszHanjIQy/enkNtLgxVm4jIRUjuAwL1MmxPtkAUcKrQor1YokMqm5fExdwvnp+qjtyejfA3IvT93nYvCj4IEYNMDtUGFUBjsYLqg7Ked/jvO53Ek5WEAE/Mx8F/OAtuvkpEeUKTIWxfd+V0b7pgShVuU5zFyi3y97vpRtdwqzOFr8QT3Hq+g/RIdghPQ9pGQ3GOomTMO1B7mAyOG6SYyQM/wra2h2dQTHCbgzAtsPzZLiZhWIGcU7/mGLm0kZBT6McnH2//hsIPXG8S94u2MWE0KRH5YhJ/2ATWneYyFHWQfwqDeR/1CZe66gFcPJ9cOIG+8pcmXueLhnueDbh2EWa8jmumtrAz+z+rcokih0c7catT7pByDv24Ouuw2Yf3my60="
8893
- stage: build wheels
94+
if: tag IS present
8995
os: linux
9096
python: 3.6
9197
install:

ci/docker/build-packages.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ for x in `ls -1d ci/docker/{fedora,centos}*`; do
1414
docker tag $name $docker_tag
1515
docker push $docker_tag
1616
sudo rm -rf build dist
17-
docker run -v "$(pwd):/src/" "$name" --rpm-dist $dist -s python -t rpm setup.py
17+
docker run -v "$(pwd):/src/" "$name" --rpm-dist $dist -s python -t rpm -d libssh2 -d python setup.py
1818
done
1919

2020
for x in `ls -1d ci/docker/{debian,ubuntu}*`; do
@@ -25,7 +25,7 @@ for x in `ls -1d ci/docker/{debian,ubuntu}*`; do
2525
docker tag $name $docker_tag
2626
docker push $docker_tag
2727
sudo rm -rf build dist
28-
docker run -v "$(pwd):/src/" "$name" --iteration $name -s python -t deb setup.py
28+
docker run -v "$(pwd):/src/" "$name" --iteration $name -s python -t deb -d libssh2-1 -d python setup.py
2929
done
3030

3131
sudo chown -R ${USER} *

doc/api.rst

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ API Documentation
77
channel
88
agent
99
sftp
10+
sftp_handle
1011
pkey
1112
listener
1213
exceptions

doc/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
# Add any paths that contain custom static files (such as style sheets) here,
9999
# relative to this directory. They are copied after the builtin static files,
100100
# so a file named "default.css" will overwrite the builtin "default.css".
101-
html_static_path = ['_static']
101+
# html_static_path = ['_static']
102102

103103
# Custom sidebar templates, must be a dictionary that maps document names
104104
# to template names.

doc/sftp_handle.rst

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
ssh2.sftp_handle
2+
==================
3+
4+
.. automodule:: ssh2.sftp_handle
5+
:members:
6+
:undoc-members:
7+
:member-order: groupwise

setup.py

-2
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@
4949
libraries=_libs,
5050
extra_compile_args=_comp_args,
5151
**cython_args
52-
# For conditional compilation
53-
# pyrex_compile_time_env
5452
)
5553
for i in range(len(sources))]
5654

ssh2/session.c

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ssh2/session.pyx

+1-1
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ cdef class Session:
312312
connecting to agent
313313
:raises: :py:class:`ssh2.exceptions.AgentListIdentitiesError` on error
314314
getting identities from agent
315-
:raises: :py:class:`ssh2.exceptions.AgentAuthenticationFailure` on no
315+
:raises: :py:class:`ssh2.exceptions.AgentAuthenticationError` on no
316316
successful authentication with all available identities.
317317
:raises: :py:class:`ssh2.exceptions.AgentGetIdentityError` on error
318318
getting known identity from agent

ssh2/sftp.c

+6-6
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ssh2/sftp.pyx

+4-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717

1818
"""
19-
SFTP channel, handle and attributes classes and related SFTP flags.
19+
SFTP channel class and related SFTP flags.
2020
2121
File transfer flags
2222
--------------------
@@ -300,7 +300,8 @@ cdef class SFTP:
300300
:param path: Path of file to stat.
301301
:type path: str
302302
303-
:rtype: :py:class:`ssh2.sftp.SFTPAttributes` or LIBSSH2_ERROR_EAGAIN"""
303+
:rtype: :py:class:`ssh2.sftp_handle.SFTPAttributes` or
304+
LIBSSH2_ERROR_EAGAIN"""
304305
cdef int rc
305306
cdef bytes b_path = to_bytes(path)
306307
cdef char *_path = b_path
@@ -341,7 +342,7 @@ cdef class SFTP:
341342
:param path: File path.
342343
:type path: str
343344
:param attrs: File attributes to set.
344-
:type attrs: :py:class:`ssh2.sftp.SFTPAttributes`
345+
:type attrs: :py:class:`ssh2.sftp_handle.SFTPAttributes`
345346
346347
:rtype: int"""
347348
cdef int rc

0 commit comments

Comments
 (0)