From f6c07ec1136395eba35976376efa1aa75552da5f Mon Sep 17 00:00:00 2001 From: EricAtORS Date: Fri, 18 Aug 2023 21:40:50 +0000 Subject: [PATCH] fix for compiling on nixos --- linux_build/build-wheels.sh | 2 +- setup.py | 2 +- tools/P4APIFtp.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/linux_build/build-wheels.sh b/linux_build/build-wheels.sh index 35e38f8..df10ade 100755 --- a/linux_build/build-wheels.sh +++ b/linux_build/build-wheels.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash set -eEx export PATH=$PATH:/work/p4-bin/bin.linux26x86_64/ diff --git a/setup.py b/setup.py index 3b62943..96a8c2d 100644 --- a/setup.py +++ b/setup.py @@ -243,7 +243,7 @@ def check_installed_ssl(): pathToFile = os.path.join(p, "openssl") if os.path.exists(pathToFile) and os.access(pathToFile, os.X_OK): entry = subprocess.check_output("ldd {0} | grep libssl".format(pathToFile), - executable="/bin/bash", shell="True") + shell=True) if entry is not False: libpath = os.path.dirname(entry.split()[2]) diff --git a/tools/P4APIFtp.py b/tools/P4APIFtp.py index 2c7eb8f..498b5b3 100644 --- a/tools/P4APIFtp.py +++ b/tools/P4APIFtp.py @@ -89,7 +89,7 @@ def findPlatform(self): def get_glib_ver(self): pattern = re.compile("ldd\s+\(.*\)\s+(\d+)\.(\d+)") - gentry = subprocess.check_output("ldd --version | grep ldd", executable="/bin/bash", shell="True") + gentry = subprocess.check_output("ldd --version | grep ldd", shell=True) if type(gentry) == bytes: gentry = gentry.decode() match = pattern.match(gentry)