summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2020-06-19 12:59:11 +0200
committerThomas Haller <thaller@redhat.com>2020-06-19 12:59:13 +0200
commitd64eb7201ec1ac095827f8a8643b71d7f673495d (patch)
treecbbe7aca0cb4c45f0af9980576dd1c36f4558452
parent38d291f2294dd15d9cb128a693d20b34df7046f1 (diff)
parent8c3ee4e8574d84258f34068486b33e10f0e87313 (diff)
downloadNetworkManager-d64eb7201ec1ac095827f8a8643b71d7f673495d.tar.gz
build: merge branch 'ss/python-improvements'
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/540
-rw-r--r--.gitlab-ci.yml5
-rw-r--r--Makefile.am6
-rw-r--r--configure.ac4
3 files changed, 13 insertions, 2 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 5e1ea7a99a..389da67218 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -74,11 +74,12 @@ stages:
- date '+%Y%m%d-%H%M%S'; test "$NM_BUILD_TARBALL" != 1 || mv /tmp/NetworkManager-1*.tar.xz /tmp/NetworkManager-1*.src.rpm ./
checkpatch:
- image: fedora:29
+ image: fedora:32
stage: test
script:
- - date '+%Y%m%d-%H%M%S'; dnf install -y git
+ - date '+%Y%m%d-%H%M%S'; dnf install -y git black
- date '+%Y%m%d-%H%M%S'; NM_CHECKPATCH_FETCH_UPSTREAM=1 contrib/scripts/checkpatch-feature-branch.sh 2>&1 | tee checkpatch-out.txt
+ - date '+%Y%m%d-%H%M%S'; black --check .
allow_failure: true
artifacts:
when: on_failure
diff --git a/Makefile.am b/Makefile.am
index 285e07778f..db9f4c80c6 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -5236,6 +5236,12 @@ CLEANFILES += \
include Makefile.examples
+if WITH_PYTHON_BLACK
+check-python-black:
+ test "$$NMTST_SKIP_PYTHON_BLACK" != 1 && $(BLACK) --check $(top_srcdir)
+check_local += check-python-black
+endif
+
###############################################################################
check-local: $(check_local)
diff --git a/configure.ac b/configure.ac
index 175ee554ed..2ace7ecaee 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1272,6 +1272,10 @@ else
have_introspection=no
fi
+# check for python black. And check if all files are formatted with python black
+AC_PATH_PROG(BLACK, black)
+AM_CONDITIONAL(WITH_PYTHON_BLACK, test "${BLACK}" != "")
+
# check for pregenerated manpages and documentation to be installed
use_pregen_docs=no
if test "$build_docs" != "yes" -a \