mirror of
https://github.com/clearlinux/autospec.git
synced 2026-08-22 07:08:04 +00:00
buildreq: Fix python_req_in_filtered_path
The python_req_in_filtered_path function was missing skips where the directory was the last thing in the dirpath (as it matched an ending slash and there isn't one in that case). Since we need the full path to the item to scan for dependencies, make that path first. Then use the full file path as the path to filter because it will always have an ending slash for the skip portion. Signed-off-by: William Douglas <william.douglas@intel.com>
This commit is contained in:
committed by
William Douglas
parent
f20cc8a1d3
commit
cbe6aa1eae
+12
-8
@@ -834,20 +834,23 @@ class Requirements(object):
|
||||
config.set_build_pattern("qmake", default_score)
|
||||
|
||||
if "requires.txt" in files:
|
||||
if not python_req_in_filtered_path(dirpath):
|
||||
self.grab_python_requirements(dirpath + '/requires.txt', config.os_packages)
|
||||
req_path = os.path.join(dirpath, "requires.txt")
|
||||
if not python_req_in_filtered_path(req_path):
|
||||
self.grab_python_requirements(req_path, config.os_packages)
|
||||
|
||||
if "pyproject.toml" in files:
|
||||
if not python_req_in_filtered_path(dirpath):
|
||||
req_path = os.path.join(dirpath, "pyproject.toml")
|
||||
if not python_req_in_filtered_path(req_path):
|
||||
self.add_buildreq("buildreq-distutils3")
|
||||
self.add_pyproject_requires(dirpath + '/pyproject.toml')
|
||||
self.add_pyproject_requires(req_path)
|
||||
if "setup.cfg" in files:
|
||||
self.add_setup_cfg_requires(dirpath + '/setup.cfg', config.os_packages)
|
||||
config.set_build_pattern("pyproject", default_score)
|
||||
elif "setup.py" in files:
|
||||
if not python_req_in_filtered_path(dirpath):
|
||||
req_path = os.path.join(dirpath, "setup.py")
|
||||
if not python_req_in_filtered_path(req_path):
|
||||
self.add_buildreq("buildreq-distutils3")
|
||||
self.add_setup_py_requires(dirpath + '/setup.py', config.os_packages)
|
||||
self.add_setup_py_requires(req_path, config.os_packages)
|
||||
config.set_build_pattern("distutils3", default_score)
|
||||
|
||||
if "Makefile.PL" in files or "Build.PL" in files:
|
||||
@@ -859,8 +862,9 @@ class Requirements(object):
|
||||
config.set_build_pattern("scons", default_score)
|
||||
|
||||
if "requirements.txt" in files:
|
||||
if not python_req_in_filtered_path(dirpath):
|
||||
self.grab_python_requirements(dirpath + '/requirements.txt', config.os_packages)
|
||||
req_path = os.path.join(dirpath, "requirements.txt")
|
||||
if not python_req_in_filtered_path(req_path):
|
||||
self.grab_python_requirements(req_path, config.os_packages)
|
||||
|
||||
if "meson.build" in files:
|
||||
self.add_buildreq("buildreq-meson")
|
||||
|
||||
Reference in New Issue
Block a user