Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix ci for setuptools 72 #128

Merged
merged 1 commit into from
Jul 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading