Skip to content

Commit

Permalink
Fixed setup process to be more streamlined and self-contained. Update…
Browse files Browse the repository at this point in the history
…d MANIFEST.in. Re-enabled doctests for Travis CI.
  • Loading branch information
runfalk committed Mar 21, 2017
1 parent caaec08 commit b5cfe26
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 17 deletions.
10 changes: 7 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
*.pyc
*.pyo
*.egg
*.egg-info
.tox/
*.egg-info/

.coverage

.cache/
build/
dist/
venv/
*venv/
doc/_build/
3 changes: 1 addition & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ python:
- "3.6"
install:
- pip install -r requirements.txt
- pip install -r test-requirements.txt
script:
- pytest
- make test
after_success:
- codecov
11 changes: 8 additions & 3 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
recursive-include spans *.py
recursive-include tests *.py
include Makefile README.rst LICENSE

include MANIFEST.in LICENSE README.rst Makefile setup.py setup.cfg doc/*.rst
graft doc
graft tests

global-exclude *.py[co]

prune doc/_build
prune doc/_themes
24 changes: 19 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,22 +1,36 @@
build: test doc sdist wheel

clean: clean-pyc clean-build
rm -rf .cache/
rm .coverage

clean-build:
rm -rf build/
rm -rf *.egg-info/
make -C doc/ clean

clean-pyc:
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -type d -name '__pycache__' -exec rm -rf {} +
find . -type d -name '__pycache__' -exec rmdir {} +

doc:
make -C doc/ html

test:
make -C doc doctest
tox
make -C doc/ doctest
pytest

sdist:
python setup.py sdist
rm -rf *.egg-info

wheel:
python setup.py bdist_wheel

preview-readme:
python -c 'import setup; print(setup.long_desc)' > README.preview.rst
retext README.preview.rst
rm README.preview.rst

.PHONY : clean-pyc doc test sdist preview-readme

.PHONY : build clean clean-build clean-pyc doc test sdist wheel preview-readme upload
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
--index-url https://pypi.python.org/simple/
-e .
-e .[dev]
8 changes: 8 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,14 @@ def rst_preprocess(file):
author_email="andreas@runfalk.se",
url="https://www.github.com/runfalk/spans",
packages=["spans"],
extras_require={
"dev": [
"pytest>=3.0",
"pytest-cov",
"codecov",
"twine",
],
},
classifiers=(
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
Expand Down
3 changes: 0 additions & 3 deletions test-requirements.txt

This file was deleted.

0 comments on commit b5cfe26

Please sign in to comment.