Merge pull request #818 from wking/python-2-clean

Makefile: Call contrib/python's clean regardless of HAS_PYTHON3
This commit is contained in:
Matthew Heon
2018-09-27 09:42:43 -04:00
committed by GitHub
5 changed files with 10 additions and 9 deletions

View File

@ -24,7 +24,6 @@ ifneq (,$(findstring varlink,$(BUILDTAGS)))
PODMAN_VARLINK_DEPENDENCIES = cmd/podman/varlink/iopodman.go
endif
PYTHON ?= /usr/bin/python3
HAS_PYTHON3 := $(shell command -v python3 2>/dev/null)
BASHINSTALLDIR=${PREFIX}/share/bash-completion/completions
@ -138,12 +137,10 @@ clean:
libpod/container_easyjson.go \
libpod/pod_easyjson.go \
$(MANPAGES) ||:
ifdef HAS_PYTHON3
$(MAKE) -C contrib/python/podman clean
$(MAKE) -C contrib/python/pypodman clean
endif
find . -name \*~ -delete
find . -name \#\* -delete
$(MAKE) -C contrib/python/podman clean
$(MAKE) -C contrib/python/pypodman clean
libpodimage:
docker build -t ${LIBPOD_IMAGE} .

View File

@ -1,4 +1,4 @@
PYTHON ?= /usr/bin/python3
PYTHON ?= $(shell command -v python3 2>/dev/null || command -v python)
DESTDIR ?= /
PODMAN_VERSION ?= '0.0.4'
@ -32,7 +32,7 @@ uninstall:
.PHONY: clean
clean:
$(PYTHON) setup.py clean --all
rm -rf podman.egg-info dist
find . -depth -name __pycache__ -exec rm -rf {} \;
find . -depth -name \*.pyc -exec rm -f {} \;
$(PYTHON) ./setup.py clean --all

2
contrib/python/podman/setup.py Normal file → Executable file
View File

@ -1,3 +1,5 @@
#!/usr/bin/env python
import os
from setuptools import find_packages, setup

View File

@ -1,4 +1,4 @@
PYTHON ?= /usr/bin/python3
PYTHON ?= $(shell command -v python3 2>/dev/null || command -v python)
DESTDIR := /
PODMAN_VERSION ?= '0.0.4'
@ -31,7 +31,7 @@ clobber: uninstall clean
.PHONY: clean
clean:
$(PYTHON) setup.py clean --all
rm -rf pypodman.egg-info dist
find . -depth -name __pycache__ -exec rm -rf {} \;
find . -depth -name \*.pyc -exec rm -f {} \;
$(PYTHON) ./setup.py clean --all

2
contrib/python/pypodman/setup.py Normal file → Executable file
View File

@ -1,3 +1,5 @@
#!/usr/bin/env python
import os
from setuptools import find_packages, setup