Skip to content

Commit

Permalink
fix ci for setuptools 72
Browse files Browse the repository at this point in the history
  • Loading branch information
lexdene committed Jul 29, 2024
1 parent 9987819 commit f1d1a0c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 23 deletions.
3 changes: 2 additions & 1 deletion misc/travis/unittest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ cmake -DCMAKE_BUILD_TYPE=$CMAKE_BUILD_TYPE -DWITH_TESTING=ON ..
make -j8
valgrind --leak-check=full make test
cd ..
python setup.py test
python setup.py build_ext --inplace
python -m pytest tests
pip install -e .
./tests/shabby/run_test.sh
22 changes: 0 additions & 22 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@
import os
import re
import sys
import shlex
import pkg_resources
import platform
from distutils.sysconfig import get_config_var
from distutils.version import LooseVersion
from glob import glob
from setuptools import setup, Extension
from setuptools.command.test import test as TestCommand

sources = (glob("src/*.cpp") + ["libmc/_client.pyx"])
include_dirs = ["include"]
Expand Down Expand Up @@ -74,25 +72,6 @@ def find_version(*file_paths):
raise RuntimeError("Unable to find version string.")


class PyTest(TestCommand):
user_options = [('pytest-args=', 'a', "Arguments to pass to py.test")]

def initialize_options(self):
TestCommand.initialize_options(self)
self.pytest_args = 'tests'

def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True

def run_tests(self):
# import here, cause outside the eggs aren't loaded
import pytest
errno = pytest.main(shlex.split(self.pytest_args))
sys.exit(errno)


setup(
name="libmc",
packages=["libmc"],
Expand Down Expand Up @@ -122,7 +101,6 @@ def run_tests(self):
],
# Support for the basestring type is new in Cython 0.20.
setup_requires=["Cython >= 0.20"],
cmdclass={"test": PyTest},
ext_modules=[
Extension(
"libmc._client",
Expand Down

0 comments on commit f1d1a0c

Please sign in to comment.