Skip to content

Commit

Permalink
Merge branch 'master' into fix_a1
Browse files Browse the repository at this point in the history
  • Loading branch information
mgomezleon committed Jan 26, 2024
2 parents 77838d4 + 1563947 commit d5f3947
Show file tree
Hide file tree
Showing 71 changed files with 1,149 additions and 1,067 deletions.
10 changes: 6 additions & 4 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
environment:
matrix:
- python: 27
- python: 27-x64
- python: 35
- python: 35-x64
- python: 36
Expand All @@ -11,9 +9,13 @@ environment:
- python: 38
- python: 38-x64
- python: 39
python_version: 3.9.0
python_version: 3.9.13
- python: 39-x64
python_version: 3.9.0
python_version: 3.9.13
- python: 310
python_version: 3.10.6
- python: 310-x64
python_version: 3.10.6

install:
- ps: |
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/linuxbrew.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: linuxbrew
on: [push, pull_request]
jobs:
linuxbrew:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install build dependencies
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)"
test -d ~/.linuxbrew && eval $(~/.linuxbrew/bin/brew shellenv)
test -r ~/.bash_profile && echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.bash_profile
echo "eval \$($(brew --prefix)/bin/brew shellenv)" >>~/.profile
brew update
brew install python gcc libxml2 libxmlsec1 pkg-config
pip3 install --upgrade setuptools wheel build
ln -s $(brew --prefix)/bin/gcc-12 $(brew --prefix)/bin/gcc-5
ls -l $(brew --prefix)/bin/gcc*
- name: Build linux_x86_64 wheel
run: |
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
30 changes: 15 additions & 15 deletions .github/workflows/macosx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,40 @@ jobs:
runs-on: macos-latest
strategy:
matrix:
python: [2.7, 3.5, 3.6, 3.7, 3.8, 3.9]
python: [3.5, 3.6, 3.7, 3.8, 3.9, "3.10"]
steps:
- uses: actions/checkout@v1
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install build dependencies
run: |
pip install --upgrade pip setuptools wheel
pip install --upgrade pip setuptools wheel build
brew install libxml2 libxmlsec1 pkg-config
- name: Build macosx_x86_64 wheel
run: |
python setup.py bdist_wheel
- name: Set environment variables
shell: bash
run: |
echo ::set-env name=PKGVER::$(python setup.py --version)
echo ::set-env name=LLVM_PROFILE_FILE::"pyxmlsec-%p.profraw"
- name: Install test dependencies
env:
CC: clang
CFLAGS: "-fprofile-instr-generate -fcoverage-mapping"
LDFLAGS: "-fprofile-instr-generate -fcoverage-mapping"
run: |
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: |
LIBFILE=$(python -c "import xmlsec; print(xmlsec.__file__)")
/Library/Developer/CommandLineTools/usr/bin/llvm-profdata merge -sparse pyxmlsec-*.profraw -output pyxmlsec.profdata
/Library/Developer/CommandLineTools/usr/bin/llvm-cov show ${LIBFILE} -instr-profile=pyxmlsec.profdata src > coverage.txt
/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 }} -instr-profile=pyxmlsec.profdata src > coverage.txt
bash <(curl -s https://codecov.io/bash) -f coverage.txt
48 changes: 48 additions & 0 deletions .github/workflows/manylinux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: manylinux
on: [push, pull_request]
jobs:
pep513:
runs-on: ubuntu-latest
strategy:
matrix:
python-abi: [cp36-cp36m, cp37-cp37m, cp38-cp38, cp39-cp39, cp310-cp310]
image:
- manylinux2010_x86_64
- manylinux_2_24_x86_64
- musllinux_1_1_x86_64
exclude:
- image: manylinux2010_x86_64
python-abi: cp310-cp310
- image: manylinux2010_i686
python-abi: cp310-cp310
container: quay.io/pypa/${{ matrix.image }}
steps:
- uses: actions/checkout@v1
- name: Install 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: 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
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
37 changes: 0 additions & 37 deletions .github/workflows/manylinux2010.yml

This file was deleted.

29 changes: 29 additions & 0 deletions .github/workflows/opensuse-tumbleweed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
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"]
steps:
- uses: actions/checkout@v1
- name: Install build dependencies
run: |
zypper -n install -t pattern devel_basis
PKGVER_NO_DOT=$(tr -d '.' <<< ${{ matrix.python-version }})
zypper -n install git libxmlsec1-openssl1 xmlsec1-openssl-devel python${PKGVER_NO_DOT}-devel python${PKGVER_NO_DOT}-pip
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 -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
9 changes: 5 additions & 4 deletions .github/workflows/sdist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ jobs:
sdist:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.9
uses: actions/setup-python@v2
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: 3.9
python-version: "3.10"
- name: Install build dependencies
run: |
pip install --upgrade pip setuptools wheel
Expand All @@ -20,6 +20,7 @@ jobs:
PYXMLSEC_STATIC_DEPS: true
run: |
pip install --upgrade -r requirements-test.txt
pip install black # for stub generation tests
pip install dist/xmlsec-$(python setup.py --version).tar.gz
- name: Run tests
run: |
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
!.travis*
!.appveyor*
!.git*
!.readthedocs.yml
!.readthedocs.yaml
!.pre-commit-config.yaml

# Python
/dist
Expand Down
48 changes: 48 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/psf/black
rev: 22.8.0
hooks:
- id: black
types: []
files: ^.*.pyi?$
exclude: ^doc/
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
hooks:
- id: no-commit-to-branch
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml
- id: check-added-large-files
- id: check-ast
- id: check-merge-conflict
- id: check-json
- id: detect-private-key
exclude: ^.*/rsakey.pem$
- id: mixed-line-ending
- id: pretty-format-json
args: [--autofix]
- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
hooks:
- id: flake8
exclude: ^setup.py$
additional_dependencies: [flake8-docstrings, flake8-bugbear, flake8-logging-format, flake8-builtins, flake8-eradicate, flake8-fixme, pep8-naming, flake8-pep3101, flake8-annotations-complexity,flake8-pyi]
- repo: https://github.com/PyCQA/isort
rev: 5.10.1
hooks:
- id: isort
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.981
hooks:
- id: mypy
exclude: (setup.py|tests/.*.py|doc/.*)
types: []
files: ^.*.pyi?$
additional_dependencies: [lxml-stubs,types-docutils]
- repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.9.0
hooks:
- id: rst-backticks
6 changes: 5 additions & 1 deletion .readthedocs.yml → .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
version: 2

build:
os: ubuntu-20.04
tools:
python: '3.9'

sphinx:
configuration: doc/source/conf.py

python:
version: 3.7
install:
- method: pip
path: .
Expand Down
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ notifications:
email: false
matrix:
include:
- python: 2.7
- python: 3.5
- python: 3.6
- python: 3.7
Expand Down
23 changes: 14 additions & 9 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,21 @@ python-xmlsec

.. image:: https://img.shields.io/pypi/v/xmlsec.svg?logo=python&logoColor=white
:target: https://pypi.python.org/pypi/xmlsec
.. image:: https://img.shields.io/travis/com/mehcode/python-xmlsec/master.svg?logo=travis&logoColor=white&label=Travis%20CI
:target: https://travis-ci.org/mehcode/python-xmlsec
.. image:: https://results.pre-commit.ci/badge/github/xmlsec/python-xmlsec/master.svg
:target: https://results.pre-commit.ci/latest/github/xmlsec/python-xmlsec/master
:alt: pre-commit.ci status
.. image:: https://img.shields.io/appveyor/ci/hoefling/xmlsec/master.svg?logo=appveyor&logoColor=white&label=AppVeyor
:target: https://ci.appveyor.com/project/hoefling/xmlsec
.. image:: https://github.com/mehcode/python-xmlsec/workflows/manylinux2010/badge.svg
:target: https://github.com/mehcode/python-xmlsec/actions?query=workflow%3A%22manylinux2010%22
.. image:: https://github.com/mehcode/python-xmlsec/workflows/MacOS/badge.svg
:target: https://github.com/mehcode/python-xmlsec/actions?query=workflow%3A%22MacOS%22
.. image:: https://codecov.io/gh/mehcode/python-xmlsec/branch/master/graph/badge.svg
:target: https://codecov.io/gh/mehcode/python-xmlsec
.. image:: https://github.com/mehcode/python-xmlsec/actions/workflows/manylinux.yml/badge.svg
:target: https://github.com/mehcode/python-xmlsec/actions/workflows/manylinux.yml
.. image:: https://github.com/mehcode/python-xmlsec/actions/workflows/macosx.yml/badge.svg
:target: https://github.com/mehcode/python-xmlsec/actions/workflows/macosx.yml
.. image:: https://github.com/mehcode/python-xmlsec/actions/workflows/linuxbrew.yml/badge.svg
:target: https://github.com/mehcode/python-xmlsec/actions/workflows/linuxbrew.yml
.. image:: https://github.com/mehcode/python-xmlsec/actions/workflows/opensuse-tumbleweed.yml/badge.svg
:target: https://github.com/mehcode/python-xmlsec/actions/workflows/opensuse-tumbleweed.yml
.. image:: https://codecov.io/gh/xmlsec/python-xmlsec/branch/master/graph/badge.svg
:target: https://codecov.io/gh/xmlsec/python-xmlsec
.. image:: https://img.shields.io/readthedocs/xmlsec/latest?logo=read-the-docs
:target: https://xmlsec.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
Expand Down Expand Up @@ -51,7 +56,7 @@ Linux (Debian)

.. code-block:: bash
apt-get install libxml2-dev libxmlsec1-dev libxmlsec1-openssl
apt-get install pkg-config libxml2-dev libxmlsec1-dev libxmlsec1-openssl
Note: There is no required version of LibXML2 for Ubuntu Precise,
Expand Down
2 changes: 1 addition & 1 deletion doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ help:
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
Loading

0 comments on commit d5f3947

Please sign in to comment.