Skip to content

Commit

Permalink
Summary:
Browse files Browse the repository at this point in the history
The way I've done build matrices in the past is to use Tox to handle all
the tedious work of setting up virtul aenvironments and running the
tests.

It also looks like there's a nice plugin,
[tox-travis](https://github.com/tox-dev/tox-travis), which takes in the
evironment definsed to run the appropriate tests.

Unfortunately, when this was run against Pythonn 3.5, the tests failed,
so that's a later PR.

Test Plan:
- Run `tox` locally and confirm the tests pass on py36, py37, and py38
  • Loading branch information
tyhoff committed May 5, 2020
1 parent 706dcc5 commit 9eaabf8
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 37 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
*.pyc
/puncover.egg-info/
/build/
/dist/
/dist/
.tox
.coverage
12 changes: 6 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
language: python
python:
# Python3.5 unit tests fail
- "3.5"
- "3.6"
- "3.7"
install:
- pip install .
- pip install -r requirements.txt
- python setup.py -q install
script:
- nosetests --with-cov
- "3.8"
install: pip install tox-travis
script: tox
after_success:
- codecov
4 changes: 0 additions & 4 deletions requirements.txt

This file was deleted.

55 changes: 29 additions & 26 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,13 @@
from setuptools import setup, find_packages, Command

__version__ = None # Overwritten by executing version.py.
with open('puncover/version.py') as f:
exec (f.read())

with open('requirements.txt') as f:
requires = f.readlines()
with open("puncover/version.py") as f:
exec(f.read())


class CleanCommand(Command):
"""Custom clean command to tidy up the project root."""

# http://stackoverflow.com/a/3780822/196350
user_options = []

Expand All @@ -23,24 +21,29 @@ def finalize_options(self):
pass

def run(self):
os.system('rm -vrf ./build ./dist ./*.pyc ./*.tgz ./*.egg-info')


setup(name='puncover',
version=__version__,
description='Analyses C/C++ build output for code size, static variables, and stack usage.',
long_description=open('README.rst').read(),
url='https://github.com/hbehrens/puncover',
download_url='https://github.com/hbehrens/puncover/tarball/%s' % __version__,
author='Heiko Behrens',
license='MIT',
packages=find_packages(exclude=['tests', 'tests.*']),
include_package_data=True,
zip_safe=False,
entry_points={'console_scripts': ['puncover = puncover.puncover:main']},
install_requires=requires,
test_suite='nose.collector',
cmdclass={
'clean': CleanCommand,
}
)
os.system("rm -vrf ./build ./dist ./*.pyc ./*.tgz ./*.egg-info")


setup(
name="puncover",
version=__version__,
description="Analyses C/C++ build output for code size, static variables, and stack usage.",
long_description=open("README.rst").read(),
url="https://github.com/hbehrens/puncover",
download_url="https://github.com/hbehrens/puncover/tarball/%s" % __version__,
author="Heiko Behrens",
license="MIT",
packages=find_packages(exclude=["tests", "tests.*"]),
include_package_data=True,
zip_safe=False,
entry_points={"console_scripts": ["puncover = puncover.puncover:main"]},
install_requires=[
"Flask==0.10.1",
"mock==1.3.0",
"codecov==2.0.5",
"nose-cov==1.6",
],
tests_require=["nose"],
test_suite="nose.collector",
cmdclass={"clean": CleanCommand,},
)

0 comments on commit 9eaabf8

Please sign in to comment.