Skip to content

Commit

Permalink
Remove usage of setuptools.command.test (#61)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcin-krystianc authored Jul 29, 2024
1 parent 66940af commit c4be150
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 26 deletions.
2 changes: 1 addition & 1 deletion python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "palletjack"
version = "2.2.2"
version = "2.2.3"
description = "Faster parquet metadata reading"
readme = "README.md"
requires-python = ">=3.9"
Expand Down
25 changes: 0 additions & 25 deletions python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

from setuptools import setup, find_packages
from distutils.extension import Extension
from setuptools.command.test import test as TestCommand
from Cython.Build import cythonize
import pyarrow
import numpy
Expand All @@ -26,29 +25,6 @@ def no_cythonize(extensions, **_ignore):
extension.sources[:] = sources
return extensions

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

def initialize_options(self):
TestCommand.initialize_options(self)
try:
from multiprocessing import cpu_count

self.pytest_args = ["-n", str(cpu_count()), "--boxed"]
except (ImportError, NotImplementedError):
self.pytest_args = ["-n", "1", "--boxed"]

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

def run_tests(self):
import pytest

errno = pytest.main(self.pytest_args)
sys.exit(errno)

vcpkg_installed = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'vcpkg_installed', os.getenv('VCPKG_TARGET_TRIPLET', ''))
include_dirs = [os.path.join(vcpkg_installed, 'include'), pyarrow.get_include(), numpy.get_include()]
library_dirs = [os.path.join(vcpkg_installed, 'lib')] + pyarrow.get_library_dirs()
Expand Down Expand Up @@ -94,7 +70,6 @@ def run_tests(self):
package_dir={"": "."},
zip_safe=False,
ext_modules=extensions,
test_suite = 'test',
project_urls={
"Documentation": "https://github.com/G-Research/PalletJack",
"Source": "https://github.com/G-Research/PalletJack",
Expand Down

0 comments on commit c4be150

Please sign in to comment.