Skip to content

Commit

Permalink
Update setup.py for from source builds without cython.
Browse files Browse the repository at this point in the history
Test sdist builds on travis.
Include pxd/pyx files on sdist distributables.
Resolves #98
  • Loading branch information
pkittenis committed Jan 2, 2018
1 parent 6b9ee72 commit f05f391
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ script:
- nosetests --with-coverage --cover-package=pssh
- flake8 pssh
- cd doc; make html; cd ..
# Test building from source distribution
- python setup.py sdist
- cd dist; pip install *; cd ..
after_success:
- codecov
jobs:
Expand Down
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
include versioneer.py
include pssh/_version.py
recursive-exclude tests *
include pssh/native/*.c
include pssh/native/*.pyx
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import versioneer

try:
from Cython.Build import cythonize
from Cython.Distutils.extension import Extension
from Cython.Distutils import build_ext
except ImportError:
Expand All @@ -45,10 +44,12 @@
# 'libeay32', 'ssleay32',
'Ws2_32', 'libssh2', 'user32']


ext = 'pyx' if USING_CYTHON else 'c'
_comp_args = ["-O3"] if platform.system() != 'Windows' else None
extensions = [
Extension('pssh.native._ssh2',
sources=['pssh/native/_ssh2.pyx'],
sources=['pssh/native/_ssh2.%s' % ext],
include_dirs=["libssh2/include"],
libraries=_libs,
extra_compile_args=_comp_args,
Expand Down

0 comments on commit f05f391

Please sign in to comment.