From 0e5f88efe006d0274fb439713a70d444ec00ed5d Mon Sep 17 00:00:00 2001 From: William Douglas Date: Tue, 24 Mar 2020 09:24:45 -0700 Subject: [PATCH] Remove unused function This hasn't been in use for some time and with the rework of pip requirement capture is no longer required. --- autospec/buildreq.py | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/autospec/buildreq.py b/autospec/buildreq.py index cefb0fd..59298b1 100644 --- a/autospec/buildreq.py +++ b/autospec/buildreq.py @@ -612,23 +612,6 @@ def grab_python_requirements(descfile): add_requires(clean_python_req(line)) -def grab_pip_requirements(pkgname): - """Determine python requirements for pkgname using pip show.""" - try: - pipeout = subprocess.check_output(['/usr/bin/pip3', 'show', pkgname]) - except Exception: - return - lines = pipeout.decode("utf-8").split('\n') - for line in lines: - words = line.split(" ") - if words[0] == "Requires:": - for w in words[1:]: - w2 = w.replace(",", "") - if len(w2) > 2: - print("Suggesting python requirement ", w2) - add_requires(w2) - - def get_python_build_version_from_classifier(filename): """Detect if setup should use distutils3 only.