aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile7
-rw-r--r--contrib/python/podman/Makefile4
-rwxr-xr-x[-rw-r--r--]contrib/python/podman/setup.py2
-rw-r--r--contrib/python/pypodman/Makefile4
-rwxr-xr-x[-rw-r--r--]contrib/python/pypodman/setup.py2
5 files changed, 10 insertions, 9 deletions
diff --git a/Makefile b/Makefile
index b6780c782..f219b4f05 100644
--- a/Makefile
+++ b/Makefile
@@ -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} .
diff --git a/contrib/python/podman/Makefile b/contrib/python/podman/Makefile
index f691092b7..6ec4159f2 100644
--- a/contrib/python/podman/Makefile
+++ b/contrib/python/podman/Makefile
@@ -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
diff --git a/contrib/python/podman/setup.py b/contrib/python/podman/setup.py
index 2953ba0dc..9d54bb3ac 100644..100755
--- a/contrib/python/podman/setup.py
+++ b/contrib/python/podman/setup.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
import os
from setuptools import find_packages, setup
diff --git a/contrib/python/pypodman/Makefile b/contrib/python/pypodman/Makefile
index 8c9691996..cd0fcf1de 100644
--- a/contrib/python/pypodman/Makefile
+++ b/contrib/python/pypodman/Makefile
@@ -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
diff --git a/contrib/python/pypodman/setup.py b/contrib/python/pypodman/setup.py
index 0f80d4060..f07e89201 100644..100755
--- a/contrib/python/pypodman/setup.py
+++ b/contrib/python/pypodman/setup.py
@@ -1,3 +1,5 @@
+#!/usr/bin/env python
+
import os
from setuptools import find_packages, setup