Skip to content

Commit 402e796

Browse files
committed
make: Ensure Cython 0.24 is installed
1 parent d93fe36 commit 402e796

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

Makefile

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
.PHONY: compile clean all distclean test debug sdist clean-libuv
1+
.PHONY: check-env compile clean all distclean test debug sdist clean-libuv
22
.PHONY: release sdist-libuv docs
33

44

5-
all: clean compile
5+
all: compile
66

77

88
clean:
@@ -12,6 +12,9 @@ clean:
1212
find . -name '__pycache__' | xargs rm -rf
1313

1414

15+
check-env:
16+
python -c "import cython; (cython.__version__ < '0.24') and exit(1)"
17+
1518
clean-libuv:
1619
git -C vendor/libuv clean -dfX
1720

@@ -23,14 +26,14 @@ sdist-libuv: clean-libuv
2326
distclean: clean clean-libuv
2427

2528

26-
compile: clean
29+
compile: check-env clean
2730
echo "DEF DEBUG = 0" > uvloop/__debug.pxi
2831
cython -3 uvloop/loop.pyx; rm uvloop/__debug.*
2932
@echo "$$UVLOOP_BUILD_PATCH_SCRIPT" | python
3033
python setup.py build_ext --inplace
3134

3235

33-
debug: clean
36+
debug: check-env clean
3437
echo "DEF DEBUG = 1" > uvloop/__debug.pxi
3538
cython -3 -a -p uvloop/loop.pyx; rm uvloop/__debug.*
3639
@echo "$$UVLOOP_BUILD_PATCH_SCRIPT" | python

0 commit comments

Comments
 (0)