From 959d743452d65a5148be8bcd8ea8baf570bd30c2 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Tue, 28 Aug 2018 22:16:33 +0200 Subject: [PATCH] Drop Python3 build requirement This is only being used for extracting the package name from package json, to avoid having to duplicate it in `Makefile`. But for only this purpose, Python 3 is rather heavyweight. It's also not available on RHEL/CentOS 7. --- Makefile | 3 ++- cockpit-starter-kit.spec.in | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 0cead4b..3f332fc 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,5 @@ -PACKAGE_NAME := $(shell python3 -c "import json; print(json.load(open('package.json'))['name'])") +# extract name from package.json +PACKAGE_NAME := $(shell awk '/"name":/ {gsub(/[",]/, "", $$2); print $$2}' package.json) VERSION := $(shell git describe 2>/dev/null || echo 1) ifeq ($(TEST_OS),) TEST_OS = centos-7 diff --git a/cockpit-starter-kit.spec.in b/cockpit-starter-kit.spec.in index fa71de2..53e8b70 100644 --- a/cockpit-starter-kit.spec.in +++ b/cockpit-starter-kit.spec.in @@ -6,7 +6,6 @@ License: LGPLv2+ Source: cockpit-starter-kit-%{version}.tar.gz BuildArch: noarch -BuildRequires: /usr/bin/python3 %define debug_package %{nil}