Skip to content

Commit

Permalink
only depends on cpuid on x86
Browse files Browse the repository at this point in the history
  • Loading branch information
flier committed Oct 27, 2021
1 parent d231820 commit bb443ba
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[build-system]
build-backend = "setuptools.build_meta"
requires = ["setuptools>=42", "wheel", "pybind11>=2.8", "cpuid"]
requires = ["setuptools>=42", "wheel", "pybind11>=2.8"]
5 changes: 4 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,9 @@ def cpu_features():
'Topic :: Utilities'
],
keywords='hash hashing fasthash',
setup_requires=['cpuid', 'pybind11'],
setup_requires=list(filter(None, [
'cpuid' if IS_X86 else None,
'pybind11',
])),
tests_require=['pytest', 'pytest-runner', 'pytest-benchmark'],
)
2 changes: 1 addition & 1 deletion tests/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ pytest >= 4.6
pytest-benchmark >= 3.4
pytest-cov >= 2.12
codecov >= 2.1
cpuid
cpuid ; platform_machine == "x86_64"
9 changes: 7 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
envlist = py{27,39},pypy{,3}

[testenv]
commands = pytest --benchmark-disable --cov=./ -v

[testenv:{py27,pypy}]
deps = pytest-runner
pytest-benchmark

[testenv:{py39,pypy3}]
deps = -r{toxinidir}/requirements.txt
-r{toxinidir}/tests/requirements.txt

commands = pytest --benchmark-disable --cov=./ -v

0 comments on commit bb443ba

Please sign in to comment.