summary refs log tree commit diff
path: root/pkgs/development/python-modules/debugpy
diff options
context:
space:
mode:
authorKira Bruneau <kira.bruneau@gmail.com>2020-11-17 20:50:06 -0500
committerJonathan Ringer <jonringer@users.noreply.github.com>2020-11-20 09:28:22 -0800
commit87e9b49fc785a6ff20080a1c80b35dfb95c8c222 (patch)
tree425310c87a9e8999c51c701e57e6d5c427e0aca5 /pkgs/development/python-modules/debugpy
parent7042bc3fe9c68834ad3460c88814777e31e4694c (diff)
downloadnixpkgs-87e9b49fc785a6ff20080a1c80b35dfb95c8c222.tar
nixpkgs-87e9b49fc785a6ff20080a1c80b35dfb95c8c222.tar.gz
nixpkgs-87e9b49fc785a6ff20080a1c80b35dfb95c8c222.tar.bz2
nixpkgs-87e9b49fc785a6ff20080a1c80b35dfb95c8c222.tar.lz
nixpkgs-87e9b49fc785a6ff20080a1c80b35dfb95c8c222.tar.xz
nixpkgs-87e9b49fc785a6ff20080a1c80b35dfb95c8c222.tar.zst
nixpkgs-87e9b49fc785a6ff20080a1c80b35dfb95c8c222.zip
pythonPackages.debugpy: 1.1.0 -> 1.2.0
Diffstat (limited to 'pkgs/development/python-modules/debugpy')
-rw-r--r--pkgs/development/python-modules/debugpy/default.nix16
-rw-r--r--pkgs/development/python-modules/debugpy/hardcode-version.patch51
2 files changed, 58 insertions, 9 deletions
diff --git a/pkgs/development/python-modules/debugpy/default.nix b/pkgs/development/python-modules/debugpy/default.nix
index 5f10b7897e9..75a11d8cf26 100644
--- a/pkgs/development/python-modules/debugpy/default.nix
+++ b/pkgs/development/python-modules/debugpy/default.nix
@@ -18,13 +18,13 @@
 
 buildPythonPackage rec {
   pname = "debugpy";
-  version = "1.1.0";
+  version = "1.2.0";
 
   src = fetchFromGitHub {
     owner = "Microsoft";
     repo = pname;
     rev = "v${version}";
-    sha256 = "1f6a62hg82fn9ddrl6g11x2h27zng8jmrlfbnnra6q590i5v1ixr";
+    sha256 = "1r5w5ngipj5fgjylrmlw3jrh5y2n67n68l91sj9329549x4ww8dh";
   };
 
   patches = [
@@ -34,6 +34,11 @@ buildPythonPackage rec {
       inherit gdb;
     })
 
+    (substituteAll {
+      src = ./hardcode-version.patch;
+      inherit version;
+    })
+
     # Fix importing debugpy in:
     # - test_nodebug[module-launch(externalTerminal)]
     # - test_nodebug[module-launch(integratedTerminal)]
@@ -45,13 +50,6 @@ buildPythonPackage rec {
     ./fix-test-pythonpath.patch
   ];
 
-  postPatch = ''
-    # Use nixpkgs version instead of versioneer
-    substituteInPlace setup.py \
-      --replace "cmds = versioneer.get_cmdclass()" "cmds = {}" \
-      --replace "version=versioneer.get_version()" "version='${version}'"
-  '';
-
   # Remove pre-compiled "attach" libraries and recompile for host platform
   # Compile flags taken from linux_and_mac/compile_linux.sh & linux_and_mac/compile_mac.sh
   preBuild = ''(
diff --git a/pkgs/development/python-modules/debugpy/hardcode-version.patch b/pkgs/development/python-modules/debugpy/hardcode-version.patch
new file mode 100644
index 00000000000..2879716f704
--- /dev/null
+++ b/pkgs/development/python-modules/debugpy/hardcode-version.patch
@@ -0,0 +1,51 @@
+diff --git a/setup.py b/setup.py
+index cfec60d..32ca206 100644
+--- a/setup.py
++++ b/setup.py
+@@ -24,7 +24,6 @@ elif "--abi" in sys.argv:
+ from setuptools import setup  # noqa
+ 
+ sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
+-import versioneer  # noqa
+ 
+ del sys.path[0]
+ 
+@@ -86,7 +85,7 @@ if __name__ == "__main__":
+     if not os.getenv("SKIP_CYTHON_BUILD"):
+         cython_build()
+ 
+-    cmds = versioneer.get_cmdclass()
++    cmds = {}
+     cmds["bdist_wheel"] = bdist_wheel
+ 
+     extras = {}
+@@ -96,7 +95,7 @@ if __name__ == "__main__":
+ 
+     setup(
+         name="debugpy",
+-        version=versioneer.get_version(),
++        version="@version@",
+         description="An implementation of the Debug Adapter Protocol for Python",  # noqa
+         long_description=long_description,
+         long_description_content_type="text/markdown",
+diff --git a/src/debugpy/__init__.py b/src/debugpy/__init__.py
+index baa5a7c..5355327 100644
+--- a/src/debugpy/__init__.py
++++ b/src/debugpy/__init__.py
+@@ -27,7 +27,6 @@ __all__ = [
+ import codecs
+ import os
+ 
+-from debugpy import _version
+ from debugpy.common import compat
+ 
+ 
+@@ -204,7 +203,7 @@ def trace_this_thread(should_trace):
+     return api.trace_this_thread(should_trace)
+ 
+ 
+-__version__ = _version.get_versions()["version"]
++__version__ = "@version@"
+ 
+ # Force absolute path on Python 2.
+ __file__ = os.path.abspath(__file__)