Skip to content

Commit

Permalink
pydevd updates
Browse files Browse the repository at this point in the history
  • Loading branch information
fabioz committed Oct 8, 2023
1 parent de858f4 commit 90ad958
Show file tree
Hide file tree
Showing 6 changed files with 84 additions and 20 deletions.
@@ -0,0 +1,48 @@
# Nice reference: https://github.com/tornadoweb/tornado/blob/master/.github/workflows/build.yml
# Docs: https://cibuildwheel.readthedocs.io/en/stable/options/
# Configurations are here and in pyproject.toml.
name: PyDev.Debugger [MANYLINUX] Release

on:
push:
branches:
- "release-pydev-debugger-test"
tags:
- "pydev_debugger_*"

jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04]
steps:
- uses: actions/checkout@v4

# Used to host cibuildwheel
- uses: actions/setup-python@v3

- name: Install cibuildwheel
run: python -m pip install cibuildwheel==2.16.2

- name: Remove .so files (will be rebuilt)
run: rm pydevd_attach_to_process/*.so

- name: Build wheels
run: python -m cibuildwheel --output-dir wheelhouse
env:
CIBW_SKIP: pp*
CIBW_BUILD_VERBOSITY: 1

- uses: actions/upload-artifact@v3
with:
path: ./wheelhouse/*.whl

- name: Upload to PyPI .whl
run: |
pip install twine
twine upload wheelhouse/*.whl
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TWINE_KEY }}
@@ -1,4 +1,4 @@
name: PyDev.Debugger Release
name: PyDev.Debugger [Windows, MacOS] Release

on:
push:
Expand All @@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
os: [macos-latest, windows-latest]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v3
Expand Down
@@ -1,4 +1,4 @@
name: PyDev.Debugger Tests
name: PyDev.Debugger TESTS

on:
- push
Expand Down
2 changes: 2 additions & 0 deletions plugins/org.python.pydev.core/pysrc/build_tools/build.py
Expand Up @@ -13,6 +13,8 @@
import subprocess
import sys

sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))

from generate_code import remove_if_exists, root_dir, is_python_64bit, generate_dont_trace_files, generate_cython_module


Expand Down
Expand Up @@ -7,12 +7,24 @@
- "_pydevd_bundle\\\\pydevd_cython.pxd",
+ "_pydevd_bundle/pydevd_cython.pyx",
+ "_pydevd_bundle/pydevd_cython.pxd",
--- a/_pydevd_frame_eval/pydevd_frame_evaluator.c
+++ b/_pydevd_frame_eval/pydevd_frame_evaluator.c
- "_pydevd_frame_eval\\\\pydevd_frame_evaluator.pyx",
+ "_pydevd_frame_eval/pydevd_frame_evaluator.pyx",
- "_pydevd_bundle\\\\pydevd_cython.pxd",
+ "_pydevd_bundle/pydevd_cython.pxd",
- "_pydevd_bundle/pydevd_cython.pyx",
- "_pydevd_bundle/pydevd_cython.pxd",
+ "_pydevd_bundle\\\\pydevd_cython.pyx",
+ "_pydevd_bundle\\\\pydevd_cython.pxd",
- "_pydevd_frame_eval/pydevd_frame_evaluator.pyx",
+ "_pydevd_frame_eval\\\\pydevd_frame_evaluator.pyx",
- "_pydevd_bundle/pydevd_cython.pxd",
+ "_pydevd_bundle\\\\pydevd_cython.pxd",
'''.splitlines() if line.strip())


Expand All @@ -33,24 +45,15 @@ def main():
files.discard('.travis_install_python_deps.sh')
files.discard('miniconda.sh')
files.discard('build_tools/check_no_git_modifications.py')
pydevd_cython = None
pydevd_frame_evaluator = None
found_unexpected = True
if len(files) == 2:
for f in files:
if f.endswith('pydevd_cython.c'):
pydevd_cython = f

elif f.endswith('pydevd_frame_evaluator.c'):
pydevd_frame_evaluator = f

if pydevd_cython and pydevd_frame_evaluator:
found_unexpected = False
output = subprocess.check_output('git diff'.split())
for line in output.decode('utf-8').splitlines():
if line.startswith('+') or line.startswith('-'):
if line.strip() not in expected_differences:
found_unexpected = True
if files:
found_unexpected = False
output = subprocess.check_output('git diff'.split())
for line in output.decode('utf-8').splitlines():
if line.startswith('+') or line.startswith('-'):
if line.strip() not in expected_differences:
print('Found unexpected: %r' % (line,))
found_unexpected = True

if files and found_unexpected:
# If there are modifications, show a diff of the modifications and fail the script.
Expand Down
11 changes: 11 additions & 0 deletions plugins/org.python.pydev.core/pysrc/pyproject.toml
@@ -0,0 +1,11 @@
# See: https://cibuildwheel.readthedocs.io/en/stable/options/

[tool.cibuildwheel]
# Customize what to build
# build="cp36-manylinux_x86_64"

before-build = """
pydevd_attach_to_process/linux_and_mac/compile_linux.sh
pip install cython
python build_tools/build.py
"""

0 comments on commit 90ad958

Please sign in to comment.