From b0763b97f89dbe65bb3571b8aa5a2b31feea39ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Ma=C5=9Blanka?= <piotr.maslanka@henrietta.com.pl> Date: Wed, 26 May 2021 19:10:09 +0200 Subject: [PATCH] fix coverage --- .travis.yml | 5 ++--- setup.py | 12 +++--------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/.travis.yml b/.travis.yml index 57f4733..2fa1e77 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,16 +6,15 @@ before_script: - ./cc-test-reporter before-build - pip install -r requirements.txt - pip install pytest mock coverage cython[coverage] pytest-cov - - DEBUG=1 python setup.py install + - DEBUG=1 python setup.py build_ext --inplace --force --define CYTHON_TRACE - rm -rf minijson jobs: include: - stage: test python: "3.8" script: - - py.test --cov + - pytest --cov=./ --cov-report=xml after_script: - - coverage xml - ./cc-test-reporter after-build -t coverage.py --exit-code ${TRAVIS_TEST_RESULT} diff --git a/setup.py b/setup.py index e1cd7a4..754a228 100644 --- a/setup.py +++ b/setup.py @@ -1,14 +1,12 @@ import os from setuptools import find_packages from distutils.core import setup -from snakehouse import Multibuild, build, monkey_patch_parallel_compilation, find_pyx - -monkey_patch_parallel_compilation() +from snakehouse import Multibuild, build, find_pyx build_kwargs = {} directives = {'language_level': '3'} dont_snakehouse = False -multi_kwargs = {} + if 'DEBUG' in os.environ: print('Enabling debug mode') dont_snakehouse = True @@ -17,8 +15,6 @@ if 'DEBUG' in os.environ: profile=True, linetrace=True, binding=True) - multi_kwargs['define_macros'] = [('CYTHON_TRACE', '1'), - ('CYTHON_TRACE_NOGIL', '1')] import Cython.Compiler.Options Cython.Compiler.Options.annotate = True @@ -27,9 +23,7 @@ if 'DEBUG' in os.environ: setup(version='1.7', packages=find_packages(include=['minijson', 'minijson.*']), ext_modules=build([Multibuild('minijson', find_pyx('minijson'), - dont_snakehouse=dont_snakehouse, - **multi_kwargs), ], + dont_snakehouse=dont_snakehouse), ], compiler_directives=directives, **build_kwargs), python_requires='!=2.7.*,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,!=3.7.*', - zip_safe=False ) -- GitLab