From 120dbd876f660d0d33f9e4806af81cf5b528ccb5 Mon Sep 17 00:00:00 2001 From: Andreas Maier Date: Wed, 22 Nov 2023 14:59:09 +0100 Subject: [PATCH] Moved .done files into a subdirectory Signed-off-by: Andreas Maier --- .gitignore | 1 + Makefile | 29 ++++++++++++++++------------- done/.dummy | 0 3 files changed, 17 insertions(+), 13 deletions(-) create mode 100644 done/.dummy diff --git a/.gitignore b/.gitignore index d14d7c99..eb3e47f5 100644 --- a/.gitignore +++ b/.gitignore @@ -34,6 +34,7 @@ cover .vagrant hmc*.yaml /*.done +/done/*.done /try/ session.yml # Files created by releasenotes build diff --git a/Makefile b/Makefile index 755ef88b..5797b114 100644 --- a/Makefile +++ b/Makefile @@ -156,6 +156,9 @@ test_end2end_py_files := \ $(wildcard $(test_dir)/end2end/*/*.py) \ $(wildcard $(test_dir)/end2end/*/*/*.py) \ +# Directory for .done files +done_dir := done + # Determine whether py.test has the --no-print-logs option. pytest_no_log_opt := $(shell py.test --help 2>/dev/null |grep '\--no-print-logs' >/dev/null; if [ $$? -eq 0 ]; then echo '--no-print-logs'; else echo ''; fi) @@ -279,17 +282,17 @@ ifeq (,$(package_version)) $(error Package version could not be determined) endif -base_$(pymn)_$(PACKAGE_LEVEL).done: Makefile base-requirements.txt minimum-constraints.txt +$(done_dir)/base_$(pymn)_$(PACKAGE_LEVEL).done: Makefile base-requirements.txt minimum-constraints.txt -$(call RM_FUNC,$@) @echo "Installing/upgrading pip, setuptools and wheel with PACKAGE_LEVEL=$(PACKAGE_LEVEL)" $(PYTHON_CMD) -m pip install $(pip_level_opts) -r base-requirements.txt echo "done" >$@ .PHONY: develop -develop: develop_$(pymn)_$(PACKAGE_LEVEL).done +develop: $(done_dir)/develop_$(pymn)_$(PACKAGE_LEVEL).done @echo "Makefile: $@ done." -develop_$(pymn)_$(PACKAGE_LEVEL).done: base_$(pymn)_$(PACKAGE_LEVEL).done install_$(pymn)_$(PACKAGE_LEVEL).done dev-requirements.txt requirements.txt minimum-constraints.txt +$(done_dir)/develop_$(pymn)_$(PACKAGE_LEVEL).done: $(done_dir)/base_$(pymn)_$(PACKAGE_LEVEL).done $(done_dir)/install_$(pymn)_$(PACKAGE_LEVEL).done dev-requirements.txt requirements.txt minimum-constraints.txt @echo 'Installing runtime and development requirements with PACKAGE_LEVEL=$(PACKAGE_LEVEL)' $(PYTHON_CMD) -m pip install $(pip_level_opts) $(pip_level_opts_new) -r dev-requirements.txt echo "done" >$@ @@ -348,22 +351,22 @@ doccoverage: @echo "Makefile: $@ done." .PHONY: check -check: flake8_$(pymn)_$(PACKAGE_LEVEL).done +check: $(done_dir)/flake8_$(pymn)_$(PACKAGE_LEVEL).done @echo "Makefile: $@ done." .PHONY: pylint -pylint: pylint_$(pymn)_$(PACKAGE_LEVEL).done +pylint: $(done_dir)/pylint_$(pymn)_$(PACKAGE_LEVEL).done @echo "Makefile: $@ done." .PHONY: safety -safety: safety_$(pymn)_$(PACKAGE_LEVEL).done +safety: $(done_dir)/safety_$(pymn)_$(PACKAGE_LEVEL).done @echo "Makefile: $@ done." .PHONY: install -install: install_$(pymn)_$(PACKAGE_LEVEL).done +install: $(done_dir)/install_$(pymn)_$(PACKAGE_LEVEL).done @echo "Makefile: $@ done." -install_$(pymn)_$(PACKAGE_LEVEL).done: base_$(pymn)_$(PACKAGE_LEVEL).done requirements.txt minimum-constraints.txt setup.py +$(done_dir)/install_$(pymn)_$(PACKAGE_LEVEL).done: $(done_dir)/base_$(pymn)_$(PACKAGE_LEVEL).done requirements.txt minimum-constraints.txt setup.py @echo 'Installing $(package_name) (editable) with PACKAGE_LEVEL=$(PACKAGE_LEVEL)' $(PYTHON_CMD) -m pip install $(pip_level_opts) $(pip_level_opts_new) -e . $(WHICH) zhmc @@ -439,27 +442,27 @@ $(bdist_file) $(sdist_file): _check_version Makefile MANIFEST.in $(dist_included @echo 'Done: Created distribution archives: $@' # TODO: Once PyLint has no more errors, remove the dash "-" -pylint_$(pymn)_$(PACKAGE_LEVEL).done: develop_$(pymn)_$(PACKAGE_LEVEL).done Makefile $(pylint_rc_file) $(check_py_files) +$(done_dir)/pylint_$(pymn)_$(PACKAGE_LEVEL).done: $(done_dir)/develop_$(pymn)_$(PACKAGE_LEVEL).done Makefile $(pylint_rc_file) $(check_py_files) @echo "Makefile: Running Pylint" -$(call RM_FUNC,$@) pylint $(pylint_opts) --rcfile=$(pylint_rc_file) --output-format=text $(check_py_files) echo "done" >$@ @echo "Makefile: Done running Pylint" -safety_$(pymn)_$(PACKAGE_LEVEL).done: develop_$(pymn)_$(PACKAGE_LEVEL).done Makefile $(safety_policy_file) minimum-constraints.txt +$(done_dir)/safety_$(pymn)_$(PACKAGE_LEVEL).done: $(done_dir)/develop_$(pymn)_$(PACKAGE_LEVEL).done Makefile $(safety_policy_file) minimum-constraints.txt @echo "Makefile: Running Safety" -$(call RM_FUNC,$@) safety check --policy-file $(safety_policy_file) -r minimum-constraints.txt --full-report echo "done" >$@ @echo "Makefile: Done running Safety" -flake8_$(pymn)_$(PACKAGE_LEVEL).done: develop_$(pymn)_$(PACKAGE_LEVEL).done Makefile $(flake8_rc_file) $(check_py_files) +$(done_dir)/flake8_$(pymn)_$(PACKAGE_LEVEL).done: $(done_dir)/develop_$(pymn)_$(PACKAGE_LEVEL).done Makefile $(flake8_rc_file) $(check_py_files) -$(call RM_FUNC,$@) flake8 $(check_py_files) echo "done" >$@ .PHONY: check_reqs -check_reqs: develop_$(pymn)_$(PACKAGE_LEVEL).done minimum-constraints.txt requirements.txt +check_reqs: $(done_dir)/develop_$(pymn)_$(PACKAGE_LEVEL).done minimum-constraints.txt requirements.txt @echo "Makefile: Checking missing dependencies of this package" pip-missing-reqs $(package_name) --requirements-file=requirements.txt pip-missing-reqs $(package_name) --requirements-file=minimum-constraints.txt @@ -480,7 +483,7 @@ test: Makefile $(package_py_files) $(test_function_py_files) $(pytest_cov_files) @echo "Makefile: $@ done." .PHONY: end2end -end2end: Makefile develop_$(pymn)_$(PACKAGE_LEVEL).done $(package_py_files) $(test_end2end_py_files) $(pytest_cov_files) +end2end: Makefile $(done_dir)/develop_$(pymn)_$(PACKAGE_LEVEL).done $(package_py_files) $(test_end2end_py_files) $(pytest_cov_files) -$(call RMDIR_R_FUNC,htmlcov.end2end) bash -c "TESTEND2END_LOAD=true py.test --color=yes $(pytest_no_log_opt) -v -s $(test_dir)/end2end $(pytest_cov_opts) $(pytest_opts)" @echo "Makefile: $@ done." diff --git a/done/.dummy b/done/.dummy new file mode 100644 index 00000000..e69de29b