Skip to content

Commit

Permalink
Pkg deps (#12)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
pkittenis committed Oct 14, 2017
1 parent 0fd3ba7 commit bbc21c1
Show file tree
Hide file tree
Showing 13 changed files with 603 additions and 578 deletions.
1 change: 0 additions & 1 deletion .github/CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,6 @@ following conventions.
Travis-CI based integration tests and is required for builds to pass.

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

* Docstrings for *public* API endpoints should include Sphinx docstring directives
for inclusion in the auto-generated Sphinx based documentation. For example::
Expand Down
6 changes: 6 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,14 @@ script:
jobs:
include:
- os: osx
if: tag IS present
branches:
# Hopefully this will work in future.
only:
- master
- /^\d+\.\d+(\.\d+)?(-\S*)?$/
before_install:
- brew update
install:
- brew install libssh2
- pip install -U delocate twine wheel pip setuptools
Expand All @@ -53,6 +56,7 @@ jobs:
language: generic
python: skip
- stage: build_packages
if: tag IS present
os: linux
python: 3.6
install: skip
Expand All @@ -71,6 +75,7 @@ jobs:
repo: ParallelSSH/ssh2-python
tags: true
- stage: deploy_pypi
if: tag IS present
os: linux
python: 3.6
install: skip
Expand All @@ -86,6 +91,7 @@ jobs:
password:
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="
- stage: build wheels
if: tag IS present
os: linux
python: 3.6
install:
Expand Down
4 changes: 2 additions & 2 deletions ci/docker/build-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ for x in `ls -1d ci/docker/{fedora,centos}*`; do
docker tag $name $docker_tag
docker push $docker_tag
sudo rm -rf build dist
docker run -v "$(pwd):/src/" "$name" --rpm-dist $dist -s python -t rpm setup.py
docker run -v "$(pwd):/src/" "$name" --rpm-dist $dist -s python -t rpm -d libssh2 -d python setup.py
done

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

sudo chown -R ${USER} *
Expand Down
1 change: 1 addition & 0 deletions doc/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ API Documentation
channel
agent
sftp
sftp_handle
pkey
listener
exceptions
Expand Down
2 changes: 1 addition & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
# html_static_path = ['_static']

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
Expand Down
7 changes: 7 additions & 0 deletions doc/sftp_handle.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
ssh2.sftp_handle
==================

.. automodule:: ssh2.sftp_handle
:members:
:undoc-members:
:member-order: groupwise
2 changes: 0 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@
libraries=_libs,
extra_compile_args=_comp_args,
**cython_args
# For conditional compilation
# pyrex_compile_time_env
)
for i in range(len(sources))]

Expand Down
2 changes: 1 addition & 1 deletion ssh2/session.c

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion ssh2/session.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ cdef class Session:
connecting to agent
:raises: :py:class:`ssh2.exceptions.AgentListIdentitiesError` on error
getting identities from agent
:raises: :py:class:`ssh2.exceptions.AgentAuthenticationFailure` on no
:raises: :py:class:`ssh2.exceptions.AgentAuthenticationError` on no
successful authentication with all available identities.
:raises: :py:class:`ssh2.exceptions.AgentGetIdentityError` on error
getting known identity from agent
Expand Down
12 changes: 6 additions & 6 deletions ssh2/sftp.c

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions ssh2/sftp.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@


"""
SFTP channel, handle and attributes classes and related SFTP flags.
SFTP channel class and related SFTP flags.
File transfer flags
--------------------
Expand Down Expand Up @@ -300,7 +300,8 @@ cdef class SFTP:
:param path: Path of file to stat.
:type path: str
:rtype: :py:class:`ssh2.sftp.SFTPAttributes` or LIBSSH2_ERROR_EAGAIN"""
:rtype: :py:class:`ssh2.sftp_handle.SFTPAttributes` or
LIBSSH2_ERROR_EAGAIN"""
cdef int rc
cdef bytes b_path = to_bytes(path)
cdef char *_path = b_path
Expand Down Expand Up @@ -341,7 +342,7 @@ cdef class SFTP:
:param path: File path.
:type path: str
:param attrs: File attributes to set.
:type attrs: :py:class:`ssh2.sftp.SFTPAttributes`
:type attrs: :py:class:`ssh2.sftp_handle.SFTPAttributes`
:rtype: int"""
cdef int rc
Expand Down

0 comments on commit bbc21c1

Please sign in to comment.