forked from pool/python-debugpy
Accepting request 941830 from home:bnavigator:branches:devel:languages:python
- Update to 1.5.1 * no release notes other than a bunch of github PR and issue numbers: https://github.com/microsoft/debugpy/releases * Python 3.10 is now fully supported - Drop pydevd-openSUSE-attach-autoarch.patch, upstream changed architecture support logic - Drop correct-pthread-library-name.patch merged upstream - Remove performance tweak not compatible with older gdb * gh#microsoft/debugpy#762 OBS-URL: https://build.opensuse.org/request/show/941830 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-debugpy?expand=0&rev=4
This commit is contained in:
parent
82cb29b3ea
commit
1f12bf9c89
@ -1,13 +0,0 @@
|
|||||||
Index: debugpy-1.3.0/tests/debugpy/test_threads.py
|
|
||||||
===================================================================
|
|
||||||
--- debugpy-1.3.0.orig/tests/debugpy/test_threads.py
|
|
||||||
+++ debugpy-1.3.0/tests/debugpy/test_threads.py
|
|
||||||
@@ -170,7 +170,7 @@ def test_debug_this_thread(pyfile, targe
|
|
||||||
from ctypes import CDLL, CFUNCTYPE, byref, c_void_p, c_ulong
|
|
||||||
from ctypes.util import find_library
|
|
||||||
|
|
||||||
- libpthread = CDLL(find_library("libpthread"))
|
|
||||||
+ libpthread = CDLL(find_library("pthread"))
|
|
||||||
thread_func_p = CFUNCTYPE(c_void_p, c_void_p)
|
|
||||||
thread_func = thread_func_p(
|
|
||||||
foo
|
|
@ -1,3 +0,0 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
|
||||||
oid sha256:89d747a1c3cc59e9cdab88331859c5a970dcc7e1b2ae3c661df942694885897e
|
|
||||||
size 6676550
|
|
3
debugpy-1.5.1.tar.gz
Normal file
3
debugpy-1.5.1.tar.gz
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:86c8a957269a49fe5955f47233609b896ac48033e4f5e94c5b5a908f7230cf19
|
||||||
|
size 6675322
|
@ -1,45 +0,0 @@
|
|||||||
Index: debugpy-1.3.0/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/add_code_to_python_process.py
|
|
||||||
===================================================================
|
|
||||||
--- debugpy-1.3.0.orig/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/add_code_to_python_process.py
|
|
||||||
+++ debugpy-1.3.0/src/debugpy/_vendored/pydevd/pydevd_attach_to_process/add_code_to_python_process.py
|
|
||||||
@@ -271,27 +271,15 @@ def run_python_code_linux(pid, python_co
|
|
||||||
assert '\'' not in python_code, 'Having a single quote messes with our command.'
|
|
||||||
filedir = os.path.dirname(__file__)
|
|
||||||
|
|
||||||
- # Valid arguments for arch are i386, i386:x86-64, i386:x64-32, i8086,
|
|
||||||
- # i386:intel, i386:x86-64:intel, i386:x64-32:intel, i386:nacl,
|
|
||||||
- # i386:x86-64:nacl, i386:x64-32:nacl, auto.
|
|
||||||
-
|
|
||||||
- if is_python_64bit():
|
|
||||||
- suffix = 'amd64'
|
|
||||||
- arch = 'i386:x86-64'
|
|
||||||
- else:
|
|
||||||
- suffix = 'x86'
|
|
||||||
- arch = 'i386'
|
|
||||||
-
|
|
||||||
- print('Attaching with arch: %s' % (arch,))
|
|
||||||
-
|
|
||||||
- target_dll = os.path.join(filedir, 'attach_linux_%s.so' % suffix)
|
|
||||||
+ # must be compiled on the same architecture
|
|
||||||
+ target_dll = os.path.join(filedir, 'attach_SUSE.so')
|
|
||||||
target_dll = os.path.abspath(os.path.normpath(target_dll))
|
|
||||||
+ print('Attaching with lib: %s' % target_dll)
|
|
||||||
if not os.path.exists(target_dll):
|
|
||||||
- raise RuntimeError('Could not find dll file to inject: %s' % target_dll)
|
|
||||||
+ raise RuntimeError('Could not find library to inject: %s' % target_dll)
|
|
||||||
|
|
||||||
# Note: we currently don't support debug builds
|
|
||||||
is_debug = 0
|
|
||||||
- # Note that the space in the beginning of each line in the multi-line is important!
|
|
||||||
cmd = [
|
|
||||||
'gdb',
|
|
||||||
'--nw', # no gui interface
|
|
||||||
@@ -306,7 +294,7 @@ def run_python_code_linux(pid, python_co
|
|
||||||
|
|
||||||
cmd.extend(["--eval-command='set scheduler-locking off'"]) # If on we'll deadlock.
|
|
||||||
|
|
||||||
- cmd.extend(["--eval-command='set architecture %s'" % arch])
|
|
||||||
+ cmd.extend(["--eval-command='set architecture auto'"])
|
|
||||||
|
|
||||||
cmd.extend([
|
|
||||||
"--eval-command='call (void*)dlopen(\"%s\", 2)'" % target_dll,
|
|
@ -1,3 +1,16 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Dec 20 23:00:44 UTC 2021 - Ben Greiner <code@bnavigator.de>
|
||||||
|
|
||||||
|
- Update to 1.5.1
|
||||||
|
* no release notes other than a bunch of github PR and issue
|
||||||
|
numbers: https://github.com/microsoft/debugpy/releases
|
||||||
|
* Python 3.10 is now fully supported
|
||||||
|
- Drop pydevd-openSUSE-attach-autoarch.patch, upstream changed
|
||||||
|
architecture support logic
|
||||||
|
- Drop correct-pthread-library-name.patch merged upstream
|
||||||
|
- Remove performance tweak not compatible with older gdb
|
||||||
|
* gh#microsoft/debugpy#762
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Sep 2 09:01:19 UTC 2021 - Steve Kowalik <steven.kowalik@suse.com>
|
Thu Sep 2 09:01:19 UTC 2021 - Steve Kowalik <steven.kowalik@suse.com>
|
||||||
|
|
||||||
|
@ -25,22 +25,19 @@
|
|||||||
%define psuffix %{nil}
|
%define psuffix %{nil}
|
||||||
%bcond_with test
|
%bcond_with test
|
||||||
%endif
|
%endif
|
||||||
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
%{?!python_module:%define python_module() python3-%{**}}
|
||||||
# Python 3.6 is officially supported, but debugpy is in openSUSE for ipykernel 6 which is for Python >= 3.7.
|
# Python 2 and 3.6 are officially supported, but debugpy is in openSUSE for ipykernel 6 which is for Python >= 3.7.
|
||||||
# Skip Py36 in order to save resources.
|
# Skip Py2 in Leap and Py36 in TW in order to save resources.
|
||||||
|
%define skip_python2 1
|
||||||
%define skip_python36 1
|
%define skip_python36 1
|
||||||
%define modname debugpy
|
%define modname debugpy
|
||||||
Name: python-%{modname}%{psuffix}
|
Name: python-%{modname}%{psuffix}
|
||||||
Version: 1.3.0
|
Version: 1.5.1
|
||||||
Release: 0
|
Release: 0
|
||||||
Summary: An implementation of the Debug Adapter Protocol for Python
|
Summary: An implementation of the Debug Adapter Protocol for Python
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/microsoft/debugpy/
|
URL: https://github.com/microsoft/debugpy/
|
||||||
Source: https://github.com/microsoft/%{modname}/archive/v%{version}.tar.gz#/%{modname}-%{version}.tar.gz
|
Source: https://github.com/microsoft/%{modname}/archive/v%{version}.tar.gz#/%{modname}-%{version}.tar.gz
|
||||||
# PATCH-FIX-OPENSUSE pydevd-openSUSE-attach-autoarch.patch -- support more than intel: use rpmbuild compiled attach library and let gdb figure out the architecture automatically. code@bnavigator.de
|
|
||||||
Patch0: pydevd-openSUSE-attach-autoarch.patch
|
|
||||||
# PATCH-FIX-UPSTREAM gh#microsoft/debugpy#716
|
|
||||||
Patch1: correct-pthread-library-name.patch
|
|
||||||
BuildRequires: %{python_module Cython}
|
BuildRequires: %{python_module Cython}
|
||||||
BuildRequires: %{python_module devel}
|
BuildRequires: %{python_module devel}
|
||||||
BuildRequires: %{python_module setuptools}
|
BuildRequires: %{python_module setuptools}
|
||||||
@ -67,17 +64,17 @@ debugpy is an implementation of the Debug Adapter Protocol for Python.
|
|||||||
%prep
|
%prep
|
||||||
%autosetup -p1 -n %{modname}-%{version}
|
%autosetup -p1 -n %{modname}-%{version}
|
||||||
|
|
||||||
# don't remove vendored pydevd until it is packaged as a separate package (which is not upstream's intention)
|
# don't remove vendored pydevd: upstream's intention is to always bundle it. Development happens in debugpy anyway
|
||||||
# rm -rv src/debugpy/_vendored
|
|
||||||
|
|
||||||
# remove precompiled libs
|
# remove precompiled libs
|
||||||
rm src/debugpy/_vendored/pydevd/pydevd_attach_to_process/*.{so,dll,dylib,exe,pdb}
|
rm src/debugpy/_vendored/pydevd/pydevd_attach_to_process/*.{so,dll,dylib,exe,pdb}
|
||||||
# remove script interpreter lines
|
# remove script interpreter lines
|
||||||
sed -i '1 {/^#!/ d}' \
|
sed -i '1 {/^#!/ d}' \
|
||||||
src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/*/*.py \
|
src/debugpy/_vendored/pydevd/pydevd_attach_to_process/winappdbg/*/*.py
|
||||||
src/debugpy/_vendored/pydevd/_pydevd_frame_eval/vendored/bytecode/tests/sanitytest.py
|
|
||||||
# remove gitignore file
|
# remove gitignore file
|
||||||
find src/debugpy/_vendored/pydevd/ -name .gitignore -delete
|
find src/debugpy/_vendored/pydevd/ -name .gitignore -delete
|
||||||
|
# remove a performance tweak not compatible with older gdb: https://github.com/microsoft/debugpy/issues/762
|
||||||
|
sed -i '/set auto-solib-add off/d' src/debugpy/_vendored/pydevd/pydevd_attach_to_process/add_code_to_python_process.py
|
||||||
|
|
||||||
%build
|
%build
|
||||||
%if ! %{with test}
|
%if ! %{with test}
|
||||||
@ -88,7 +85,16 @@ cp -r src/debugpy/_vendored src/debugpy/_vendored_clean
|
|||||||
rm -r src/debugpy/_vendored
|
rm -r src/debugpy/_vendored
|
||||||
cp -r src/debugpy/_vendored_clean src/debugpy/_vendored
|
cp -r src/debugpy/_vendored_clean src/debugpy/_vendored
|
||||||
pushd src/debugpy/_vendored/pydevd/pydevd_attach_to_process/linux_and_mac/
|
pushd src/debugpy/_vendored/pydevd/pydevd_attach_to_process/linux_and_mac/
|
||||||
g++ %{optflags} -shared -o ../attach_SUSE.so -fPIC -nostartfiles attach.cpp
|
# see /src/debugpy/_vendored/pydevd/pydevd_attach_to_process/add_code_to_python_process.py::get_target_filename
|
||||||
|
pyarch=$(python3 -c 'import platform; print(platform.machine())')
|
||||||
|
g++ %{optflags} -shared -o ../attach_${pyarch}.so -fPIC -nostartfiles attach.cpp
|
||||||
|
# if on intel architectures, use the default upstream names
|
||||||
|
%ifarch x86_64
|
||||||
|
mv ../attach_${pyarch}.so ../attach_linux_amd64.so
|
||||||
|
%endif
|
||||||
|
%ifarch %ix86
|
||||||
|
mv ../attach_${pyarch}.so ../attach_linux_x86.so
|
||||||
|
%endif
|
||||||
popd
|
popd
|
||||||
%{$python_build}
|
%{$python_build}
|
||||||
}
|
}
|
||||||
@ -98,8 +104,8 @@ popd
|
|||||||
%if !%{with test}
|
%if !%{with test}
|
||||||
# Dont compile pydevd again
|
# Dont compile pydevd again
|
||||||
export SKIP_CYTHON_BUILD=1
|
export SKIP_CYTHON_BUILD=1
|
||||||
%{python_expand # override install-lib: the vendored pydevd is not pure
|
%python_install
|
||||||
%{$python_install} --install-lib %{$python_sitearch}
|
%{python_expand # remove source files
|
||||||
rm -r %{buildroot}%{$python_sitearch}/debugpy/_vendored/pydevd/pydevd_attach_to_process/{common,linux_and_mac,windows}/
|
rm -r %{buildroot}%{$python_sitearch}/debugpy/_vendored/pydevd/pydevd_attach_to_process/{common,linux_and_mac,windows}/
|
||||||
rm %{buildroot}%{$python_sitearch}/debugpy/_vendored/pydevd/_*/*.{c,h,pxd,pyx}
|
rm %{buildroot}%{$python_sitearch}/debugpy/_vendored/pydevd/_*/*.{c,h,pxd,pyx}
|
||||||
%fdupes %{buildroot}%{$python_sitearch}
|
%fdupes %{buildroot}%{$python_sitearch}
|
||||||
@ -108,11 +114,10 @@ rm %{buildroot}%{$python_sitearch}/debugpy/_vendored/pydevd/_*/*.{c,h,pxd,pyx}
|
|||||||
|
|
||||||
%if %{with test}
|
%if %{with test}
|
||||||
%check
|
%check
|
||||||
|
export DEBUGPY_TEST=1
|
||||||
# extra flags are not added
|
# extra flags are not added
|
||||||
donttest="test_custom_python_args"
|
donttest="test_custom_python_args"
|
||||||
# breakpoints and killing fail
|
%pytest_arch -k "not ($donttest)"
|
||||||
donttest+=" or (test_flask and (breakpoint or exception))"
|
|
||||||
%pytest_arch -x -rfEs -k "not ($donttest)"
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%if ! %{with test}
|
%if ! %{with test}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user