Debian Codegraph @

debian/patches/fix_setup_requirements.patch

raw
1 Description: read requirements and version directly in setup.py
2
3 The 0.4.4 upstream tarball removed lib/core/installation.py, but setup.py
4 still imports get_dependencies() from that module. It also imports VERSION
5 from lib.core.settings, which fails under PEP 517 isolated builds because
6 the lib package is not on sys.path. Read requirements.txt directly and
7 hardcode the version to avoid importing lib during build.
8
9 Author: Clay Stan <[email protected]>
10 Forwarded: no
11 Last-Update: 2026-06-26
12
13 Index: dirsearch/setup.py
14 ===================================================================
15 --- dirsearch.orig/setup.py
16 +++ dirsearch/setup.py
17 @@ -4,13 +4,19 @@ import setuptools
18 import shutil
19 import tempfile
20
21 -from lib.core.installation import get_dependencies
22 -from lib.core.settings import VERSION
23 +VERSION = "0.4.4"
24
25
26 current_dir = os.path.abspath(os.path.dirname(__file__))
27 +
28 +
29 +def get_dependencies():
30 + with io.open(os.path.join(current_dir, "requirements.txt"), encoding="utf-8") as fd:
31 + return [line.strip() for line in fd if line.strip() and not line.lstrip().startswith("#") and "setuptools" not in line]
32 +
33 +
34 with io.open(os.path.join(current_dir, "README.md"), encoding="utf-8") as fd:
35 desc = fd.read()
36
37 env_dir = tempfile.mkdtemp(prefix="dirsearch-install-")
38 shutil.copytree(os.path.abspath(os.getcwd()), os.path.join(env_dir, "dirsearch"))