Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
2,823 additions
and
920 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,23 @@ | ||
os: | ||
- linux | ||
- osx | ||
|
||
language: python | ||
|
||
python: | ||
- 2.6 | ||
- 2.7 | ||
- pypy | ||
- 3.2 | ||
- 3.3 | ||
- 3.4 | ||
- 3.5 | ||
- pypy3 | ||
|
||
env: | ||
- LC_ALL=C | ||
- LC_ALL=en_US.UTF-8 | ||
|
||
before_script: pip install coverage coveralls | ||
before_script: | ||
- pip install -r requirements-dev.txt | ||
|
||
script: | ||
- coverage run --source sh test.py | ||
- coverage report | ||
- python sh.py travis | ||
|
||
after_success: coveralls | ||
after_success: | ||
- coveralls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
include AUTHORS.md CHANGELOG.md LICENSE.txt README.md test.py | ||
include CHANGELOG.md LICENSE.txt README.rst test.py | ||
|
||
global-exclude *.pyc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
.. image:: https://img.shields.io/pypi/v/sh.svg?style=flat-square | ||
:target: https://pypi.python.org/pypi/sh | ||
:alt: Version | ||
.. image:: https://img.shields.io/pypi/pyversions/sh.svg?style=flat-square | ||
:target: https://pypi.python.org/pypi/sh | ||
:alt: Python Versions | ||
.. image:: https://img.shields.io/travis/amoffat/sh.svg?style=flat-square | ||
:target: https://travis-ci.org/amoffat/sh | ||
:alt: Build Status | ||
.. image:: https://img.shields.io/coveralls/amoffat/sh.svg?style=flat-square | ||
:target: https://coveralls.io/r/amoffat/sh?branch=master | ||
:alt: Coverage Status | ||
|
||
| | ||
sh is a full-fledged subprocess replacement for Python 2.6 - 3.5, PyPy and PyPy3 | ||
that allows you to call any program as if it were a function: | ||
|
||
.. code:: python | ||
from sh import ifconfig | ||
print ifconfig("eth0") | ||
sh is *not* a collection of system commands implemented in Python. | ||
|
||
Installation | ||
============ | ||
|
||
:: | ||
|
||
$> pip install sh | ||
|
||
Complete documentation @ http://amoffat.github.com/sh | ||
===================================================== | ||
|
||
Developers | ||
========== | ||
|
||
Testing | ||
------- | ||
|
||
First install the development requirements:: | ||
|
||
$> pip install -r requirements-dev.txt | ||
|
||
The run the tests for all Python versions on your system:: | ||
|
||
$> python sh.py test | ||
|
||
To run a single test for all environments:: | ||
|
||
$> python sh.py test FunctionalTests.test_unicode_arg | ||
|
||
To run a single test for a single environment:: | ||
|
||
$> python sh.py test -e 3.4 FunctionalTests.test_unicode_arg | ||
|
||
Coverage | ||
-------- | ||
|
||
First run all of the tests:: | ||
|
||
$> python sh.py test | ||
|
||
This will aggregate a ``.coverage``. You may then visualize the report with:: | ||
|
||
$> coverage report | ||
|
||
Or generate visual html files with:: | ||
|
||
$> coverage html | ||
|
||
Which will create ``./htmlcov/index.html`` that you may open in a web browser. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
coverage==3.7.1 | ||
py==1.4.26 | ||
tox==1.8.1 | ||
virtualenv==12.0.4 | ||
coverage==4.2 | ||
coveralls==1.1 | ||
docopt==0.6.2 | ||
requests==2.12.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
alabaster==0.7.9 | ||
Babel==2.3.4 | ||
docutils==0.12 | ||
imagesize==0.7.1 | ||
Jinja2==2.8 | ||
MarkupSafe==0.23 | ||
Pygments==2.1.3 | ||
pytz==2016.7 | ||
six==1.10.0 | ||
snowballstemmer==1.2.1 | ||
Sphinx==1.4.8 | ||
sphinx-rtd-theme==0.1.9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[bdist_wheel] | ||
universal = 1 | ||
|
||
[metadata] | ||
license_file = LICENSE.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.