All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] build: unbreak non-functionality of --disable-python
@ 2019-06-25  6:58 Jan Engelhardt
  2019-06-25  6:58 ` [PATCH 2/3] build: avoid recursion into py/ if not selected Jan Engelhardt
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Jan Engelhardt @ 2019-06-25  6:58 UTC (permalink / raw)
  To: pablo; +Cc: netfilter-devel

Signed-off-by: Jan Engelhardt <jengelh@inai.de>
---
 configure.ac | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 75cf919..b71268e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -103,11 +103,14 @@ AC_ARG_WITH([python_bin],
 	   )
 
 AS_IF([test "x$PYTHON_BIN" = "x"], [
-	AS_IF([test "x$enable_python" = "xyes"], [AC_MSG_ERROR([Python asked but not found])])
-	AS_IF([test "x$enable_python" = "xcheck"], [AC_MSG_WARN([Python not found, continuing anyway])])
+	AS_IF([test "x$enable_python" = "xyes"], [AC_MSG_ERROR([Python asked but not found])],
+	[test "x$enable_python" = "xcheck"], [
+		AC_MSG_WARN([Python not found, continuing anyway])
+		enable_python=no
 	])
+])
 
-AM_CONDITIONAL([HAVE_PYTHON], [test "x$PYTHON_BIN" != "x"])
+AM_CONDITIONAL([HAVE_PYTHON], [test "$enable_python" != "no"])
 
 AC_CONFIG_FILES([					\
 		Makefile				\
@@ -138,7 +141,7 @@ nft configuration:
   libxtables support:		${with_xtables}
   json output support:          ${with_json}"
 
-AS_IF([test "x$PYTHON_BIN" != "x"], [
+AS_IF([test "$enable_python" != "no"], [
 	echo "  enable Python:		yes (with $PYTHON_BIN)"
 	], [
 	echo "  enable Python:		no"
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/3] build: avoid recursion into py/ if not selected
  2019-06-25  6:58 [PATCH 1/3] build: unbreak non-functionality of --disable-python Jan Engelhardt
@ 2019-06-25  6:58 ` Jan Engelhardt
  2019-06-25  8:05   ` Pablo Neira Ayuso
  2019-06-25  6:58 ` [PATCH 3/3] build: avoid unnecessary call to xargs Jan Engelhardt
  2019-06-25  8:05 ` [PATCH 1/3] build: unbreak non-functionality of --disable-python Pablo Neira Ayuso
  2 siblings, 1 reply; 7+ messages in thread
From: Jan Engelhardt @ 2019-06-25  6:58 UTC (permalink / raw)
  To: pablo; +Cc: netfilter-devel

Signed-off-by: Jan Engelhardt <jengelh@inai.de>
---
 Makefile.am    | 6 ++++--
 py/Makefile.am | 3 ---
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index e567d32..4a17424 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3,8 +3,10 @@ ACLOCAL_AMFLAGS	= -I m4
 SUBDIRS = 	src	\
 		include	\
 		files	\
-		doc		\
-		py
+		doc
+if HAVE_PYTHON
+SUBDIRS += py
+endif
 
 EXTRA_DIST =	tests	\
 		files
diff --git a/py/Makefile.am b/py/Makefile.am
index 9fce7c9..5f4e1f6 100644
--- a/py/Makefile.am
+++ b/py/Makefile.am
@@ -1,7 +1,5 @@
 EXTRA_DIST = setup.py __init__.py nftables.py schema.json
 
-if HAVE_PYTHON
-
 all-local:
 	cd $(srcdir) && \
 		$(PYTHON_BIN) setup.py build --build-base $(abs_builddir)
@@ -28,4 +26,3 @@ clean-local:
 
 distclean-local:
 	rm -f version
-endif
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/3] build: avoid unnecessary call to xargs
  2019-06-25  6:58 [PATCH 1/3] build: unbreak non-functionality of --disable-python Jan Engelhardt
  2019-06-25  6:58 ` [PATCH 2/3] build: avoid recursion into py/ if not selected Jan Engelhardt
@ 2019-06-25  6:58 ` Jan Engelhardt
  2019-06-25  8:05   ` Pablo Neira Ayuso
  2019-06-25  8:05 ` [PATCH 1/3] build: unbreak non-functionality of --disable-python Pablo Neira Ayuso
  2 siblings, 1 reply; 7+ messages in thread
From: Jan Engelhardt @ 2019-06-25  6:58 UTC (permalink / raw)
  To: pablo; +Cc: netfilter-devel

Signed-off-by: Jan Engelhardt <jengelh@inai.de>
---
 py/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/py/Makefile.am b/py/Makefile.am
index 5f4e1f6..215ecd9 100644
--- a/py/Makefile.am
+++ b/py/Makefile.am
@@ -22,7 +22,7 @@ clean-local:
 		$(PYTHON_BIN) setup.py clean \
 		--build-base $(abs_builddir)
 	rm -rf scripts-* lib* build dist bdist.* nftables.egg-info
-	find . -name \*.pyc -print0 | xargs -0 rm -f
+	find . -name \*.pyc -delete
 
 distclean-local:
 	rm -f version
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 1/3] build: unbreak non-functionality of --disable-python
  2019-06-25  6:58 [PATCH 1/3] build: unbreak non-functionality of --disable-python Jan Engelhardt
  2019-06-25  6:58 ` [PATCH 2/3] build: avoid recursion into py/ if not selected Jan Engelhardt
  2019-06-25  6:58 ` [PATCH 3/3] build: avoid unnecessary call to xargs Jan Engelhardt
@ 2019-06-25  8:05 ` Pablo Neira Ayuso
  2 siblings, 0 replies; 7+ messages in thread
From: Pablo Neira Ayuso @ 2019-06-25  8:05 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: netfilter-devel

Applied, thanks.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 2/3] build: avoid recursion into py/ if not selected
  2019-06-25  6:58 ` [PATCH 2/3] build: avoid recursion into py/ if not selected Jan Engelhardt
@ 2019-06-25  8:05   ` Pablo Neira Ayuso
  0 siblings, 0 replies; 7+ messages in thread
From: Pablo Neira Ayuso @ 2019-06-25  8:05 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: netfilter-devel

Also applied, thanks.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH 3/3] build: avoid unnecessary call to xargs
  2019-06-25  6:58 ` [PATCH 3/3] build: avoid unnecessary call to xargs Jan Engelhardt
@ 2019-06-25  8:05   ` Pablo Neira Ayuso
  0 siblings, 0 replies; 7+ messages in thread
From: Pablo Neira Ayuso @ 2019-06-25  8:05 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: netfilter-devel

Also applied, thanks.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 2/3] build: avoid recursion into py/ if not selected
  2019-06-24 22:16 Jan Engelhardt
@ 2019-06-24 22:16 ` Jan Engelhardt
  0 siblings, 0 replies; 7+ messages in thread
From: Jan Engelhardt @ 2019-06-24 22:16 UTC (permalink / raw)
  To: pablo; +Cc: netfilter-devel

---
 Makefile.am    | 6 ++++--
 py/Makefile.am | 3 ---
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index e567d32..4a17424 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3,8 +3,10 @@ ACLOCAL_AMFLAGS	= -I m4
 SUBDIRS = 	src	\
 		include	\
 		files	\
-		doc		\
-		py
+		doc
+if HAVE_PYTHON
+SUBDIRS += py
+endif
 
 EXTRA_DIST =	tests	\
 		files
diff --git a/py/Makefile.am b/py/Makefile.am
index 9fce7c9..5f4e1f6 100644
--- a/py/Makefile.am
+++ b/py/Makefile.am
@@ -1,7 +1,5 @@
 EXTRA_DIST = setup.py __init__.py nftables.py schema.json
 
-if HAVE_PYTHON
-
 all-local:
 	cd $(srcdir) && \
 		$(PYTHON_BIN) setup.py build --build-base $(abs_builddir)
@@ -28,4 +26,3 @@ clean-local:
 
 distclean-local:
 	rm -f version
-endif
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-06-25  8:06 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-25  6:58 [PATCH 1/3] build: unbreak non-functionality of --disable-python Jan Engelhardt
2019-06-25  6:58 ` [PATCH 2/3] build: avoid recursion into py/ if not selected Jan Engelhardt
2019-06-25  8:05   ` Pablo Neira Ayuso
2019-06-25  6:58 ` [PATCH 3/3] build: avoid unnecessary call to xargs Jan Engelhardt
2019-06-25  8:05   ` Pablo Neira Ayuso
2019-06-25  8:05 ` [PATCH 1/3] build: unbreak non-functionality of --disable-python Pablo Neira Ayuso
  -- strict thread matches above, loose matches on Subject: below --
2019-06-24 22:16 Jan Engelhardt
2019-06-24 22:16 ` [PATCH 2/3] build: avoid recursion into py/ if not selected Jan Engelhardt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.