mirror of
https://github.com/release-engineering/dist-git.git
synced 2025-02-23 15:02:54 +00:00
remove rhel7 specific code
This commit is contained in:
parent
a2da091029
commit
15f514291d
2 changed files with 4 additions and 31 deletions
|
@ -21,31 +21,13 @@ BuildRequires: systemd
|
|||
|
||||
Requires: httpd
|
||||
Requires: perl(Sys::Syslog)
|
||||
%if 0%{?fedora} || 0%{?rhel} > 7
|
||||
Requires: (dist-git-selinux if selinux-policy-targeted)
|
||||
%else
|
||||
Requires: dist-git-selinux
|
||||
%endif
|
||||
Requires: git
|
||||
Requires: git-daemon
|
||||
Requires: mod_ssl
|
||||
Requires: crudini
|
||||
Requires(pre): shadow-utils
|
||||
|
||||
%if 0%{?rhel} && 0%{?rhel} < 8
|
||||
Requires: python-requests
|
||||
Requires: python-configparser
|
||||
Requires: python-grokmirror
|
||||
Requires: fedmsg
|
||||
BuildRequires: python-nose
|
||||
BuildRequires: python-nose-parameterized
|
||||
BuildRequires: python-requests
|
||||
BuildRequires: python-configparser
|
||||
|
||||
# temporary because global Requires doesn't work right now, see the comment below
|
||||
Requires: moreutils
|
||||
|
||||
%else
|
||||
Requires: python3-requests
|
||||
Recommends: python3-grokmirror
|
||||
Suggests: python3-fedmsg
|
||||
|
@ -60,7 +42,6 @@ BuildRequires: python3-requests
|
|||
|
||||
# this should be Requires but see https://bugzilla.redhat.com/show_bug.cgi?id=1833810
|
||||
Recommends: moreutils
|
||||
%endif
|
||||
|
||||
%if 0%{?fedora} && 0%{?fedora} >= 41
|
||||
# The `cgi` module was removed from the Python 3.13 standard library
|
||||
|
|
|
@ -18,13 +18,7 @@ import time
|
|||
import random
|
||||
from configparser import ConfigParser
|
||||
|
||||
PY2 = sys.version_info.major == 2
|
||||
|
||||
if PY2:
|
||||
NOSE_PARAMETERIZED_NO_WARN=1
|
||||
from nose_parameterized import parameterized
|
||||
else:
|
||||
from parameterized import parameterized
|
||||
from parameterized import parameterized
|
||||
|
||||
|
||||
# Path to the actual CGI script that should be tested
|
||||
|
@ -38,9 +32,9 @@ from {http_package} import HTTPServer
|
|||
from {cgi_package} import CGIHTTPRequestHandler
|
||||
s = HTTPServer(('%s', %s), CGIHTTPRequestHandler)
|
||||
s.handle_request()
|
||||
""".format(python="python2" if PY2 else "python3",
|
||||
http_package="BaseHTTPServer" if PY2 else "http.server",
|
||||
cgi_package="CGIHTTPServer" if PY2 else "http.server")
|
||||
""".format(python="python3",
|
||||
http_package="http.server",
|
||||
cgi_package="http.server")
|
||||
|
||||
# MD5 hash of "hello.txt" and "new.txt" strings used in a few tests
|
||||
HASH = '2e54144ba487ae25d03a3caba233da71'
|
||||
|
@ -270,8 +264,6 @@ def _copy_tweak(source_file, dest_file, topdir):
|
|||
with open(source_file) as source:
|
||||
with open(dest_file, 'w') as dest:
|
||||
for line in source:
|
||||
if PY2 and line == "#!/usr/bin/python3\n":
|
||||
line = line.replace("python3", "python2")
|
||||
|
||||
m = regex.match(line)
|
||||
if m:
|
||||
|
|
Loading…
Add table
Reference in a new issue