diff --git a/.github/workflows/makefile.yml b/.github/workflows/makefile.yml new file mode 100644 index 0000000..3e21c5b --- /dev/null +++ b/.github/workflows/makefile.yml @@ -0,0 +1,21 @@ +name: dp-services + +on: [push] + +jobs: + unit-tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: '2.7' + cache: 'pip' + cache-dependency-path: | + **/setup.py + **/requirements.txt + **/constraints.txt + - name: pip-install + run: make install + - name: unit-tests + run: make test diff --git a/.gitignore b/.gitignore index c3bcd27..b9a2013 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,6 @@ deleteme*.* .noseids 27 *.egg-info -**/*.pyc \ No newline at end of file +**/*.pyc +build/ +dist/ diff --git a/Makefile b/Makefile index e25ebf0..b2b1c0a 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,22 @@ -init: - pip install -r requirements.txt +SYSTEM_PYTHON := $(shell which python2) +VENV := venv +PIP := pip +venv: + $(SYSTEM_PYTHON) -m virtualenv $(VENV) + $(PIP) install --upgrade pip wheel + +.PHONY: install +install: + $(PIP) install -r requirements.txt -c constraints.txt + $(PIP) install -e .[test] + +.PHONY: test test: - nosetests tests \ No newline at end of file + pytest tests + +.PHONY: constraints.txt +constraints.txt: + $(PIP) freeze \ + --exclude-editable \ + --exclude sftpclient > constraints.txt diff --git a/constraints.txt b/constraints.txt new file mode 100644 index 0000000..abde972 --- /dev/null +++ b/constraints.txt @@ -0,0 +1,14 @@ +asn1crypto==1.4.0 +bcrypt==3.1.7 +cffi==1.14.0 +cryptography==2.3.1 +enum34==1.1.10 +idna==2.5 +ipaddress==1.0.23 +paramiko==2.4.0 +pyasn1==0.4.8 +pycparser==2.21 +PyNaCl==1.3.0 +sftpserver==0.3 +six==1.16.0 +ssh2-python==0.8.0 diff --git a/requirements.txt b/requirements.txt index dfe9ee3..19458ad 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,3 @@ -nose -sphinx -paramiko==2.4.0 +paramiko sftpserver -ssh2-python==0.8.0 \ No newline at end of file +ssh2-python diff --git a/setup.py b/setup.py index f327397..0e50e9b 100644 --- a/setup.py +++ b/setup.py @@ -1,16 +1,24 @@ #!/usr/bin/env python from setuptools import setup, find_packages -setup(name='sftpclient', - version='1.0.1', - description='Wrapper for some SFTP clients', - author='erachitskiy', - author_email='erachitskiy@pulsepoint.com', - url='https://github.com/pulsepointinc/sftpclient', - packages=find_packages(), - install_requires = [ - 'ssh2-python>=0.8.0', - 'paramiko>=2.3.1' - ], - zip_safe=False - ) \ No newline at end of file +setup( + name='pp-sftpclient', + version='1.0.2', + description='Wrapper for some SFTP clients', + author='erachitskiy', + author_email='erachitskiy@pulsepoint.com', + url='https://github.com/pulsepointinc/sftpclient', + packages=find_packages(), + install_requires=[ + 'paramiko', + 'sftpserver', + 'ssh2-python', + ], + extras_require={ + 'test': [ + 'pytest', + 'six', + ] + }, + zip_safe=False, +)