From 375007cb1b1b557d8fcab6b639e3438b15450aff Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Fri, 21 May 2010 09:31:19 -0400 Subject: Simple changes to get code measurement running on Jython. --- .hgignore | 1 + Makefile | 1 + setup.py | 16 +++++++++++----- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.hgignore b/.hgignore index eec265c..89982cc 100644 --- a/.hgignore +++ b/.hgignore @@ -3,6 +3,7 @@ syntax: glob # Files that can appear anywhere in the tree. *.pyc *.pyo +*$py.class *.pyd *.so *.bak diff --git a/Makefile b/Makefile index cc584c3..11f66d0 100644 --- a/Makefile +++ b/Makefile @@ -13,6 +13,7 @@ clean: -rm -f *.pyc */*.pyc */*/*.pyc */*/*/*.pyc */*/*/*/*.pyc */*/*/*/*/*.pyc -rm -f *.pyo */*.pyo */*/*.pyo */*/*/*.pyo */*/*/*/*.pyo */*/*/*/*/*.pyo -rm -f *.bak */*.bak */*/*.bak */*/*/*.bak */*/*/*/*.bak */*/*/*/*/*.bak + -rm -f *$py.class */*$py.class */*/*$py.class */*/*/*$py.class */*/*/*/*$py.class */*/*/*/*/*$py.class -rm -f coverage/*,cover -rm -f MANIFEST -rm -f .coverage .coverage.* coverage.xml diff --git a/setup.py b/setup.py index e6645cf..822b1da 100644 --- a/setup.py +++ b/setup.py @@ -63,7 +63,7 @@ classifier_list.append("Development Status :: " + devstat) # Set it up! -setup( +setup_args = dict( name = 'coverage', version = __version__, @@ -77,10 +77,6 @@ setup( ] }, - ext_modules = [ - Extension("coverage.tracer", sources=["coverage/tracer.c"]) - ], - entry_points = { 'console_scripts': [ 'coverage = coverage:main', @@ -99,3 +95,13 @@ setup( classifiers = classifier_list, url = __url__, ) + +# Is there a duck-typing way to know we can't compile extensions? +if not sys.platform.startswith('java'): + setup_args.update(dict( + ext_modules = [ + Extension("coverage.tracer", sources=["coverage/tracer.c"]) + ], + )) + +setup(**setup_args) -- cgit v1.2.1