0 | |
Description: Don't require python for build
|
1 | |
The features requiring Python are not packaged for Debian, therefore this patch
|
2 | |
removes the build system's check for it.
|
3 | |
Author: Sebastian Humenda <shumenda@gmx.de>
|
4 | |
Last-Update: 2018-08-04
|
5 | |
|
6 | |
|
7 | |
Index: freedict-tools/mk/config.mk
|
8 | |
===================================================================
|
9 | |
--- freedict-tools.orig/mk/config.mk
|
10 | |
+++ freedict-tools/mk/config.mk
|
11 | |
@@ -68,52 +68,52 @@ FREEDICTRC = $(wildcard $(HOME)/.config/
|
12 | |
|
13 | |
|
14 | |
################################################################################
|
15 | |
-# Python special handling
|
16 | |
-# First, the interpreter is queried for the correct version (and name). Then the
|
17 | |
-# setup for a virtual environment is done. For the "end-user", all that matters
|
18 | |
-# should be the exc_pyscript function, e.g.:
|
19 | |
+## Python special handling
|
20 | |
+## First, the interpreter is queried for the correct version (and name). Then the
|
21 | |
+## setup for a virtual environment is done. For the "end-user", all that matters
|
22 | |
+## should be the exc_pyscript function, e.g.:
|
23 | |
+##
|
24 | |
+## foo:
|
25 | |
+## $(exc_pyscript) fd_api --what-ever
|
26 | |
#
|
27 | |
-# foo:
|
28 | |
-# $(exc_pyscript) fd_api --what-ever
|
29 | |
-
|
30 | |
-# find interpreter with matching name, python3 or python?
|
31 | |
-PYTHON := $(shell command -v python3 2> /dev/null)
|
32 | |
-ifeq ($(PYTHON),)
|
33 | |
- PYTHON := $(shell command -v python 2> /dev/null)
|
34 | |
-ifeq ("$(PYTHON)","")
|
35 | |
-$(error No Python executable found, please make sure that a recent Python is in the search path)
|
36 | |
-endif
|
37 | |
-endif
|
38 | |
-
|
39 | |
-# query version
|
40 | |
-PYTHON_VERSION_FULL := $(wordlist 2,4,$(subst ., ,$(shell $(PYTHON) --version 2>&1)))
|
41 | |
-PYTHON_VERSION_MAJOR := $(word 1,${PYTHON_VERSION_FULL})
|
42 | |
-
|
43 | |
-ifneq ($(PYTHON_VERSION_MAJOR),3)
|
44 | |
-$(error a python Version >= 3.4 is required, current python major is $(PYTHON_VERSION_MAJOR))
|
45 | |
-endif
|
46 | |
-
|
47 | |
-# exc_pyscript is meant to either call a system-wide installed version or one
|
48 | |
-# from a virtual env. The latter needs to be specified in the FD configuration,
|
49 | |
-# documented in the wiki.
|
50 | |
-# This is a fallback for system-wide script usage:
|
51 | |
-exc_pyscript = $(1) $(2) $(3) $(4) $(5) $(6) $(7) $(8) $(9)
|
52 | |
-
|
53 | |
-# find a (python) virtual env
|
54 | |
-# ToDo: look at detection algorithm
|
55 | |
-FREEDICTRC = $(HOME)/.config/freedict/freedictrc
|
56 | |
-ifneq ($(wildcard $(FREEDICTRC)),)
|
57 | |
-VIRTUAL_ENV=$(shell grep -E 'virtual_env.*=.*' < $(FREEDICTRC) | cut -d = -f 2\
|
58 | |
- |tr -d ' ')
|
59 | |
-# if virtual env found
|
60 | |
-ifneq ($(VIRTUAL_ENV),)
|
61 | |
-ifneq ($(wildcard $(VIRTUAL_ENV)),)
|
62 | |
-# call python from the virtual environment
|
63 | |
-exc_pyscript = source $(VIRTUAL_ENV)/bin/activate; \
|
64 | |
- $(1) $(2) $(3) $(4) $(5) $(6) $(7) $(8) $(9)
|
65 | |
-endif
|
66 | |
-endif
|
67 | |
-endif
|
68 | |
+## find interpreter with matching name, python3 or python?
|
69 | |
+#PYTHON := $(shell command -v python3 2> /dev/null)
|
70 | |
+#ifeq ($(PYTHON),)
|
71 | |
+# PYTHON := $(shell command -v python 2> /dev/null)
|
72 | |
+#ifeq ("$(PYTHON)","")
|
73 | |
+#$(error No Python executable found, please make sure that a recent Python is in the search path)
|
74 | |
+#endif
|
75 | |
+#endif
|
76 | |
+#
|
77 | |
+## query version
|
78 | |
+#PYTHON_VERSION_FULL := $(wordlist 2,4,$(subst ., ,$(shell $(PYTHON) --version 2>&1)))
|
79 | |
+#PYTHON_VERSION_MAJOR := $(word 1,${PYTHON_VERSION_FULL})
|
80 | |
+#
|
81 | |
+#ifneq ($(PYTHON_VERSION_MAJOR),3)
|
82 | |
+#$(error a python Version >= 3.4 is required, current python major is $(PYTHON_VERSION_MAJOR))
|
83 | |
+#endif
|
84 | |
+#
|
85 | |
+## exc_pyscript is meant to either call a system-wide installed version or one
|
86 | |
+## from a virtual env. The latter needs to be specified in the FD configuration,
|
87 | |
+## documented in the wiki.
|
88 | |
+## This is a fallback for system-wide script usage:
|
89 | |
+#exc_pyscript = $(1) $(2) $(3) $(4) $(5) $(6) $(7) $(8) $(9)
|
90 | |
+#
|
91 | |
+## find a (python) virtual env
|
92 | |
+## ToDo: look at detection algorithm
|
93 | |
+#FREEDICTRC = $(HOME)/.config/freedict/freedictrc
|
94 | |
+#ifneq ($(wildcard $(FREEDICTRC)),)
|
95 | |
+#VIRTUAL_ENV=$(shell grep -E 'virtual_env.*=.*' < $(FREEDICTRC) | cut -d = -f 2\
|
96 | |
+# |tr -d ' ')
|
97 | |
+## if virtual env found
|
98 | |
+#ifneq ($(VIRTUAL_ENV),)
|
99 | |
+#ifneq ($(wildcard $(VIRTUAL_ENV)),)
|
100 | |
+## call python from the virtual environment
|
101 | |
+#exc_pyscript = source $(VIRTUAL_ENV)/bin/activate; \
|
102 | |
+# $(1) $(2) $(3) $(4) $(5) $(6) $(7) $(8) $(9)
|
103 | |
+#endif
|
104 | |
+#endif
|
105 | |
+#endif
|
106 | |
|
107 | |
|
108 | |
################################################################################
|