Skip to content
Open
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
7 changes: 7 additions & 0 deletions .github/workflows/external-zstd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,11 @@ jobs:

- name: Build
run: |
# Homebrew's prefix (/opt/homebrew on Apple Silicon) isn't on the
# default compiler search paths, and its libzstd is arm64 only, so
# don't build the universal2 binary the Python framework asks for.
ZSTD_PREFIX="$(brew --prefix zstd)"
export CFLAGS="-I${ZSTD_PREFIX}/include"
export LDFLAGS="-L${ZSTD_PREFIX}/lib"
export ARCHFLAGS="-arch arm64"
python -m pip install --config-settings=--global-option=--system-zstd .
8 changes: 6 additions & 2 deletions ci/conda/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
{% set data = load_setup_py_data() %}
# Don't use load_setup_py_data(): it runs setup.py inside the conda-build
# process, and setup.py's sys.path.insert(0, ".") then makes the unbuilt
# zstandard package in the source tree shadow the zstandard bindings that
# conda-package-handling needs for .conda support.
{% set version_match = load_file_regex(load_file="../../c-ext/python-zstandard.h", regex_pattern='PYTHON_ZSTANDARD_VERSION "([^"]+)"', from_recipe_dir=True) %}

package:
name: zstandard
version: "{{ data.get('version') }}"
version: "{{ version_match.group(1) }}"

source:
path: ../../
Expand Down
12 changes: 9 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,20 @@ requires = [
build-backend = "setuptools.build_meta"

[dependency-groups]
dev = [
# Dependencies needed to run the test suite. cibuildwheel installs this group
# unlocked inside its build containers, so keep it free of packages (like mypy)
# without wheels for every platform we build.
test = [
"cffi~=1.17; platform_python_implementation != 'PyPy' and python_version < '3.14'",
"cffi>=2.0.0b; platform_python_implementation != 'PyPy' and python_version >= '3.14'",
"hypothesis==6.111.0",
"mypy>=1.17.1",
"pytest>=8.4.1",
"pytest-xdist>=3.8.0",
]
dev = [
{ include-group = "test" },
"mypy>=1.17.1",
]

[tool.pytest.ini_options]
testpaths = ["tests"]
Expand All @@ -71,7 +77,7 @@ test-command = [
"pytest -v --numprocesses=auto",
"PYTHON_ZSTANDARD_IMPORT_POLICY=cffi pytest -v --numprocesses=auto",
]
test-groups = ["dev"]
test-groups = ["test"]
test-sources = ["tests"]

[tool.cibuildwheel.linux]
Expand Down
4 changes: 3 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ def pytest_configure(config):
default_settings = hypothesis.settings(deadline=10000)
hypothesis.settings.register_profile("default", default_settings)

ci_settings = hypothesis.settings(deadline=20000, max_examples=1000)
# Shared CI runners (notably the Intel macOS ones) are slow and noisy
# enough that per-example deadlines only produce flaky failures.
ci_settings = hypothesis.settings(deadline=None, max_examples=1000)
hypothesis.settings.register_profile("ci", ci_settings)

expensive_settings = hypothesis.settings(deadline=None, max_examples=10000)
Expand Down
14 changes: 14 additions & 0 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.