aboutsummaryrefslogtreecommitdiff
path: root/games/anki/files/patch-pylib_Makefile
blob: 24067b37d2f51618ac0a3b8a68b75f3a3298eb67 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Use the current directory to locate and load the ankirspy (= Rust/Python
bridge) module that was built with "build-rspy" target.

Also avoid Python wheel generation as the produced wheels won't be used.  The
Python code will be compiled and installed via Port's Makefile.

--- pylib/Makefile.orig	2020-08-30 01:23:44 UTC
+++ pylib/Makefile
@@ -32,11 +32,9 @@ PHONY: all
 all: check
 
 .build/run-deps: setup.py
-	SKIP_ANKI_RSPY=true python -m pip install -e .
 	@touch $@
 
 .build/dev-deps: requirements.dev
-	python -m pip install -r requirements.dev
 	@touch $@
 
 PROTODEPS := ../proto/backend.proto ../proto/fluent.proto
@@ -45,7 +43,7 @@ PROTODEPS := ../proto/backend.proto ../proto/fluent.pr
 	protoc --proto_path=../proto --python_out=anki --mypy_out=anki $(PROTODEPS)
 	perl -i'' -pe 's/from fluent_pb2/from anki.fluent_pb2/' anki/backend_pb2.pyi
 	perl -i'' -pe 's/import fluent_pb2/import anki.fluent_pb2/' anki/backend_pb2.py
-	python tools/genbackend.py
+	PYTHONPATH=. python tools/genbackend.py
 	python -m black -t py36 anki/rsbackend_gen.py
 	@touch $@
 
@@ -104,9 +102,6 @@ CHECKDEPS := $(shell "${FIND}" anki tests -name '*.py'
 build: .build/build
 
 .build/build: $(BUILD_STEPS) $(CHECKDEPS)
-	rm -rf dist build
-	python setup.py -q bdist_wheel
-	rsync -a dist/*.whl ../dist/
 	touch $@
 
 # prepare code for running in place