Skip to content

Commit

Permalink
Fix install quirks and document dependencies after release testing
Browse files Browse the repository at this point in the history
Setup requires changed to install-requires
Bump version
Document pycurl install fix
  • Loading branch information
svanoort committed Oct 12, 2015
1 parent 1d06589 commit 8dbb1c7
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 5 deletions.
18 changes: 15 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,26 @@ Apache License, Version 2.0
The best way to install PyRestTest is via Python's pip packaging tool.
If that is not installed, we'll need to install it first:
```shell
wget https://bootstrap.pypa.io/get-pip.py && sudo python get-pip.py
```
* Ubuntu/Debian: (sudo) `apt-get install python-pip`
* CentOS/RHEL: (sudo) `yum install python-pip`
* Mac OS X with homebrew: `brew install python` (it's included)
* Or with just python installed: `wget https://bootstrap.pypa.io/get-pip.py && sudo python get-pip.py`

**Then install package python-pycurl:**
* Ubuntu: (sudo) `apt-get install python-pycurl`
* CentOS/RHEL: (sudo) `yum install python-pycurl`
*This is needed because the pycurl dependency may fail to install by pip.*

Then we install pyresttest:
```shell
sudo pip install pyresttest
```

**If it fails like this:**
`__main__.ConfigurationError: Could not run curl-config: [Errno 2] No such file or directory`

Then you need to install python-pycurl (pip tried and failed to install it)

There are also options to [install from repo](#installation-without-pip), or [build an RPM](#pure-rpm-based-install).

# How Do I Use It?
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from distutils.core import setup

setup(name='pyresttest',
version='1.6.0.dev',
version='1.6.0',
description='Python RESTful API Testing & Microbenchmarking Tool',
long_description='Python RESTful API Testing & Microbenchmarking Tool \n Documentation at https://github.com/svanoort/pyresttest',
maintainer='Sam Van Oort',
Expand All @@ -22,7 +22,7 @@
'pyresttest.parsing', 'pyresttest.validators', 'pyresttest.contenthandling',
'pyresttest.benchmarks', 'pyresttest.tests', 'pyresttest.ext.validator_jsonschema'],
license='Apache License, Version 2.0',
requires=['pyyaml', 'pycurl'],
install_requires=['pyyaml', 'pycurl'],
# Make this executable from command line when installed
scripts=['util/pyresttest', 'util/resttest.py'],
provides=['pyresttest']
Expand Down
32 changes: 32 additions & 0 deletions util/install-smoketests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# bdist will cause *issues*

# CentOS install script to test it
# docker run -it --rm -v `pwd`:/tmp/pyresttest centos:centos6 /bin/bash
rpm -ivh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
yum install -y python-pip
pip install -i https://testpypi.python.org/pypi pyresttest


#Interactive test to see if it works
resttest.py
python -c "import pyresttest"
pip show version pyresttest

# test (each returns exit code)
resttest.py 2>/dev/null | grep 'Usage'
pyresttest 2>/dev/null | grep 'Usage'
resttest.py https://api.github.com /tmp/pyresttest/github_api_smoketest.yaml


# Install on Ubuntu14
# docker run -it --rm -v `pwd`:/tmp/pyresttest ubuntu:14.04 /bin/bash
apt-get update && apt-get install -y python-pip
apt-get install python-pycurl
pip install -i https://testpypi.python.org/pypi --pre pyresttest

# Same tests
# Now we do the more involved tests using prebaked images with test server
# docker run -it --rm -v `pwd`:/tmp/pyresttest pyresttest-build-ubuntu-14:latest /bin/bash
# docker run -it --rm -v `pwd`:/tmp/pyresttest pyresttest-build-centos6:latest /bin/bash
python /tmp/pyresttest/pyresttest/testapp/manage.py testserver /tmp/pyresttest/pyresttest/testapp/test_data.json &
pyresttest http://localhost:8000 /tmp/pyresttest/pyresttest/content-test.yaml

0 comments on commit 8dbb1c7

Please sign in to comment.