You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by jd...@apache.org on 2023/04/14 20:54:39 UTC

[qpid-cpp] branch main updated (4faa95514 -> 4b1afd99f)

This is an automated email from the ASF dual-hosted git repository.

jdanek pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-cpp.git


    from 4faa95514 QPID-8610: add .github/workflows/codeql.yml GitHub Actions workflow (#37)
     new 9f711b886 QPID-8635: remove the useless L suffix for Python longs, for compatibility
     new dd442da25 QPID-8635: Python 3 uses __pycache__ subdirectory for compiled bytecode
     new 4b1afd99f QPID-8635: test with Python 3.8, use qpid-python main

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/workflows/build.yml           | 43 +++++++++++++++++++++++++++--------
 .github/workflows/codeql.yml          |  5 +---
 bindings/qpid/python/CMakeLists.txt   | 15 ++++++++++--
 bindings/qpid/python/qpid_messaging.i |  2 +-
 4 files changed, 48 insertions(+), 17 deletions(-)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[qpid-cpp] 01/03: QPID-8635: remove the useless L suffix for Python longs, for compatibility

Posted by jd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jdanek pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-cpp.git

commit 9f711b8863b8c16d1df2de7116adc1f388c970d4
Author: Jiri Daněk <jd...@redhat.com>
AuthorDate: Thu Apr 13 21:21:44 2023 +0200

    QPID-8635: remove the useless L suffix for Python longs, for compatibility
---
 bindings/qpid/python/qpid_messaging.i | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bindings/qpid/python/qpid_messaging.i b/bindings/qpid/python/qpid_messaging.i
index aee993023..68b63a316 100644
--- a/bindings/qpid/python/qpid_messaging.i
+++ b/bindings/qpid/python/qpid_messaging.i
@@ -276,7 +276,7 @@ QPID_EXCEPTION(UnauthorizedAccess, SessionError)
     AMQP_PORT = 5672
     AMQPS_PORT = 5671
 
-    UNLIMITED = Constant("UNLIMITED", 0xFFFFFFFFL)
+    UNLIMITED = Constant("UNLIMITED", 0xFFFFFFFF)
 
     REJECTED = Constant("REJECTED")
     RELEASED = Constant("RELEASED")


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[qpid-cpp] 02/03: QPID-8635: Python 3 uses __pycache__ subdirectory for compiled bytecode

Posted by jd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jdanek pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-cpp.git

commit dd442da25a7d175467d7f0348d88ce6a6df1ceff
Author: Jiri Daněk <jd...@redhat.com>
AuthorDate: Fri Apr 14 13:41:24 2023 +0200

    QPID-8635: Python 3 uses __pycache__ subdirectory for compiled bytecode
---
 bindings/qpid/python/CMakeLists.txt | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/bindings/qpid/python/CMakeLists.txt b/bindings/qpid/python/CMakeLists.txt
index fc251ba01..977aee9a4 100644
--- a/bindings/qpid/python/CMakeLists.txt
+++ b/bindings/qpid/python/CMakeLists.txt
@@ -48,11 +48,22 @@ install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} -m py_compile qpid_me
 install(CODE "execute_process(COMMAND ${PYTHON_EXECUTABLE} -O -m py_compile qpid_messaging.py
                               WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})")
 install(FILES ${CMAKE_CURRENT_BINARY_DIR}/qpid_messaging.py
-              ${CMAKE_CURRENT_BINARY_DIR}/qpid_messaging.pyc
-              ${CMAKE_CURRENT_BINARY_DIR}/qpid_messaging.pyo
         DESTINATION ${PYTHON_SITEARCH_PACKAGES}
         COMPONENT ${QPID_COMPONENT_CLIENT}
         )
+if (Python_VERSION_MAJOR STREQUAL "2")
+    install(FILES
+                ${CMAKE_CURRENT_BINARY_DIR}/qpid_messaging.pyc
+                ${CMAKE_CURRENT_BINARY_DIR}/qpid_messaging.pyo
+            DESTINATION ${PYTHON_SITEARCH_PACKAGES}
+            COMPONENT ${QPID_COMPONENT_CLIENT}
+            )
+elseif ()
+    install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/__pycache__
+            DESTINATION ${PYTHON_SITEARCH_PACKAGES}
+            COMPONENT ${QPID_COMPONENT_CLIENT}
+            )
+endif ()
 install(TARGETS ${SWIG_MODULE_qpid_messaging_REAL_NAME}
         DESTINATION ${PYTHON_SITEARCH_PACKAGES}
         COMPONENT ${QPID_COMPONENT_CLIENT}


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[qpid-cpp] 03/03: QPID-8635: test with Python 3.8, use qpid-python main

Posted by jd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jdanek pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-cpp.git

commit 4b1afd99fdec64847a2d516a6b4f3ec5468e0fe4
Author: Jiri Daněk <jd...@redhat.com>
AuthorDate: Fri Apr 14 13:40:51 2023 +0200

    QPID-8635: test with Python 3.8, use qpid-python main
---
 .github/workflows/build.yml  | 43 +++++++++++++++++++++++++++++++++----------
 .github/workflows/codeql.yml |  5 +----
 2 files changed, 34 insertions(+), 14 deletions(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 2db19c4ec..5b3c11a39 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -9,6 +9,8 @@ jobs:
       fail-fast: false
       matrix:
         os: [ ubuntu-20.04, windows-latest ]
+        # https://raw.githubusercontent.com/actions/python-versions/main/versions-manifest.json
+        python-version: [ "2.7", "3.8" ]
         buildType: [ RelWithDebInfo ]
         include:
           - os: ubuntu-20.04
@@ -30,9 +32,10 @@ jobs:
       - uses: actions/checkout@v3
 
       - name: Setup python
+        id: python
         uses: actions/setup-python@v4
         with:
-          python-version: 2.7
+          python-version: ${{ matrix.python-version }}
           architecture: x64
 
       # Cannot use https://github.com/ilammy/msvc-dev-cmd/blob/a742a854f54111d83b78e97091b5d85ccdaa3e89/index.js#L163
@@ -56,12 +59,6 @@ jobs:
           }
         shell: pwsh
 
-      # it's weird that it needs qpid-python for tests; one would guess this is built in this repo, but it is not
-      - name: Install python dependencies
-        run: |
-          python -m pip install --upgrade pip
-          python -m pip install setuptools qpid-python
-
       - name: Install Linux dependencies
         if: runner.os == 'Linux'
         run: |
@@ -80,9 +77,9 @@ jobs:
             libibverbs-dev librdmacm-dev \
             libdb++-dev libaio-dev \
             libqpid-proton11-dev libqpid-proton-core10 libqpid-proton-proactor1 \
-            swig3.0 python-dev ruby2.6 ruby2.6-dev \
+            swig3.0 ruby2.6 ruby2.6-dev \
             uuid-dev libnss3-dev libnss3-tools libsasl2-dev sasl2-bin \
-            valgrind 
+            valgrind
 
           sccache_version=v0.4.1
           wget -q https://github.com/mozilla/sccache/releases/download/${sccache_version}/sccache-${sccache_version}-x86_64-unknown-linux-musl.tar.gz
@@ -91,6 +88,31 @@ jobs:
           sudo chmod +x /usr/bin/sccache
         shell: bash
 
+      - name: Install python dependencies
+        run: |
+          ${{ steps.python.outputs.python-path }} -m pip install --upgrade pip
+          ${{ steps.python.outputs.python-path }} -m pip install setuptools
+
+      - name: Fetch qpid-python from git
+        if: matrix.python-version != '2.7'
+        uses: actions/checkout@v3
+        with:
+          repository: apache/qpid-python
+          ref: main
+          path: qpid-python
+
+      # We require qpid-python, which is a python2-only library, to run broker tests
+      - name: Install qpid-python (released version)
+        if: matrix.python-version == '2.7'
+        run: |
+          ${{ steps.python.outputs.python-path }} -m pip install qpid-python
+
+      - name: Install qpid-python (git version)
+        if: matrix.python-version != '2.7'
+        run: |
+          cd qpid-python
+          ${{ steps.python.outputs.python-path }} setup.py install
+
       - name: Cache scoop (restore) (on Windows)
         uses: actions/cache/restore@v3
         id: restore-scoop-cache
@@ -183,6 +205,7 @@ jobs:
             -DCMAKE_C_COMPILER_LAUNCHER="sccache" -DCMAKE_CXX_COMPILER_LAUNCHER="sccache" `
             "-DCMAKE_BUILD_TYPE=${{env.BuildType}}" `
             "-DCMAKE_INSTALL_PREFIX=${{env.InstallPrefix}}" `
+            "-DPYTHON_EXECUTABLE=${{ steps.python.outputs.python-path }}" `
             ${{matrix.cmake_extra}}
         shell: pwsh
 
@@ -203,7 +226,7 @@ jobs:
       - id: ctest
         name: ctest
         working-directory: ${{env.BuildDir}}
-        run: PYTHONPATH=${InstallPrefix}/lib/python2.7/site-packages ctest -C ${BuildType} -V -T Test --no-compress-output ${{matrix.ctest_extra}}
+        run: PYTHONPATH=${InstallPrefix}/lib/python${{ matrix.python-version }}/site-packages ctest -C ${BuildType} -V -T Test --no-compress-output ${{matrix.ctest_extra}}
         shell: bash
 
       - name: Upload Test results
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index 717b81560..31de0aadb 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -58,12 +58,9 @@ jobs:
           libxqilla-dev libxerces-c-dev \
           libibverbs-dev librdmacm-dev \
           libdb++-dev libaio-dev \
-          swig python2-dev ruby-dev \
+          swig python3-dev ruby-dev \
           uuid-dev libnss3-dev libnss3-tools libsasl2-dev sasl2-bin
 
-        curl -sSL https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
-        python2 get-pip.py
-
     # Autobuild attempts to build any compiled languages  (C/C++, C#, Go, or Java).
     # If this step fails, then you should remove it and run the build manually (see below)
     - name: Autobuild


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org