diff --git a/dist-git/dist-git.spec b/dist-git/dist-git.spec index 58b0e32..b7a903c 100644 --- a/dist-git/dist-git.spec +++ b/dist-git/dist-git.spec @@ -21,10 +21,7 @@ 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 @@ -32,20 +29,6 @@ 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 @@ -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 diff --git a/dist-git/tests/test_upload_script.py b/dist-git/tests/test_upload_script.py index 176824f..6702a5a 100644 --- a/dist-git/tests/test_upload_script.py +++ b/dist-git/tests/test_upload_script.py @@ -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 @@ -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' @@ -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: