Skip to content

Commit

Permalink
build against xcb-proto 1.16.0
Browse files Browse the repository at this point in the history
We can finally get rid of the --builtins=CW hack (for certain versions...)!
I will probably do a release soon to capture this. But let's at least run
some CI against it for now.

Signed-off-by: Tycho Andersen <tycho@tycho.pizza>
  • Loading branch information
tych0 committed Aug 17, 2023
1 parent 517169a commit ddd0f0a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
fail-fast: false
matrix:
python-version: [3.8, 3.9, "3.10", "3.11", "pypy3.9"]
xcbver: [xcb-proto-1.14.1, xcb-proto-1.15.2, master]
xcbver: [xcb-proto-1.14.1, xcb-proto-1.15.2, xcb-proto-1.16.0, master]
steps:
- uses: actions/checkout@v3
- name: Set up python "${{ matrix.python-version }}"
Expand Down
18 changes: 11 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,18 @@ lint:
htests:
$(CABAL) new-test -j$(NCPUS) --enable-tests

# The --builtin=CW is a hack to work around:
# https://lists.freedesktop.org/archives/xcb/2022-December/011427.html
# when that lands and all tested versions have it, we can
# drop this.
#
# In the meantime, we can work around this in the binding if someone really needs it.
ifeq ($(shell printf "$(XCBVER)\n1.16.0" | sort -V | grep -c 1.16.0), 1)
CW_HACK=--builtins=CW
endif

check: xcffib lint htests
# The --builtin=CW is a hack to work around:
# https://lists.freedesktop.org/archives/xcb/2022-December/011427.html
# when that lands and all tested versions have it, we can
# drop this.
#
# In the meantime, we can work around this in the binding if someone really needs it.
flake8 -j$(NCPUS) --ignore=E128,E231,E251,E301,E302,E305,E501,F401,E402,W503,E741,E999 xcffib/*.py --builtins=CW
flake8 -j$(NCPUS) --ignore=E128,E231,E251,E301,E302,E305,E501,F401,E402,W503,E741,E999 xcffib/*.py $(CW_HACK)
python3 -m compileall xcffib
pytest-3 -v --durations=3

Expand Down

0 comments on commit ddd0f0a

Please sign in to comment.