Make pylast a package. Move tests into a directory. Start using pytest
and tox. Use setuptools instead of distutils.
This commit is contained in:
parent
123951517a
commit
387220c1d6
|
@ -13,7 +13,7 @@ install:
|
|||
- travis_retry pip install -r test_requirements.txt
|
||||
- travis_retry pip install coveralls
|
||||
|
||||
script: coverage run --source=pylast ./test_pylast.py
|
||||
script: coverage run --source=pylast ./tests/test_pylast.py
|
||||
|
||||
after_success:
|
||||
- coveralls
|
||||
|
@ -24,7 +24,7 @@ after_script:
|
|||
- coverage report
|
||||
- ./check.sh
|
||||
- pip install clonedigger
|
||||
- clonedigger pylast.py
|
||||
- clonedigger pylast
|
||||
- grep "Clones detected" output.html
|
||||
- grep "lines are duplicates" output.html
|
||||
|
||||
|
|
8
check.sh
8
check.sh
|
@ -1,10 +1,10 @@
|
|||
pyflakes pylast.py
|
||||
pyflakes pylast
|
||||
echo ---
|
||||
pyflakes test_pylast.py
|
||||
pyflakes tests
|
||||
echo ---
|
||||
pep8 test_pylast.py
|
||||
pep8 pylast
|
||||
echo ---
|
||||
pep8 pylast.py
|
||||
pep8 tests
|
||||
# echo ---
|
||||
# clonedigger pylast.py
|
||||
# grep "Clones detected" output.html
|
||||
|
|
6
setup.py
6
setup.py
|
@ -1,12 +1,14 @@
|
|||
#!/usr/bin/env python
|
||||
import os
|
||||
|
||||
from distutils.core import setup
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
|
||||
setup(
|
||||
name="pylast",
|
||||
version="1.0.0",
|
||||
author="Amr Hassan <amr.hassan@gmail.com>",
|
||||
tests_require=['mock', 'pytest', 'coverage', 'pep8', 'pyyaml', 'pyflakes'],
|
||||
description=("A Python interface to Last.fm "
|
||||
"(and other API compatible social networks)"),
|
||||
author_email="amr.hassan@gmail.com",
|
||||
|
@ -24,7 +26,7 @@ setup(
|
|||
"Programming Language :: Python :: 3.4",
|
||||
],
|
||||
keywords=["Last.fm", "music", "scrobble", "scrobbling"],
|
||||
py_modules=("pylast",),
|
||||
packages=find_packages(exclude=('tests*')),
|
||||
license="Apache2"
|
||||
)
|
||||
|
||||
|
|
0
tests/__init__.py
Normal file
0
tests/__init__.py
Normal file
Loading…
Reference in a new issue