Skip to content

Commit 495de9f

Browse files
committed
debug
1 parent cb6af9d commit 495de9f

File tree

5 files changed

+142
-139
lines changed

5 files changed

+142
-139
lines changed

.github/workflows/linuxbrew.yml

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,36 @@
1-
# name: linuxbrew
2-
# on: [push, pull_request]
3-
# jobs:
4-
# linuxbrew:
5-
# runs-on: ubuntu-latest
6-
# strategy:
7-
# matrix:
8-
# python: ["3.9", "3.10", "3.11", "3.12", "3.13"]
9-
# steps:
10-
# - uses: actions/checkout@v3
11-
# - name: Install brew
12-
# run: |
13-
# sudo apt install -y build-essential procps curl file git
14-
# /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
15-
# echo "/home/linuxbrew/.linuxbrew/bin" >> $GITHUB_PATH
16-
# - name: Install build dependencies
17-
# run: |
18-
# brew update
19-
# brew install python@${{ matrix.python }} gcc libxml2 libxmlsec1 pkg-config
20-
# echo "/home/linuxbrew/.linuxbrew/opt/python@${{ matrix.python }}/libexec/bin" >> $GITHUB_PATH
21-
# - name: Build wheel
22-
# run: |
23-
# python3 -m venv build_venv
24-
# source build_venv/bin/activate
25-
# pip3 install --upgrade setuptools wheel build
26-
# export CFLAGS="-I$(brew --prefix)/include"
27-
# export LDFLAGS="-L$(brew --prefix)/lib"
28-
# python3 -m build
29-
# rm -rf build/
30-
# - name: Run tests
31-
# run: |
32-
# python3 -m venv test_venv
33-
# source test_venv/bin/activate
34-
# pip3 install --upgrade --no-binary=lxml -r requirements-test.txt
35-
# pip3 install xmlsec --only-binary=xmlsec --no-index --find-links=dist/
36-
# pytest -v --color=yes
1+
name: linuxbrew
2+
on: [push, pull_request]
3+
jobs:
4+
linuxbrew:
5+
runs-on: ubuntu-latest
6+
strategy:
7+
matrix:
8+
python: ["3.9", "3.10", "3.11", "3.12", "3.13"]
9+
steps:
10+
- uses: actions/checkout@v3
11+
- name: Install brew
12+
run: |
13+
sudo apt install -y build-essential procps curl file git
14+
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
15+
echo "/home/linuxbrew/.linuxbrew/bin" >> $GITHUB_PATH
16+
- name: Install build dependencies
17+
run: |
18+
brew update
19+
brew install python@${{ matrix.python }} gcc libxml2 libxmlsec1 pkg-config
20+
echo "/home/linuxbrew/.linuxbrew/opt/python@${{ matrix.python }}/libexec/bin" >> $GITHUB_PATH
21+
- name: Build wheel
22+
run: |
23+
python3 -m venv build_venv
24+
source build_venv/bin/activate
25+
pip3 install --upgrade setuptools wheel build
26+
export CFLAGS="-I$(brew --prefix)/include"
27+
export LDFLAGS="-L$(brew --prefix)/lib"
28+
python3 -m build
29+
rm -rf build/
30+
- name: Run tests
31+
run: |
32+
python3 -m venv test_venv
33+
source test_venv/bin/activate
34+
pip3 install --upgrade --no-binary=lxml -r requirements-test.txt
35+
pip3 install xmlsec --only-binary=xmlsec --no-index --find-links=dist/
36+
pytest -v --color=yes

.github/workflows/macosx.yml

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,50 @@
1-
# name: MacOS
2-
# on: [push, pull_request]
3-
# jobs:
4-
# macosx:
5-
# runs-on: macos-latest
6-
# strategy:
7-
# matrix:
8-
# python: ["3.9", "3.10", "3.11", "3.12", "3.13"]
9-
# static_deps: ["static", ""]
10-
# steps:
11-
# - uses: actions/checkout@v3
12-
# - name: Setup Python
13-
# uses: actions/setup-python@v4
14-
# with:
15-
# python-version: ${{ matrix.python }}
16-
# - name: Install build dependencies
17-
# run: |
18-
# pip install --upgrade pip setuptools wheel build
19-
# brew install libxml2 libxmlsec1 pkg-config
20-
# - name: Build macosx_x86_64 wheel
21-
# env:
22-
# CC: clang
23-
# CFLAGS: "-fprofile-instr-generate -fcoverage-mapping"
24-
# LDFLAGS: "-fprofile-instr-generate -fcoverage-mapping"
25-
# PYXMLSEC_STATIC_DEPS: ${{ matrix.static_deps }}
26-
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27-
# run: |
28-
# export PKG_CONFIG_PATH="$(brew --prefix)/opt/libxml2/lib/pkgconfig"
29-
# python -m build
30-
# rm -rf build/
31-
# - name: Set environment variables
32-
# shell: bash
33-
# run: |
34-
# echo "PKGVER=$(python setup.py --version)" >> $GITHUB_ENV
35-
# echo "LLVM_PROFILE_FILE=pyxmlsec.profraw" >> $GITHUB_ENV
36-
# - name: Install test dependencies
37-
# run: |
38-
# export PKG_CONFIG_PATH="$(brew --prefix)/opt/libxml2/lib/pkgconfig"
39-
# pip install coverage --upgrade --no-binary=lxml -r requirements-test.txt
40-
# pip install xmlsec --only-binary=xmlsec --no-index --find-links=dist/
41-
# echo "PYXMLSEC_LIBFILE=$(python -c 'import xmlsec; print(xmlsec.__file__)')" >> $GITHUB_ENV
42-
# - name: Run tests
43-
# run: |
44-
# coverage run -m pytest -v --color=yes
45-
# - name: Report coverage to codecov
46-
# run: |
47-
# /Library/Developer/CommandLineTools/usr/bin/llvm-profdata merge -sparse ${{ env.LLVM_PROFILE_FILE }} -output pyxmlsec.profdata
48-
# /Library/Developer/CommandLineTools/usr/bin/llvm-cov show ${{ env.PYXMLSEC_LIBFILE }} --arch=$(uname -m) --instr-profile=pyxmlsec.profdata src > coverage.txt
49-
# bash <(curl -s https://codecov.io/bash) -f coverage.txt
50-
# if: matrix.static_deps != 'static'
1+
name: MacOS
2+
on: [push, pull_request]
3+
jobs:
4+
macosx:
5+
runs-on: macos-latest
6+
strategy:
7+
matrix:
8+
python: ["3.9", "3.10", "3.11", "3.12", "3.13"]
9+
static_deps: ["static", ""]
10+
steps:
11+
- uses: actions/checkout@v3
12+
- name: Setup Python
13+
uses: actions/setup-python@v4
14+
with:
15+
python-version: ${{ matrix.python }}
16+
- name: Install build dependencies
17+
run: |
18+
pip install --upgrade pip setuptools wheel build
19+
brew install libxml2 libxmlsec1 pkg-config
20+
- name: Build macosx_x86_64 wheel
21+
env:
22+
CC: clang
23+
CFLAGS: "-fprofile-instr-generate -fcoverage-mapping"
24+
LDFLAGS: "-fprofile-instr-generate -fcoverage-mapping"
25+
PYXMLSEC_STATIC_DEPS: ${{ matrix.static_deps }}
26+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
run: |
28+
export PKG_CONFIG_PATH="$(brew --prefix)/opt/libxml2/lib/pkgconfig"
29+
python -m build
30+
rm -rf build/
31+
- name: Set environment variables
32+
shell: bash
33+
run: |
34+
echo "PKGVER=$(python setup.py --version)" >> $GITHUB_ENV
35+
echo "LLVM_PROFILE_FILE=pyxmlsec.profraw" >> $GITHUB_ENV
36+
- name: Install test dependencies
37+
run: |
38+
export PKG_CONFIG_PATH="$(brew --prefix)/opt/libxml2/lib/pkgconfig"
39+
pip install coverage --upgrade --no-binary=lxml -r requirements-test.txt
40+
pip install xmlsec --only-binary=xmlsec --no-index --find-links=dist/
41+
echo "PYXMLSEC_LIBFILE=$(python -c 'import xmlsec; print(xmlsec.__file__)')" >> $GITHUB_ENV
42+
- name: Run tests
43+
run: |
44+
coverage run -m pytest -v --color=yes
45+
- name: Report coverage to codecov
46+
run: |
47+
/Library/Developer/CommandLineTools/usr/bin/llvm-profdata merge -sparse ${{ env.LLVM_PROFILE_FILE }} -output pyxmlsec.profdata
48+
/Library/Developer/CommandLineTools/usr/bin/llvm-cov show ${{ env.PYXMLSEC_LIBFILE }} --arch=$(uname -m) --instr-profile=pyxmlsec.profdata src > coverage.txt
49+
bash <(curl -s https://codecov.io/bash) -f coverage.txt
50+
if: matrix.static_deps != 'static'

.github/workflows/manylinux.yml

Lines changed: 47 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,47 @@
1-
# name: manylinux
2-
# on: [push, pull_request]
3-
# jobs:
4-
# manylinux:
5-
# runs-on: ubuntu-latest
6-
# strategy:
7-
# matrix:
8-
# python-abi: [cp39-cp39, cp310-cp310, cp311-cp311, cp312-cp312, cp313-cp313]
9-
# image:
10-
# - manylinux_2_28_x86_64
11-
# - musllinux_1_1_x86_64
12-
# container: quay.io/pypa/${{ matrix.image }}
13-
# steps:
14-
# - uses: actions/checkout@v1
15-
# - name: Install python build dependencies
16-
# run: |
17-
# # https://github.com/actions/runner/issues/2033
18-
# chown -R $(id -u):$(id -g) $PWD
19-
# /opt/python/${{ matrix.python-abi }}/bin/pip install --upgrade pip setuptools wheel build packaging
20-
# - name: Install system build dependencies (manylinux)
21-
# run: |
22-
# yum install -y perl-core
23-
# if: contains(matrix.image, 'manylinux')
24-
# - name: Set environment variables
25-
# shell: bash
26-
# run: |
27-
# echo "PKGVER=$(/opt/python/${{ matrix.python-abi }}/bin/python setup.py --version)" >> $GITHUB_ENV
28-
# - name: Build linux_x86_64 wheel
29-
# env:
30-
# PYXMLSEC_STATIC_DEPS: true
31-
# GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32-
# run: |
33-
# /opt/python/${{ matrix.python-abi }}/bin/python -m build
34-
# - name: Label manylinux wheel
35-
# run: |
36-
# ls -la dist/
37-
# auditwheel show dist/xmlsec-${{ env.PKGVER }}-${{ matrix.python-abi }}-linux_x86_64.whl
38-
# auditwheel repair dist/xmlsec-${{ env.PKGVER }}-${{ matrix.python-abi }}-linux_x86_64.whl
39-
# ls -la wheelhouse/
40-
# auditwheel show wheelhouse/xmlsec-${{ env.PKGVER }}-${{ matrix.python-abi }}-*${{ matrix.image }}*.whl
41-
# - name: Install test dependencies
42-
# run: |
43-
# /opt/python/${{ matrix.python-abi }}/bin/pip install --upgrade -r requirements-test.txt
44-
# /opt/python/${{ matrix.python-abi }}/bin/pip install xmlsec --only-binary=xmlsec --no-index --find-links=wheelhouse/
45-
# - name: Run tests
46-
# run: |
47-
# /opt/python/${{ matrix.python-abi }}/bin/pytest -v --color=yes
1+
name: manylinux
2+
on: [push, pull_request]
3+
jobs:
4+
manylinux:
5+
runs-on: ubuntu-latest
6+
strategy:
7+
matrix:
8+
python-abi: [cp39-cp39, cp310-cp310, cp311-cp311, cp312-cp312, cp313-cp313]
9+
image:
10+
- manylinux_2_28_x86_64
11+
- musllinux_1_1_x86_64
12+
container: quay.io/pypa/${{ matrix.image }}
13+
steps:
14+
- uses: actions/checkout@v1
15+
- name: Install python build dependencies
16+
run: |
17+
# https://github.com/actions/runner/issues/2033
18+
chown -R $(id -u):$(id -g) $PWD
19+
/opt/python/${{ matrix.python-abi }}/bin/pip install --upgrade pip setuptools wheel build packaging
20+
- name: Install system build dependencies (manylinux)
21+
run: |
22+
yum install -y perl-core
23+
if: contains(matrix.image, 'manylinux')
24+
- name: Set environment variables
25+
shell: bash
26+
run: |
27+
echo "PKGVER=$(/opt/python/${{ matrix.python-abi }}/bin/python setup.py --version)" >> $GITHUB_ENV
28+
- name: Build linux_x86_64 wheel
29+
env:
30+
PYXMLSEC_STATIC_DEPS: true
31+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
run: |
33+
/opt/python/${{ matrix.python-abi }}/bin/python -m build
34+
- name: Label manylinux wheel
35+
run: |
36+
ls -la dist/
37+
auditwheel show dist/xmlsec-${{ env.PKGVER }}-${{ matrix.python-abi }}-linux_x86_64.whl
38+
auditwheel repair dist/xmlsec-${{ env.PKGVER }}-${{ matrix.python-abi }}-linux_x86_64.whl
39+
ls -la wheelhouse/
40+
auditwheel show wheelhouse/xmlsec-${{ env.PKGVER }}-${{ matrix.python-abi }}-*${{ matrix.image }}*.whl
41+
- name: Install test dependencies
42+
run: |
43+
/opt/python/${{ matrix.python-abi }}/bin/pip install --upgrade -r requirements-test.txt
44+
/opt/python/${{ matrix.python-abi }}/bin/pip install xmlsec --only-binary=xmlsec --no-index --find-links=wheelhouse/
45+
- name: Run tests
46+
run: |
47+
/opt/python/${{ matrix.python-abi }}/bin/pytest -v --color=yes

.github/workflows/wheels.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ permissions:
2121

2222
jobs:
2323
sdist:
24-
runs-on: ubuntu-24.04
24+
runs-on: ubuntu-latest
2525

2626
permissions:
2727
contents: write

setup.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -610,11 +610,6 @@ def prepare_static_build(self, build_platform):
610610
"--disable-shared",
611611
"--without-lzma",
612612
"--without-python",
613-
*(
614-
["--with-legacy-features"]
615-
if Version(self.libxml2_version) >= Version("1.3.7")
616-
else []
617-
),
618613
"--with-iconv={}".format(self.prefix_dir),
619614
"--with-zlib={}".format(self.prefix_dir),
620615
host_arg,
@@ -676,6 +671,14 @@ def prepare_static_build(self, build_platform):
676671
"--enable-shared=no",
677672
"--enable-static-linking=yes",
678673
"--with-default-crypto=openssl",
674+
*(
675+
["--with-legacy-features"]
676+
if (
677+
not self.xmlsec1_version # latest
678+
or Version(self.xmlsec1_version) >= Version("1.3.7")
679+
)
680+
else []
681+
),
679682
"--with-openssl={}".format(self.prefix_dir),
680683
"--with-libxml={}".format(self.prefix_dir),
681684
"--with-libxslt={}".format(self.prefix_dir),

0 commit comments

Comments
 (0)