Skip to content

Commit

Permalink
remove rhel7 specific code
Browse files Browse the repository at this point in the history
  • Loading branch information
xsuchy committed Jul 31, 2024
1 parent 7a19b5c commit 597c863
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 30 deletions.
18 changes: 0 additions & 18 deletions dist-git/dist-git.spec
Original file line number Diff line number Diff line change
Expand Up @@ -21,31 +21,14 @@ 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
Expand All @@ -61,7 +44,6 @@ BuildRequires: python3-requests
# this should be Requires but see https://bugzilla.redhat.com/show_bug.cgi?id=1833810
Recommends: moreutils

%endif

%description
DistGit is a Git repository specifically designed to hold RPM
Expand Down
16 changes: 4 additions & 12 deletions dist-git/tests/test_upload_script.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,7 @@
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
Expand All @@ -38,9 +32,9 @@
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'
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit 597c863

Please sign in to comment.