forked from pool/javapackages-tools
This commit is contained in:
36
0001-Fix-tests-with-python-3.4.patch
Normal file
36
0001-Fix-tests-with-python-3.4.patch
Normal file
@@ -0,0 +1,36 @@
|
||||
From 52e8ed94d648ec8e3aae2534d34c84e5f65357ed Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
|
||||
Date: Sun, 29 Sep 2024 10:59:57 +0200
|
||||
Subject: [PATCH 1/2] Fix tests with python 3.4
|
||||
|
||||
---
|
||||
test/test_rpmbuild.py | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/test/test_rpmbuild.py b/test/test_rpmbuild.py
|
||||
index d64e40d2..8f2d45b7 100644
|
||||
--- a/test/test_rpmbuild.py
|
||||
+++ b/test/test_rpmbuild.py
|
||||
@@ -4,7 +4,6 @@ import re
|
||||
import sys
|
||||
import subprocess
|
||||
import shutil
|
||||
-import glob
|
||||
|
||||
from textwrap import dedent
|
||||
|
||||
@@ -101,8 +100,9 @@ class Package(object):
|
||||
os.remove('tmperr')
|
||||
# RPM 4.19 and 4.20 use different BUILD directory structure, thus we search the filesystem
|
||||
# to find the actual location of build subdir without reliance on particular structure
|
||||
- self.buildpath = glob.glob('rpmbuild/BUILD/**/{name}-subdir'.format(name=self.__name),
|
||||
- recursive=True)[0]
|
||||
+ self.buildpath = [os.path.join(dirpath, d)
|
||||
+ for dirpath, dirnames, files in os.walk('rpmbuild/BUILD')
|
||||
+ for d in dirnames if d.endswith('{name}-subdir'.format(name=self.__name))][0]
|
||||
return (out, err, ret)
|
||||
|
||||
def set_env(self, name, value):
|
||||
--
|
||||
2.46.1
|
||||
|
||||
Reference in New Issue
Block a user