From 219de2f5e4995ab8dcf0d0357098f4a09d52c7d4 Mon Sep 17 00:00:00 2001 From: Amin Solhizadeh Date: Mon, 15 Apr 2024 17:43:03 +0200 Subject: [PATCH 01/19] Add windows wheels workflow --- .github/workflows/linuxbrew.yml | 36 ----------------- .github/workflows/macosx.yml | 49 ----------------------- .github/workflows/manylinux.yml | 48 ---------------------- .github/workflows/opensuse-tumbleweed.yml | 33 --------------- .github/workflows/sdist.yml | 25 ------------ .github/workflows/wheels.yml | 11 +++-- pyproject.toml | 4 ++ setup.py | 24 ++++++----- 8 files changed, 24 insertions(+), 206 deletions(-) delete mode 100644 .github/workflows/linuxbrew.yml delete mode 100644 .github/workflows/macosx.yml delete mode 100644 .github/workflows/manylinux.yml delete mode 100644 .github/workflows/opensuse-tumbleweed.yml delete mode 100644 .github/workflows/sdist.yml diff --git a/.github/workflows/linuxbrew.yml b/.github/workflows/linuxbrew.yml deleted file mode 100644 index 886bd8c9..00000000 --- a/.github/workflows/linuxbrew.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: linuxbrew -on: [push, pull_request] -jobs: - linuxbrew: - runs-on: ubuntu-latest - strategy: - matrix: - python: ["3.8", "3.9", "3.10", "3.11"] - steps: - - uses: actions/checkout@v3 - - name: Install brew - run: | - sudo apt install -y build-essential procps curl file git - /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - echo "/home/linuxbrew/.linuxbrew/bin" >> $GITHUB_PATH - - name: Install build dependencies - run: | - brew update - brew install python@${{ matrix.python }} gcc libxml2 libxmlsec1 pkg-config - echo "/home/linuxbrew/.linuxbrew/opt/python@${{ matrix.python }}/libexec/bin" >> $GITHUB_PATH - - name: Install python dependencies - run: | - pip3 install --upgrade setuptools wheel build - - name: Build linux_x86_64 wheel - run: | - export CFLAGS="-I$(brew --prefix)/include" - export LDFLAGS="-L$(brew --prefix)/lib" - python3 -m build - rm -rf build/ - - name: Install test dependencies - run: | - pip3 install --upgrade -r requirements-test.txt - pip3 install xmlsec --only-binary=xmlsec --no-index --find-links=dist/ - - name: Run tests - run: | - pytest -v --color=yes diff --git a/.github/workflows/macosx.yml b/.github/workflows/macosx.yml deleted file mode 100644 index 6d0548e8..00000000 --- a/.github/workflows/macosx.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: MacOS -on: [push, pull_request] -jobs: - macosx: - runs-on: macos-latest - strategy: - matrix: - python: [3.5, 3.6, 3.7, 3.8, 3.9, "3.10", "3.11"] - static_deps: ["static", ""] - steps: - - uses: actions/checkout@v3 - - name: Setup Python - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python }} - - name: Install build dependencies - run: | - pip install --upgrade pip setuptools wheel build - brew install libxml2 libxmlsec1 pkg-config - - name: Build macosx_x86_64 wheel - env: - CC: clang - CFLAGS: "-fprofile-instr-generate -fcoverage-mapping" - LDFLAGS: "-fprofile-instr-generate -fcoverage-mapping" - PYXMLSEC_STATIC_DEPS: ${{ matrix.static_deps }} - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - export PKG_CONFIG_PATH="$(brew --prefix)/opt/libxml2/lib/pkgconfig" - python -m build - rm -rf build/ - - name: Set environment variables - shell: bash - run: | - echo "PKGVER=$(python setup.py --version)" >> $GITHUB_ENV - echo "LLVM_PROFILE_FILE=pyxmlsec.profraw" >> $GITHUB_ENV - - name: Install test dependencies - run: | - pip install coverage --upgrade -r requirements-test.txt - pip install xmlsec --only-binary=xmlsec --no-index --find-links=dist/ - echo "PYXMLSEC_LIBFILE=$(python -c 'import xmlsec; print(xmlsec.__file__)')" >> $GITHUB_ENV - - name: Run tests - run: | - coverage run -m pytest -v --color=yes - - name: Report coverage to codecov - run: | - /Library/Developer/CommandLineTools/usr/bin/llvm-profdata merge -sparse ${{ env.LLVM_PROFILE_FILE }} -output pyxmlsec.profdata - /Library/Developer/CommandLineTools/usr/bin/llvm-cov show ${{ env.PYXMLSEC_LIBFILE }} --arch=$(uname -m) --instr-profile=pyxmlsec.profdata src > coverage.txt - bash <(curl -s https://codecov.io/bash) -f coverage.txt - if: matrix.static_deps != 'static' diff --git a/.github/workflows/manylinux.yml b/.github/workflows/manylinux.yml deleted file mode 100644 index a44776b3..00000000 --- a/.github/workflows/manylinux.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: manylinux -on: [push, pull_request] -jobs: - manylinux: - runs-on: ubuntu-latest - strategy: - matrix: - python-abi: [cp36-cp36m, cp37-cp37m, cp38-cp38, cp39-cp39, cp310-cp310, cp311-cp311] - image: - - manylinux2014_x86_64 - - manylinux_2_28_x86_64 - - musllinux_1_1_x86_64 - container: quay.io/pypa/${{ matrix.image }} - steps: - - uses: actions/checkout@v1 - - name: Install python build dependencies - run: | - # https://github.com/actions/runner/issues/2033 - chown -R $(id -u):$(id -g) $PWD - /opt/python/${{ matrix.python-abi }}/bin/pip install --upgrade pip setuptools wheel build - - name: Install system build dependencies (manylinux) - run: | - yum install -y perl-core - if: contains(matrix.image, 'manylinux') - - name: Set environment variables - shell: bash - run: | - echo "PKGVER=$(/opt/python/${{ matrix.python-abi }}/bin/python setup.py --version)" >> $GITHUB_ENV - - name: Build linux_x86_64 wheel - env: - PYXMLSEC_STATIC_DEPS: true - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - /opt/python/${{ matrix.python-abi }}/bin/python -m build - - name: Label manylinux wheel - run: | - ls -la dist/ - auditwheel show dist/xmlsec-${{ env.PKGVER }}-${{ matrix.python-abi }}-linux_x86_64.whl - auditwheel repair dist/xmlsec-${{ env.PKGVER }}-${{ matrix.python-abi }}-linux_x86_64.whl - ls -la wheelhouse/ - auditwheel show wheelhouse/xmlsec-${{ env.PKGVER }}-${{ matrix.python-abi }}-*${{ matrix.image }}*.whl - - name: Install test dependencies - run: | - /opt/python/${{ matrix.python-abi }}/bin/pip install --upgrade -r requirements-test.txt - /opt/python/${{ matrix.python-abi }}/bin/pip install xmlsec --only-binary=xmlsec --no-index --find-links=wheelhouse/ - - name: Run tests - run: | - /opt/python/${{ matrix.python-abi }}/bin/pytest -v --color=yes diff --git a/.github/workflows/opensuse-tumbleweed.yml b/.github/workflows/opensuse-tumbleweed.yml deleted file mode 100644 index 2f4caf49..00000000 --- a/.github/workflows/opensuse-tumbleweed.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: opensuse-tumbleweed -on: [push, pull_request] -jobs: - tumbleweed: - runs-on: ubuntu-latest - container: opensuse/tumbleweed - strategy: - matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] - steps: - - uses: actions/checkout@v1 - - name: Install build dependencies - run: | - zypper refresh - zypper update - # The follwoing installs "devel_basis" pattern since installing the pattern fails because of few - # incompatibilty issues among packages - zypper -n install autoconf automake binutils bison cpp cpp13 flex gawk gcc gcc13 gdbm-devel gettext-runtime gettext-tools glibc-devel info kbd kbd-legacy libapparmor1 libasan8 libatomic1 libctf-nobfd0 libctf0 libdb-4_8 libfl-devel libfl2 libgdbm6 libgdbm_compat4 libgomp1 libhwasan0 libisl23 libitm1 libkmod2 liblsan0 libltdl7 libmpc3 libmpfr6 libseccomp2 libtextstyle0 libtool libtsan2 libubsan1 libxcrypt-devel libzio1 linux-glibc-devel m4 make makeinfo ncurses-devel pam-config patch perl perl-Text-Unidecode perl-base purge-kernels-service system-user-nobody systemd systemd-default-settings systemd-default-settings-branding-openSUSE systemd-presets-branding-openSUSE systemd-presets-common-SUSE tack update-alternatives zlib-devel - PKGVER_NO_DOT=$(tr -d '.' <<< ${{ matrix.python-version }}) - zypper -n install git libxmlsec1-openssl1 xmlsec1-openssl-devel python${PKGVER_NO_DOT}-devel - python${{ matrix.python-version }} -m venv .venv - .venv/bin/python -m pip install --upgrade pip setuptools wheel - - name: Build linux_x86_64 wheel - run: | - .venv/bin/python setup.py bdist_wheel - rm -rf build/ - - name: Install test dependencies - run: | - .venv/bin/python -m pip install --upgrade --no-binary=lxml -r requirements-test.txt - .venv/bin/python -m pip install xmlsec --only-binary=xmlsec --no-index --find-links=dist/ - - name: Run tests - run: | - .venv/bin/python -m pytest -v --color=yes diff --git a/.github/workflows/sdist.yml b/.github/workflows/sdist.yml deleted file mode 100644 index e7c0f39d..00000000 --- a/.github/workflows/sdist.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: sdist -on: [push, pull_request] -jobs: - sdist: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Set up Python 3.11 - uses: actions/setup-python@v4 - with: - python-version: "3.11" - - name: Install build dependencies - run: | - pip install --upgrade pip setuptools wheel - - name: Package source dist - run: | - python setup.py sdist - - name: Install test dependencies - run: | - sudo apt-get install libxml2-dev libxmlsec1-dev libxmlsec1-openssl opensc softhsm2 libengine-pkcs11-openssl - pip install --upgrade -r requirements-test.txt --no-binary lxml - pip install dist/xmlsec-$(python setup.py --version).tar.gz - - name: Run tests - run: | - pytest -v --color=yes diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 0d83f59b..2059b17d 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -78,10 +78,13 @@ jobs: run: | MATRIX=$( { - cibuildwheel --print-build-identifiers --platform linux \ - | jq -nRc '{"only": inputs, "os": "ubuntu-latest"}' \ - && cibuildwheel --print-build-identifiers --platform macos \ - | jq -nRc '{"only": inputs, "os": "macos-latest"}' + # cibuildwheel --print-build-identifiers --platform linux \ + # | jq -nRc '{"only": inputs, "os": "ubuntu-latest"}' \ + # && cibuildwheel --print-build-identifiers --platform macos \ + # | jq -nRc '{"only": inputs, "os": "macos-latest"}' \ + # && cibuildwheel --print-build-identifiers --platform windows \ + cibuildwheel --print-build-identifiers --platform windows \ + | jq -nRc '{"only": inputs, "os": "windows-2019"}' } | jq -sc ) echo "include=$MATRIX" diff --git a/pyproject.toml b/pyproject.toml index 99927b4b..bd70b5d4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -79,6 +79,10 @@ environment-pass = [ archs = ["x86_64", "arm64"] before-all = "brew install perl" +[tool.cibuildwheel.windows] +archs = ["AMD64"] +# archs = ["AMD64", "x86"] + [[tool.cibuildwheel.overrides]] select = "*-manylinux*" before-all = "yum install -y perl-core" diff --git a/setup.py b/setup.py index 7e9e8ba1..0f73578d 100644 --- a/setup.py +++ b/setup.py @@ -213,19 +213,21 @@ def run(self): super(build_ext, self).run() def prepare_static_build_win(self): - release_url = 'https://github.com/bgaifullin/libxml2-win-binaries/releases/download/v2018.08/' - if sys.maxsize > 2147483647: - suffix = 'win64' - else: - suffix = 'win32' + # release_url = 'https://github.com/bgaifullin/libxml2-win-binaries/releases/download/v2018.08/' + release_url = 'https://github.com/mxamin/python-xmlsec-win-binaries/releases/download/2024.04.15/' + # if sys.maxsize > 2147483647: + # suffix = 'win64' + # else: + # suffix = 'win32' + suffix = 'win64' libs = [ - 'libxml2-2.9.4.{}.zip'.format(suffix), - 'libxslt-1.1.29.{}.zip'.format(suffix), - 'zlib-1.2.8.{}.zip'.format(suffix), - 'iconv-1.14.{}.zip'.format(suffix), - 'openssl-1.0.1.{}.zip'.format(suffix), - 'xmlsec-1.2.24.{}.zip'.format(suffix), + 'libxml2-2.10.3.{}.zip'.format(suffix), + 'libxslt-1.1.37.{}.zip'.format(suffix), + 'zlib-1.2.12.{}.zip'.format(suffix), + 'iconv-1.16-1.{}.zip'.format(suffix), + 'openssl-3.0.8.{}.zip'.format(suffix), + 'xmlsec-1.3.4.{}.zip'.format(suffix), ] for libfile in libs: From 300eb53fa418e003a185ad77f1cdbfd5271ef5d7 Mon Sep 17 00:00:00 2001 From: Amin Solhizadeh Date: Mon, 15 Apr 2024 17:48:02 +0200 Subject: [PATCH 02/19] Only py3.9 --- .github/workflows/wheels.yml | 3 +- workflow-backkups/linuxbrew.yml | 36 +++++++++++++++++ workflow-backkups/macosx.yml | 49 +++++++++++++++++++++++ workflow-backkups/manylinux.yml | 48 ++++++++++++++++++++++ workflow-backkups/opensuse-tumbleweed.yml | 33 +++++++++++++++ workflow-backkups/sdist.yml | 25 ++++++++++++ 6 files changed, 193 insertions(+), 1 deletion(-) create mode 100644 workflow-backkups/linuxbrew.yml create mode 100644 workflow-backkups/macosx.yml create mode 100644 workflow-backkups/manylinux.yml create mode 100644 workflow-backkups/opensuse-tumbleweed.yml create mode 100644 workflow-backkups/sdist.yml diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 2059b17d..e7438d5a 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -32,7 +32,8 @@ jobs: - name: Set up Python uses: actions/setup-python@v5.0.0 with: - python-version: "3.x" + python-version: "3.9" + # python-version: "3.x" - name: Install build dependencies run: | diff --git a/workflow-backkups/linuxbrew.yml b/workflow-backkups/linuxbrew.yml new file mode 100644 index 00000000..886bd8c9 --- /dev/null +++ b/workflow-backkups/linuxbrew.yml @@ -0,0 +1,36 @@ +name: linuxbrew +on: [push, pull_request] +jobs: + linuxbrew: + runs-on: ubuntu-latest + strategy: + matrix: + python: ["3.8", "3.9", "3.10", "3.11"] + steps: + - uses: actions/checkout@v3 + - name: Install brew + run: | + sudo apt install -y build-essential procps curl file git + /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" + echo "/home/linuxbrew/.linuxbrew/bin" >> $GITHUB_PATH + - name: Install build dependencies + run: | + brew update + brew install python@${{ matrix.python }} gcc libxml2 libxmlsec1 pkg-config + echo "/home/linuxbrew/.linuxbrew/opt/python@${{ matrix.python }}/libexec/bin" >> $GITHUB_PATH + - name: Install python dependencies + run: | + pip3 install --upgrade setuptools wheel build + - name: Build linux_x86_64 wheel + run: | + export CFLAGS="-I$(brew --prefix)/include" + export LDFLAGS="-L$(brew --prefix)/lib" + python3 -m build + rm -rf build/ + - name: Install test dependencies + run: | + pip3 install --upgrade -r requirements-test.txt + pip3 install xmlsec --only-binary=xmlsec --no-index --find-links=dist/ + - name: Run tests + run: | + pytest -v --color=yes diff --git a/workflow-backkups/macosx.yml b/workflow-backkups/macosx.yml new file mode 100644 index 00000000..6d0548e8 --- /dev/null +++ b/workflow-backkups/macosx.yml @@ -0,0 +1,49 @@ +name: MacOS +on: [push, pull_request] +jobs: + macosx: + runs-on: macos-latest + strategy: + matrix: + python: [3.5, 3.6, 3.7, 3.8, 3.9, "3.10", "3.11"] + static_deps: ["static", ""] + steps: + - uses: actions/checkout@v3 + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python }} + - name: Install build dependencies + run: | + pip install --upgrade pip setuptools wheel build + brew install libxml2 libxmlsec1 pkg-config + - name: Build macosx_x86_64 wheel + env: + CC: clang + CFLAGS: "-fprofile-instr-generate -fcoverage-mapping" + LDFLAGS: "-fprofile-instr-generate -fcoverage-mapping" + PYXMLSEC_STATIC_DEPS: ${{ matrix.static_deps }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + export PKG_CONFIG_PATH="$(brew --prefix)/opt/libxml2/lib/pkgconfig" + python -m build + rm -rf build/ + - name: Set environment variables + shell: bash + run: | + echo "PKGVER=$(python setup.py --version)" >> $GITHUB_ENV + echo "LLVM_PROFILE_FILE=pyxmlsec.profraw" >> $GITHUB_ENV + - name: Install test dependencies + run: | + pip install coverage --upgrade -r requirements-test.txt + pip install xmlsec --only-binary=xmlsec --no-index --find-links=dist/ + echo "PYXMLSEC_LIBFILE=$(python -c 'import xmlsec; print(xmlsec.__file__)')" >> $GITHUB_ENV + - name: Run tests + run: | + coverage run -m pytest -v --color=yes + - name: Report coverage to codecov + run: | + /Library/Developer/CommandLineTools/usr/bin/llvm-profdata merge -sparse ${{ env.LLVM_PROFILE_FILE }} -output pyxmlsec.profdata + /Library/Developer/CommandLineTools/usr/bin/llvm-cov show ${{ env.PYXMLSEC_LIBFILE }} --arch=$(uname -m) --instr-profile=pyxmlsec.profdata src > coverage.txt + bash <(curl -s https://codecov.io/bash) -f coverage.txt + if: matrix.static_deps != 'static' diff --git a/workflow-backkups/manylinux.yml b/workflow-backkups/manylinux.yml new file mode 100644 index 00000000..a44776b3 --- /dev/null +++ b/workflow-backkups/manylinux.yml @@ -0,0 +1,48 @@ +name: manylinux +on: [push, pull_request] +jobs: + manylinux: + runs-on: ubuntu-latest + strategy: + matrix: + python-abi: [cp36-cp36m, cp37-cp37m, cp38-cp38, cp39-cp39, cp310-cp310, cp311-cp311] + image: + - manylinux2014_x86_64 + - manylinux_2_28_x86_64 + - musllinux_1_1_x86_64 + container: quay.io/pypa/${{ matrix.image }} + steps: + - uses: actions/checkout@v1 + - name: Install python build dependencies + run: | + # https://github.com/actions/runner/issues/2033 + chown -R $(id -u):$(id -g) $PWD + /opt/python/${{ matrix.python-abi }}/bin/pip install --upgrade pip setuptools wheel build + - name: Install system build dependencies (manylinux) + run: | + yum install -y perl-core + if: contains(matrix.image, 'manylinux') + - name: Set environment variables + shell: bash + run: | + echo "PKGVER=$(/opt/python/${{ matrix.python-abi }}/bin/python setup.py --version)" >> $GITHUB_ENV + - name: Build linux_x86_64 wheel + env: + PYXMLSEC_STATIC_DEPS: true + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + /opt/python/${{ matrix.python-abi }}/bin/python -m build + - name: Label manylinux wheel + run: | + ls -la dist/ + auditwheel show dist/xmlsec-${{ env.PKGVER }}-${{ matrix.python-abi }}-linux_x86_64.whl + auditwheel repair dist/xmlsec-${{ env.PKGVER }}-${{ matrix.python-abi }}-linux_x86_64.whl + ls -la wheelhouse/ + auditwheel show wheelhouse/xmlsec-${{ env.PKGVER }}-${{ matrix.python-abi }}-*${{ matrix.image }}*.whl + - name: Install test dependencies + run: | + /opt/python/${{ matrix.python-abi }}/bin/pip install --upgrade -r requirements-test.txt + /opt/python/${{ matrix.python-abi }}/bin/pip install xmlsec --only-binary=xmlsec --no-index --find-links=wheelhouse/ + - name: Run tests + run: | + /opt/python/${{ matrix.python-abi }}/bin/pytest -v --color=yes diff --git a/workflow-backkups/opensuse-tumbleweed.yml b/workflow-backkups/opensuse-tumbleweed.yml new file mode 100644 index 00000000..2f4caf49 --- /dev/null +++ b/workflow-backkups/opensuse-tumbleweed.yml @@ -0,0 +1,33 @@ +name: opensuse-tumbleweed +on: [push, pull_request] +jobs: + tumbleweed: + runs-on: ubuntu-latest + container: opensuse/tumbleweed + strategy: + matrix: + python-version: ["3.8", "3.9", "3.10", "3.11"] + steps: + - uses: actions/checkout@v1 + - name: Install build dependencies + run: | + zypper refresh + zypper update + # The follwoing installs "devel_basis" pattern since installing the pattern fails because of few + # incompatibilty issues among packages + zypper -n install autoconf automake binutils bison cpp cpp13 flex gawk gcc gcc13 gdbm-devel gettext-runtime gettext-tools glibc-devel info kbd kbd-legacy libapparmor1 libasan8 libatomic1 libctf-nobfd0 libctf0 libdb-4_8 libfl-devel libfl2 libgdbm6 libgdbm_compat4 libgomp1 libhwasan0 libisl23 libitm1 libkmod2 liblsan0 libltdl7 libmpc3 libmpfr6 libseccomp2 libtextstyle0 libtool libtsan2 libubsan1 libxcrypt-devel libzio1 linux-glibc-devel m4 make makeinfo ncurses-devel pam-config patch perl perl-Text-Unidecode perl-base purge-kernels-service system-user-nobody systemd systemd-default-settings systemd-default-settings-branding-openSUSE systemd-presets-branding-openSUSE systemd-presets-common-SUSE tack update-alternatives zlib-devel + PKGVER_NO_DOT=$(tr -d '.' <<< ${{ matrix.python-version }}) + zypper -n install git libxmlsec1-openssl1 xmlsec1-openssl-devel python${PKGVER_NO_DOT}-devel + python${{ matrix.python-version }} -m venv .venv + .venv/bin/python -m pip install --upgrade pip setuptools wheel + - name: Build linux_x86_64 wheel + run: | + .venv/bin/python setup.py bdist_wheel + rm -rf build/ + - name: Install test dependencies + run: | + .venv/bin/python -m pip install --upgrade --no-binary=lxml -r requirements-test.txt + .venv/bin/python -m pip install xmlsec --only-binary=xmlsec --no-index --find-links=dist/ + - name: Run tests + run: | + .venv/bin/python -m pytest -v --color=yes diff --git a/workflow-backkups/sdist.yml b/workflow-backkups/sdist.yml new file mode 100644 index 00000000..e7c0f39d --- /dev/null +++ b/workflow-backkups/sdist.yml @@ -0,0 +1,25 @@ +name: sdist +on: [push, pull_request] +jobs: + sdist: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Python 3.11 + uses: actions/setup-python@v4 + with: + python-version: "3.11" + - name: Install build dependencies + run: | + pip install --upgrade pip setuptools wheel + - name: Package source dist + run: | + python setup.py sdist + - name: Install test dependencies + run: | + sudo apt-get install libxml2-dev libxmlsec1-dev libxmlsec1-openssl opensc softhsm2 libengine-pkcs11-openssl + pip install --upgrade -r requirements-test.txt --no-binary lxml + pip install dist/xmlsec-$(python setup.py --version).tar.gz + - name: Run tests + run: | + pytest -v --color=yes From 67b25dbbc60a935f90209a319517ff7f28b45ea6 Mon Sep 17 00:00:00 2001 From: Amin Solhizadeh Date: Mon, 15 Apr 2024 18:04:32 +0200 Subject: [PATCH 03/19] Update windows os to 2022 --- .github/workflows/wheels.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index e7438d5a..4746c87f 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -85,7 +85,7 @@ jobs: # | jq -nRc '{"only": inputs, "os": "macos-latest"}' \ # && cibuildwheel --print-build-identifiers --platform windows \ cibuildwheel --print-build-identifiers --platform windows \ - | jq -nRc '{"only": inputs, "os": "windows-2019"}' + | jq -nRc '{"only": inputs, "os": "windows-2022"}' } | jq -sc ) echo "include=$MATRIX" From 534180cc1d6a40125495ef1414d558bff7ec719c Mon Sep 17 00:00:00 2001 From: Amin Solhizadeh Date: Mon, 15 Apr 2024 18:12:49 +0200 Subject: [PATCH 04/19] Update lib in setup.py --- .github/workflows/wheels.yml | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 4746c87f..e7438d5a 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -85,7 +85,7 @@ jobs: # | jq -nRc '{"only": inputs, "os": "macos-latest"}' \ # && cibuildwheel --print-build-identifiers --platform windows \ cibuildwheel --print-build-identifiers --platform windows \ - | jq -nRc '{"only": inputs, "os": "windows-2022"}' + | jq -nRc '{"only": inputs, "os": "windows-2019"}' } | jq -sc ) echo "include=$MATRIX" diff --git a/setup.py b/setup.py index 0f73578d..2bcf27be 100644 --- a/setup.py +++ b/setup.py @@ -264,7 +264,7 @@ def prepare_static_build_win(self): ext.libraries = [ 'libxmlsec_a', 'libxmlsec-openssl_a', - 'libeay32', + 'libcrypto', 'iconv_a', 'libxslt_a', 'libexslt_a', From f16feb648b31b851a3b9f183ad2f10e3206cb0a3 Mon Sep 17 00:00:00 2001 From: Amin Solhizadeh Date: Mon, 15 Apr 2024 18:17:30 +0200 Subject: [PATCH 05/19] Only py39 --- .github/workflows/wheels.yml | 84 ++++++++++++++++++------------------ 1 file changed, 43 insertions(+), 41 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index e7438d5a..7e1646c1 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -18,45 +18,45 @@ on: permissions: {} jobs: - sdist: - runs-on: ubuntu-latest - - permissions: - contents: write - - steps: - - uses: actions/checkout@v4.1.1 - with: - fetch-depth: 0 - - - name: Set up Python - uses: actions/setup-python@v5.0.0 - with: - python-version: "3.9" - # python-version: "3.x" - - - name: Install build dependencies - run: | - pip install --upgrade pip setuptools wheel - - - name: Package source dist - run: python setup.py sdist - - - name: Install test dependencies - run: | - sudo apt-get update -y -q - sudo apt-get install -y -q libxml2-dev libxslt1-dev libxmlsec1-dev libxmlsec1-openssl opensc softhsm2 libengine-pkcs11-openssl - pip install --upgrade -r requirements-test.txt --no-binary lxml - pip install dist/xmlsec-$(python setup.py --version).tar.gz - - - name: Run tests - run: pytest -v --color=yes - - - name: Upload sdist - uses: actions/upload-artifact@v4.3.1 - with: - name: sdist - path: dist/*.tar.gz + # sdist: + # runs-on: ubuntu-latest + + # permissions: + # contents: write + + # steps: + # - uses: actions/checkout@v4.1.1 + # with: + # fetch-depth: 0 + + # - name: Set up Python + # uses: actions/setup-python@v5.0.0 + # with: + # python-version: "3.9" + # # python-version: "3.x" + + # - name: Install build dependencies + # run: | + # pip install --upgrade pip setuptools wheel + + # - name: Package source dist + # run: python setup.py sdist + + # - name: Install test dependencies + # run: | + # sudo apt-get update -y -q + # sudo apt-get install -y -q libxml2-dev libxslt1-dev libxmlsec1-dev libxmlsec1-openssl opensc softhsm2 libengine-pkcs11-openssl + # pip install --upgrade -r requirements-test.txt --no-binary lxml + # pip install dist/xmlsec-$(python setup.py --version).tar.gz + + # - name: Run tests + # run: pytest -v --color=yes + + # - name: Upload sdist + # uses: actions/upload-artifact@v4.3.1 + # with: + # name: sdist + # path: dist/*.tar.gz generate-wheels-matrix: # Create a matrix of all architectures & versions to build. @@ -85,11 +85,13 @@ jobs: # | jq -nRc '{"only": inputs, "os": "macos-latest"}' \ # && cibuildwheel --print-build-identifiers --platform windows \ cibuildwheel --print-build-identifiers --platform windows \ - | jq -nRc '{"only": inputs, "os": "windows-2019"}' + | jq -nRc '{"only": inputs, "os": "windows-latest"}' } | jq -sc ) echo "include=$MATRIX" - echo "include=$MATRIX" >> $GITHUB_OUTPUT + # echo "include=$MATRIX" >> $GITHUB_OUTPUT + echo "include=[{\"only\":\"cp39-win_amd64\",\"os\":\"windows-2019\"}]" >> $GITHUB_OUTPUT + build_wheels: name: Build for ${{ matrix.only }} From d60d5c2b1854cae4ae586d51e47975ad3642105b Mon Sep 17 00:00:00 2001 From: Amin Solhizadeh Date: Mon, 15 Apr 2024 23:45:35 +0200 Subject: [PATCH 06/19] Add tracer --- requirements-test.txt | 1 + tests/test_constants.py | 7 ++++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/requirements-test.txt b/requirements-test.txt index eb543402..563ce64f 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,3 +1,4 @@ -r requirements.txt pytest>=4.6.9 lxml-stubs +dlltracer diff --git a/tests/test_constants.py b/tests/test_constants.py index f79d19f0..f68f58c5 100644 --- a/tests/test_constants.py +++ b/tests/test_constants.py @@ -2,7 +2,12 @@ import pytest -import xmlsec + +import dlltracer +import sys + +with dlltracer.Trace(out=sys.stdout): + import xmlsec def _constants(typename): From 1b9ad2e42cc550333ea064da484eee381a6e1f6f Mon Sep 17 00:00:00 2001 From: Amin Solhizadeh Date: Tue, 16 Apr 2024 00:32:43 +0200 Subject: [PATCH 07/19] Enable debug --- setup.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/setup.py b/setup.py index 2bcf27be..ccc70220 100644 --- a/setup.py +++ b/setup.py @@ -129,6 +129,8 @@ def run(self): self.static = os.environ.get('PYXMLSEC_STATIC_DEPS', False) self.size_opt = os.environ.get('PYXMLSEC_OPTIMIZE_SIZE', True) + self.debug = True + if self.static or sys.platform == 'win32': self.info('starting static build on {}'.format(sys.platform)) buildroot = Path('build', 'tmp') From 9bcbe983072606bea93a8d232ed03d595d745812 Mon Sep 17 00:00:00 2001 From: Amin Solhizadeh Date: Tue, 16 Apr 2024 09:57:23 +0200 Subject: [PATCH 08/19] Skip tests for win builds --- pyproject.toml | 2 +- setup.py | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index bd70b5d4..aea5c9c3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,7 @@ skip = [ ] test-command = "pytest -v --color=yes {package}/tests" before-test = "pip install -r requirements-test.txt" -test-skip = "*-macosx_arm64" +test-skip = "*-macosx_arm64 cp39-win_amd64" [tool.cibuildwheel.environment] PYXMLSEC_STATIC_DEPS = "true" diff --git a/setup.py b/setup.py index ccc70220..2bcf27be 100644 --- a/setup.py +++ b/setup.py @@ -129,8 +129,6 @@ def run(self): self.static = os.environ.get('PYXMLSEC_STATIC_DEPS', False) self.size_opt = os.environ.get('PYXMLSEC_OPTIMIZE_SIZE', True) - self.debug = True - if self.static or sys.platform == 'win32': self.info('starting static build on {}'.format(sys.platform)) buildroot = Path('build', 'tmp') From ae30742034df055563534604c561e6edc0a1f2f0 Mon Sep 17 00:00:00 2001 From: Amin Solhizadeh Date: Tue, 16 Apr 2024 10:21:13 +0200 Subject: [PATCH 09/19] Add logs --- setup.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/setup.py b/setup.py index 2bcf27be..448103ab 100644 --- a/setup.py +++ b/setup.py @@ -282,6 +282,11 @@ def prepare_static_build_win(self): includes.append(next(p / 'xmlsec' for p in includes if (p / 'xmlsec').is_dir())) ext.include_dirs = [str(p.absolute()) for p in includes] + libs = ', '.join(map(str, ext.library_dirs)) + incs = ', '.join(map(str, ext.include_dirs)) + self.info('libs: {}'.format(libs)) + self.info('incs: {}'.format(incs)) + def prepare_static_build(self, build_platform): self.openssl_version = os.environ.get('PYXMLSEC_OPENSSL_VERSION') self.libiconv_version = os.environ.get('PYXMLSEC_LIBICONV_VERSION') From 84ac67d9c1cee113499b7d89b18904156a7f048c Mon Sep 17 00:00:00 2001 From: Amin Solhizadeh Date: Tue, 16 Apr 2024 13:30:25 +0200 Subject: [PATCH 10/19] Add win tests back --- pyproject.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index aea5c9c3..1205c93a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -61,7 +61,8 @@ skip = [ ] test-command = "pytest -v --color=yes {package}/tests" before-test = "pip install -r requirements-test.txt" -test-skip = "*-macosx_arm64 cp39-win_amd64" +# test-skip = "*-macosx_arm64 cp39-win_amd64" +test-skip = "*-macosx_arm64" [tool.cibuildwheel.environment] PYXMLSEC_STATIC_DEPS = "true" From c7f66d36022387cfa3016b0d60b4d5ad6da39c71 Mon Sep 17 00:00:00 2001 From: Amin Solhizadeh Date: Tue, 16 Apr 2024 13:36:12 +0200 Subject: [PATCH 11/19] Add no-binary lxml for win tests --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 1205c93a..70a3cc9b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,7 +60,7 @@ skip = [ "cp37-musllinux_aarch64", ] test-command = "pytest -v --color=yes {package}/tests" -before-test = "pip install -r requirements-test.txt" +before-test = "pip install -r requirements-test.txt --no-binary lxml" # test-skip = "*-macosx_arm64 cp39-win_amd64" test-skip = "*-macosx_arm64" From 9f07f2ea2b4c3ce319f830051463509816ad5cf3 Mon Sep 17 00:00:00 2001 From: Amin Solhizadeh Date: Tue, 16 Apr 2024 13:54:28 +0200 Subject: [PATCH 12/19] Print lxml libxml2 version --- pyproject.toml | 3 ++- tests/test_constants.py | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 70a3cc9b..0d05f052 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,7 +60,8 @@ skip = [ "cp37-musllinux_aarch64", ] test-command = "pytest -v --color=yes {package}/tests" -before-test = "pip install -r requirements-test.txt --no-binary lxml" +# before-test = "pip install -r requirements-test.txt --no-binary lxml" +before-test = "pip install -r requirements-test.txt" # test-skip = "*-macosx_arm64 cp39-win_amd64" test-skip = "*-macosx_arm64" diff --git a/tests/test_constants.py b/tests/test_constants.py index f68f58c5..21e376bc 100644 --- a/tests/test_constants.py +++ b/tests/test_constants.py @@ -1,13 +1,14 @@ """Test constants from :mod:`xmlsec.constants` module.""" +from lxml import etree +print(etree.LIBXML_VERSION) + import pytest -import dlltracer import sys -with dlltracer.Trace(out=sys.stdout): - import xmlsec +import xmlsec def _constants(typename): From 74c2c4fe4220b99871adc98ada4ebdfb88ebf5d2 Mon Sep 17 00:00:00 2001 From: Amin Solhizadeh Date: Tue, 16 Apr 2024 16:36:57 +0200 Subject: [PATCH 13/19] Fix libxml2 version 2.9.14 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 448103ab..3e9e7632 100644 --- a/setup.py +++ b/setup.py @@ -222,7 +222,7 @@ def prepare_static_build_win(self): suffix = 'win64' libs = [ - 'libxml2-2.10.3.{}.zip'.format(suffix), + 'libxml2-2.9.14.{}.zip'.format(suffix), 'libxslt-1.1.37.{}.zip'.format(suffix), 'zlib-1.2.12.{}.zip'.format(suffix), 'iconv-1.16-1.{}.zip'.format(suffix), From 37d4c52d70b24d092a23910e7bbffe0ffaab1d29 Mon Sep 17 00:00:00 2001 From: Amin Solhizadeh Date: Tue, 16 Apr 2024 23:17:54 +0200 Subject: [PATCH 14/19] Fix libxml2 version --- setup.py | 2 +- tests/test_constants.py | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/setup.py b/setup.py index 3e9e7632..4ea988d1 100644 --- a/setup.py +++ b/setup.py @@ -222,7 +222,7 @@ def prepare_static_build_win(self): suffix = 'win64' libs = [ - 'libxml2-2.9.14.{}.zip'.format(suffix), + 'libxml2-2.11.7.{}.zip'.format(suffix), 'libxslt-1.1.37.{}.zip'.format(suffix), 'zlib-1.2.12.{}.zip'.format(suffix), 'iconv-1.16-1.{}.zip'.format(suffix), diff --git a/tests/test_constants.py b/tests/test_constants.py index 21e376bc..0860baec 100644 --- a/tests/test_constants.py +++ b/tests/test_constants.py @@ -1,8 +1,5 @@ """Test constants from :mod:`xmlsec.constants` module.""" -from lxml import etree -print(etree.LIBXML_VERSION) - import pytest From 238703f26f8112117446803b993896e008fe01d0 Mon Sep 17 00:00:00 2001 From: Amin Solhizadeh Date: Wed, 17 Apr 2024 08:08:34 +0200 Subject: [PATCH 15/19] Add all matrices --- .github/workflows/wheels.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 7e1646c1..3a1ac85c 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -85,12 +85,12 @@ jobs: # | jq -nRc '{"only": inputs, "os": "macos-latest"}' \ # && cibuildwheel --print-build-identifiers --platform windows \ cibuildwheel --print-build-identifiers --platform windows \ - | jq -nRc '{"only": inputs, "os": "windows-latest"}' + | jq -nRc '{"only": inputs, "os": "windows-2019"}' } | jq -sc ) echo "include=$MATRIX" - # echo "include=$MATRIX" >> $GITHUB_OUTPUT - echo "include=[{\"only\":\"cp39-win_amd64\",\"os\":\"windows-2019\"}]" >> $GITHUB_OUTPUT + echo "include=$MATRIX" >> $GITHUB_OUTPUT + # echo "include=[{\"only\":\"cp39-win_amd64\",\"os\":\"windows-2019\"}]" >> $GITHUB_OUTPUT build_wheels: From 18c7e28ac4171beeb479f065b285fe14c1754c9e Mon Sep 17 00:00:00 2001 From: Amin Solhizadeh Date: Wed, 17 Apr 2024 08:12:21 +0200 Subject: [PATCH 16/19] Remove dlltracer --- requirements-test.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/requirements-test.txt b/requirements-test.txt index 563ce64f..eb543402 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,4 +1,3 @@ -r requirements.txt pytest>=4.6.9 lxml-stubs -dlltracer From 8149c8a3ea5700bd190bfd18158340ed2eab51e7 Mon Sep 17 00:00:00 2001 From: Amin Solhizadeh Date: Wed, 17 Apr 2024 16:26:22 +0200 Subject: [PATCH 17/19] Enable wheel workflow --- .github/workflows/wheels.yml | 79 ++++++++++++++++++------------------ 1 file changed, 39 insertions(+), 40 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 3a1ac85c..fd12d20f 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -18,45 +18,45 @@ on: permissions: {} jobs: - # sdist: - # runs-on: ubuntu-latest - - # permissions: - # contents: write - - # steps: - # - uses: actions/checkout@v4.1.1 - # with: - # fetch-depth: 0 - - # - name: Set up Python - # uses: actions/setup-python@v5.0.0 - # with: - # python-version: "3.9" - # # python-version: "3.x" - - # - name: Install build dependencies - # run: | - # pip install --upgrade pip setuptools wheel - - # - name: Package source dist - # run: python setup.py sdist - - # - name: Install test dependencies - # run: | - # sudo apt-get update -y -q - # sudo apt-get install -y -q libxml2-dev libxslt1-dev libxmlsec1-dev libxmlsec1-openssl opensc softhsm2 libengine-pkcs11-openssl - # pip install --upgrade -r requirements-test.txt --no-binary lxml - # pip install dist/xmlsec-$(python setup.py --version).tar.gz - - # - name: Run tests - # run: pytest -v --color=yes - - # - name: Upload sdist - # uses: actions/upload-artifact@v4.3.1 - # with: - # name: sdist - # path: dist/*.tar.gz + sdist: + runs-on: ubuntu-latest + + permissions: + contents: write + + steps: + - uses: actions/checkout@v4.1.1 + with: + fetch-depth: 0 + + - name: Set up Python + uses: actions/setup-python@v5.0.0 + with: + python-version: "3.9" + # python-version: "3.x" + + - name: Install build dependencies + run: | + pip install --upgrade pip setuptools wheel + + - name: Package source dist + run: python setup.py sdist + + - name: Install test dependencies + run: | + sudo apt-get update -y -q + sudo apt-get install -y -q libxml2-dev libxslt1-dev libxmlsec1-dev libxmlsec1-openssl opensc softhsm2 libengine-pkcs11-openssl + pip install --upgrade -r requirements-test.txt --no-binary lxml + pip install dist/xmlsec-$(python setup.py --version).tar.gz + + - name: Run tests + run: pytest -v --color=yes + + - name: Upload sdist + uses: actions/upload-artifact@v4.3.1 + with: + name: sdist + path: dist/*.tar.gz generate-wheels-matrix: # Create a matrix of all architectures & versions to build. @@ -90,7 +90,6 @@ jobs: ) echo "include=$MATRIX" echo "include=$MATRIX" >> $GITHUB_OUTPUT - # echo "include=[{\"only\":\"cp39-win_amd64\",\"os\":\"windows-2019\"}]" >> $GITHUB_OUTPUT build_wheels: From 67b4d7358f7e0d34a6c2acad2f44421a16e39ab9 Mon Sep 17 00:00:00 2001 From: Amin Solhizadeh Date: Wed, 17 Apr 2024 17:38:42 +0200 Subject: [PATCH 18/19] Update setup.py and enable all win archs --- .github/workflows/wheels.yml | 3 +-- pyproject.toml | 3 +-- setup.py | 10 +++++----- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index fd12d20f..e5bb6e85 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -32,8 +32,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5.0.0 with: - python-version: "3.9" - # python-version: "3.x" + python-version: "3.x" - name: Install build dependencies run: | diff --git a/pyproject.toml b/pyproject.toml index 0d05f052..58a2ff9a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -82,8 +82,7 @@ archs = ["x86_64", "arm64"] before-all = "brew install perl" [tool.cibuildwheel.windows] -archs = ["AMD64"] -# archs = ["AMD64", "x86"] +archs = ["AMD64", "x86"] [[tool.cibuildwheel.overrides]] select = "*-manylinux*" diff --git a/setup.py b/setup.py index 4ea988d1..63d2c2e3 100644 --- a/setup.py +++ b/setup.py @@ -215,11 +215,10 @@ def run(self): def prepare_static_build_win(self): # release_url = 'https://github.com/bgaifullin/libxml2-win-binaries/releases/download/v2018.08/' release_url = 'https://github.com/mxamin/python-xmlsec-win-binaries/releases/download/2024.04.15/' - # if sys.maxsize > 2147483647: - # suffix = 'win64' - # else: - # suffix = 'win32' - suffix = 'win64' + if sys.maxsize > 2147483647: # 2.0 GiB + suffix = 'win64' + else: + suffix = 'win32' libs = [ 'libxml2-2.11.7.{}.zip'.format(suffix), @@ -606,6 +605,7 @@ def prepare_static_build(self, build_platform): use_scm_version=True, description='Python bindings for the XML Security Library', long_description=long_desc, + long_description_content_type='text/markdown', ext_modules=[pyxmlsec], cmdclass={'build_ext': build_ext}, python_requires='>=3.5', From 4c7ddb39e77fcb60db0e640d47e69938884034a4 Mon Sep 17 00:00:00 2001 From: Amin Solhizadeh Date: Wed, 17 Apr 2024 18:12:05 +0200 Subject: [PATCH 19/19] Cleanup --- .../workflows}/linuxbrew.yml | 0 {workflow-backkups => .github/workflows}/macosx.yml | 0 .../workflows}/manylinux.yml | 0 .../workflows}/opensuse-tumbleweed.yml | 0 {workflow-backkups => .github/workflows}/sdist.yml | 0 .github/workflows/wheels.yml | 12 +++++------- pyproject.toml | 2 -- setup.py | 8 +------- tests/test_constants.py | 3 --- 9 files changed, 6 insertions(+), 19 deletions(-) rename {workflow-backkups => .github/workflows}/linuxbrew.yml (100%) rename {workflow-backkups => .github/workflows}/macosx.yml (100%) rename {workflow-backkups => .github/workflows}/manylinux.yml (100%) rename {workflow-backkups => .github/workflows}/opensuse-tumbleweed.yml (100%) rename {workflow-backkups => .github/workflows}/sdist.yml (100%) diff --git a/workflow-backkups/linuxbrew.yml b/.github/workflows/linuxbrew.yml similarity index 100% rename from workflow-backkups/linuxbrew.yml rename to .github/workflows/linuxbrew.yml diff --git a/workflow-backkups/macosx.yml b/.github/workflows/macosx.yml similarity index 100% rename from workflow-backkups/macosx.yml rename to .github/workflows/macosx.yml diff --git a/workflow-backkups/manylinux.yml b/.github/workflows/manylinux.yml similarity index 100% rename from workflow-backkups/manylinux.yml rename to .github/workflows/manylinux.yml diff --git a/workflow-backkups/opensuse-tumbleweed.yml b/.github/workflows/opensuse-tumbleweed.yml similarity index 100% rename from workflow-backkups/opensuse-tumbleweed.yml rename to .github/workflows/opensuse-tumbleweed.yml diff --git a/workflow-backkups/sdist.yml b/.github/workflows/sdist.yml similarity index 100% rename from workflow-backkups/sdist.yml rename to .github/workflows/sdist.yml diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index e5bb6e85..ccd62cf8 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -78,19 +78,17 @@ jobs: run: | MATRIX=$( { - # cibuildwheel --print-build-identifiers --platform linux \ - # | jq -nRc '{"only": inputs, "os": "ubuntu-latest"}' \ - # && cibuildwheel --print-build-identifiers --platform macos \ - # | jq -nRc '{"only": inputs, "os": "macos-latest"}' \ - # && cibuildwheel --print-build-identifiers --platform windows \ - cibuildwheel --print-build-identifiers --platform windows \ + cibuildwheel --print-build-identifiers --platform linux \ + | jq -nRc '{"only": inputs, "os": "ubuntu-latest"}' \ + && cibuildwheel --print-build-identifiers --platform macos \ + | jq -nRc '{"only": inputs, "os": "macos-latest"}' \ + && cibuildwheel --print-build-identifiers --platform windows \ | jq -nRc '{"only": inputs, "os": "windows-2019"}' } | jq -sc ) echo "include=$MATRIX" echo "include=$MATRIX" >> $GITHUB_OUTPUT - build_wheels: name: Build for ${{ matrix.only }} needs: generate-wheels-matrix diff --git a/pyproject.toml b/pyproject.toml index 58a2ff9a..9b6469d4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,9 +60,7 @@ skip = [ "cp37-musllinux_aarch64", ] test-command = "pytest -v --color=yes {package}/tests" -# before-test = "pip install -r requirements-test.txt --no-binary lxml" before-test = "pip install -r requirements-test.txt" -# test-skip = "*-macosx_arm64 cp39-win_amd64" test-skip = "*-macosx_arm64" [tool.cibuildwheel.environment] diff --git a/setup.py b/setup.py index 63d2c2e3..92588ebc 100644 --- a/setup.py +++ b/setup.py @@ -213,8 +213,7 @@ def run(self): super(build_ext, self).run() def prepare_static_build_win(self): - # release_url = 'https://github.com/bgaifullin/libxml2-win-binaries/releases/download/v2018.08/' - release_url = 'https://github.com/mxamin/python-xmlsec-win-binaries/releases/download/2024.04.15/' + release_url = 'https://github.com/mxamin/python-xmlsec-win-binaries/releases/download/2024.04.17/' if sys.maxsize > 2147483647: # 2.0 GiB suffix = 'win64' else: @@ -281,11 +280,6 @@ def prepare_static_build_win(self): includes.append(next(p / 'xmlsec' for p in includes if (p / 'xmlsec').is_dir())) ext.include_dirs = [str(p.absolute()) for p in includes] - libs = ', '.join(map(str, ext.library_dirs)) - incs = ', '.join(map(str, ext.include_dirs)) - self.info('libs: {}'.format(libs)) - self.info('incs: {}'.format(incs)) - def prepare_static_build(self, build_platform): self.openssl_version = os.environ.get('PYXMLSEC_OPENSSL_VERSION') self.libiconv_version = os.environ.get('PYXMLSEC_LIBICONV_VERSION') diff --git a/tests/test_constants.py b/tests/test_constants.py index 0860baec..f79d19f0 100644 --- a/tests/test_constants.py +++ b/tests/test_constants.py @@ -2,9 +2,6 @@ import pytest - -import sys - import xmlsec