mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Add missing deps for make pylint
The make target `pylint` hasn't a full list of its dependencies. This leads to problems like: - different build results - PR tests just do not run pylint over some Python scripts. The new build target (`python_scripts`) was implemented. It's intended for building all Python scripts (files, containing @PYTHONSHEBANG@ as a shebang placeholder). The make `pylint` should require it. Fixes: https://pagure.io/freeipa/issue/7921 Signed-off-by: Stanislav Levin <slev@altlinux.org> Reviewed-By: Christian Heimes <cheimes@redhat.com>
This commit is contained in:
committed by
Christian Heimes
parent
36c65c4aaa
commit
921d803d15
20
Makefile.am
20
Makefile.am
@@ -13,6 +13,16 @@ endif
|
||||
|
||||
IPACLIENT_SUBDIRS = ipaclient ipalib ipaplatform ipapython
|
||||
PYTHON_SUBDIRS = $(IPACLIENT_SUBDIRS) $(IPATESTS_SUBDIRS) $(IPASERVER_SUBDIRS)
|
||||
PYTHON_SCRIPT_SUBDIRS = \
|
||||
$(top_builddir) \
|
||||
$(top_builddir)/client \
|
||||
$(top_builddir)/daemons/dnssec \
|
||||
$(top_builddir)/install/certmonger \
|
||||
$(top_builddir)/install/oddjob \
|
||||
$(top_builddir)/install/restart_scripts \
|
||||
$(top_builddir)/install/tools \
|
||||
$(NULL)
|
||||
|
||||
IPA_PLACEHOLDERS = freeipa ipa ipaserver ipatests
|
||||
SUBDIRS = asn1 util client contrib po pypi $(PYTHON_SUBDIRS) $(SERVER_SUBDIRS)
|
||||
|
||||
@@ -273,9 +283,7 @@ yamllint: $(YAML_FILES)
|
||||
.PHONY: pylint
|
||||
|
||||
if WITH_PYLINT
|
||||
pylint: $(GENERATED_PYTHON_FILES) ipasetup.py
|
||||
@# build CLI scripts
|
||||
$(MAKE) -C $(top_builddir)/install/tools
|
||||
pylint: $(GENERATED_PYTHON_FILES) ipasetup.py python_scripts
|
||||
FILES=`find $(top_srcdir) \
|
||||
-type d -exec test -e '{}/__init__.py' \; -print -prune -o \
|
||||
-path './rpmbuild' -prune -o \
|
||||
@@ -382,6 +390,12 @@ python_install:
|
||||
$(MAKE) $(AM_MAKEFLAGS) -C $${dir} install || exit 1; \
|
||||
done
|
||||
|
||||
.PHONY: python_scripts
|
||||
python_scripts:
|
||||
for dir in $(PYTHON_SCRIPT_SUBDIRS); do \
|
||||
$(MAKE) $(AM_MAKEFLAGS) -C $${dir} python_scripts_sub || exit 1; \
|
||||
done
|
||||
|
||||
.PHONY:
|
||||
strip-po:
|
||||
$(MAKE) -C po strip-po
|
||||
|
||||
@@ -2,3 +2,6 @@
|
||||
$(PYTHON_SHEBANG):%: %.in Makefile
|
||||
$(AM_V_GEN)sed -e 's|@PYTHONSHEBANG[@]|#!$(PYTHON) -E|g' $< > $@
|
||||
$(AM_V_GEN)chmod +x $@
|
||||
|
||||
.PHONY: python_scripts_sub
|
||||
python_scripts_sub: $(PYTHON_SHEBANG)
|
||||
|
||||
Reference in New Issue
Block a user