diff --git a/plugins/org.python.pydev.core/pysrc/.github/workflows/pydevd-release-manylinux.yml b/plugins/org.python.pydev.core/pysrc/.github/workflows/pydevd-release-manylinux.yml new file mode 100644 index 0000000000..da5843c17b --- /dev/null +++ b/plugins/org.python.pydev.core/pysrc/.github/workflows/pydevd-release-manylinux.yml @@ -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 }} \ No newline at end of file diff --git a/plugins/org.python.pydev.core/pysrc/.github/workflows/pydevd-release.yml b/plugins/org.python.pydev.core/pysrc/.github/workflows/pydevd-release.yml index d538e7ceaa..d645596efb 100644 --- a/plugins/org.python.pydev.core/pysrc/.github/workflows/pydevd-release.yml +++ b/plugins/org.python.pydev.core/pysrc/.github/workflows/pydevd-release.yml @@ -1,4 +1,4 @@ -name: PyDev.Debugger Release +name: PyDev.Debugger [Windows, MacOS] Release on: push: @@ -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 diff --git a/plugins/org.python.pydev.core/pysrc/.github/workflows/pydevd-tests-python.yml b/plugins/org.python.pydev.core/pysrc/.github/workflows/pydevd-tests-python.yml index a6326518b3..56352e97c0 100644 --- a/plugins/org.python.pydev.core/pysrc/.github/workflows/pydevd-tests-python.yml +++ b/plugins/org.python.pydev.core/pysrc/.github/workflows/pydevd-tests-python.yml @@ -1,4 +1,4 @@ -name: PyDev.Debugger Tests +name: PyDev.Debugger TESTS on: - push diff --git a/plugins/org.python.pydev.core/pysrc/build_tools/build.py b/plugins/org.python.pydev.core/pysrc/build_tools/build.py index 5c5be47d66..d9f83feee8 100644 --- a/plugins/org.python.pydev.core/pysrc/build_tools/build.py +++ b/plugins/org.python.pydev.core/pysrc/build_tools/build.py @@ -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 diff --git a/plugins/org.python.pydev.core/pysrc/build_tools/check_no_git_modifications.py b/plugins/org.python.pydev.core/pysrc/build_tools/check_no_git_modifications.py index 8f942ce7d5..b8bd59ca78 100644 --- a/plugins/org.python.pydev.core/pysrc/build_tools/check_no_git_modifications.py +++ b/plugins/org.python.pydev.core/pysrc/build_tools/check_no_git_modifications.py @@ -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()) @@ -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. diff --git a/plugins/org.python.pydev.core/pysrc/pyproject.toml b/plugins/org.python.pydev.core/pysrc/pyproject.toml new file mode 100644 index 0000000000..870f7d9f2f --- /dev/null +++ b/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 +"""