File: remove-pydevd-from-setup.patch

package info (click to toggle)
debugpy 1.6.6%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,264 kB
  • sloc: python: 13,833; sh: 244; makefile: 25
file content (69 lines) | stat: -rw-r--r-- 2,269 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
Description: Do not attempt to build vendored pydevd package
 setup.py attempts to build the Cython extensions included in pydevd; since
 we will symlink to the existing pydevd instead, we remove all references to
 pydevd from setup.py.
Forwarded: not-needed
Author: Julian Gilbey <jdg@debian.org>
Last-Update: 2022-08-03

--- a/setup.py
+++ b/setup.py
@@ -23,7 +23,6 @@
 del sys.path[0]
 
 
-PYDEVD_ROOT = debugpy._vendored.project_root("pydevd")
 DEBUGBY_ROOT = os.path.dirname(os.path.abspath(debugpy.__file__))
 
 
@@ -33,22 +32,6 @@
     return None
 
 
-# bdist_wheel determines whether the package is pure or not based on ext_modules.
-# However, all pydevd native modules are prebuilt and packaged as data, so they
-# should not be in the list.
-#
-# The proper way to handle this is by overriding has_ext_modules. However, due to
-# https://bugs.python.org/issue32957, in setuptools 57.0.0 and below, it is not
-# always called when it should be, with ext_modules tested directly instead.
-#
-# So, for non-pure builds, we provide a customized empty list for ext_modules that
-# tests as truthful - this causes the package to be treated as non-pure on all
-# relevant setuptools versions.
-class ExtModules(list):
-    def __bool__(self):
-        return True
-
-
 def override_build(cmds):
     def finalize_options(self):
         # Mark all packages as pure if requested to build a universal wheel.
@@ -146,8 +129,9 @@
         extras["platforms"] = platforms
 
     cmds = versioneer.get_cmdclass()
-    override_build(cmds)
-    override_build_py(cmds)
+    # On Debian, we do not attempt to build pydevd
+    # override_build(cmds)
+    # override_build_py(cmds)
 
     setuptools.setup(
         name="debugpy",
@@ -185,15 +169,6 @@
             "debugpy.server",
             "debugpy._vendored",
         ],
-        package_data={
-            "debugpy": ["ThirdPartyNotices.txt"],
-            "debugpy._vendored": [
-                # pydevd extensions must be built before this list can be computed properly,
-                # so it is populated in the overridden build_py.finalize_options().
-            ],  
-        },
-        ext_modules=ExtModules(),
-        has_ext_modules=lambda: True,
         cmdclass=cmds,
         **extras
     )