xmlsec 1.3.14__tar.gz → 1.3.16__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (94) hide show
  1. {xmlsec-1.3.14 → xmlsec-1.3.16}/.pre-commit-config.yaml +5 -5
  2. xmlsec-1.3.16/PKG-INFO +278 -0
  3. {xmlsec-1.3.14 → xmlsec-1.3.16}/README.rst +6 -0
  4. {xmlsec-1.3.14 → xmlsec-1.3.16}/pyproject.toml +5 -4
  5. {xmlsec-1.3.14 → xmlsec-1.3.16}/setup.py +44 -50
  6. {xmlsec-1.3.14 → xmlsec-1.3.16}/src/enc.c +2 -2
  7. {xmlsec-1.3.14 → xmlsec-1.3.16/src/python_xmlsec1.egg-info}/PKG-INFO +5 -4
  8. xmlsec-1.3.16/src/python_xmlsec1.egg-info/SOURCES.txt +103 -0
  9. {xmlsec-1.3.14/src/xmlsec.egg-info → xmlsec-1.3.16/src/pyxmlsec.egg-info}/PKG-INFO +5 -4
  10. {xmlsec-1.3.14/src/xmlsec.egg-info → xmlsec-1.3.16/src/pyxmlsec.egg-info}/SOURCES.txt +17 -10
  11. xmlsec-1.3.16/src/pyxmlsec.egg-info/dependency_links.txt +1 -0
  12. xmlsec-1.3.16/src/pyxmlsec.egg-info/not-zip-safe +1 -0
  13. xmlsec-1.3.16/src/pyxmlsec.egg-info/requires.txt +1 -0
  14. xmlsec-1.3.16/src/pyxmlsec.egg-info/top_level.txt +1 -0
  15. xmlsec-1.3.16/src/xmlsec.cpython-39-darwin.so +0 -0
  16. xmlsec-1.3.16/src/xmlsec.egg-info/PKG-INFO +278 -0
  17. xmlsec-1.3.16/src/xmlsec.egg-info/SOURCES.txt +103 -0
  18. xmlsec-1.3.16/src/xmlsec.egg-info/dependency_links.txt +1 -0
  19. xmlsec-1.3.16/src/xmlsec.egg-info/not-zip-safe +1 -0
  20. xmlsec-1.3.16/src/xmlsec.egg-info/requires.txt +1 -0
  21. xmlsec-1.3.16/src/xmlsec.egg-info/top_level.txt +1 -0
  22. {xmlsec-1.3.14 → xmlsec-1.3.16}/.readthedocs.yaml +0 -0
  23. {xmlsec-1.3.14 → xmlsec-1.3.16}/LICENSE +0 -0
  24. {xmlsec-1.3.14 → xmlsec-1.3.16}/MANIFEST.in +0 -0
  25. {xmlsec-1.3.14 → xmlsec-1.3.16}/setup.cfg +0 -0
  26. {xmlsec-1.3.14 → xmlsec-1.3.16}/src/common.h +0 -0
  27. {xmlsec-1.3.14 → xmlsec-1.3.16}/src/constants.c +0 -0
  28. {xmlsec-1.3.14 → xmlsec-1.3.16}/src/constants.h +0 -0
  29. {xmlsec-1.3.14 → xmlsec-1.3.16}/src/debug.h +0 -0
  30. {xmlsec-1.3.14 → xmlsec-1.3.16}/src/ds.c +0 -0
  31. {xmlsec-1.3.14 → xmlsec-1.3.16}/src/exception.c +0 -0
  32. {xmlsec-1.3.14 → xmlsec-1.3.16}/src/exception.h +0 -0
  33. {xmlsec-1.3.14 → xmlsec-1.3.16}/src/keys.c +0 -0
  34. {xmlsec-1.3.14 → xmlsec-1.3.16}/src/keys.h +0 -0
  35. {xmlsec-1.3.14 → xmlsec-1.3.16}/src/lxml.c +0 -0
  36. {xmlsec-1.3.14 → xmlsec-1.3.16}/src/lxml.h +0 -0
  37. {xmlsec-1.3.14 → xmlsec-1.3.16}/src/main.c +0 -0
  38. {xmlsec-1.3.14 → xmlsec-1.3.16}/src/platform.h +0 -0
  39. {xmlsec-1.3.14/src/xmlsec.egg-info → xmlsec-1.3.16/src/python_xmlsec1.egg-info}/dependency_links.txt +0 -0
  40. {xmlsec-1.3.14/src/xmlsec.egg-info → xmlsec-1.3.16/src/python_xmlsec1.egg-info}/not-zip-safe +0 -0
  41. {xmlsec-1.3.14/src/xmlsec.egg-info → xmlsec-1.3.16/src/python_xmlsec1.egg-info}/requires.txt +0 -0
  42. {xmlsec-1.3.14/src/xmlsec.egg-info → xmlsec-1.3.16/src/python_xmlsec1.egg-info}/top_level.txt +0 -0
  43. {xmlsec-1.3.14 → xmlsec-1.3.16}/src/template.c +0 -0
  44. {xmlsec-1.3.14 → xmlsec-1.3.16}/src/tree.c +0 -0
  45. {xmlsec-1.3.14 → xmlsec-1.3.16}/src/utils.c +0 -0
  46. {xmlsec-1.3.14 → xmlsec-1.3.16}/src/utils.h +0 -0
  47. {xmlsec-1.3.14 → xmlsec-1.3.16}/src/xmlsec/__init__.pyi +0 -0
  48. {xmlsec-1.3.14 → xmlsec-1.3.16}/src/xmlsec/constants.pyi +0 -0
  49. {xmlsec-1.3.14 → xmlsec-1.3.16}/src/xmlsec/py.typed +0 -0
  50. {xmlsec-1.3.14 → xmlsec-1.3.16}/src/xmlsec/template.pyi +0 -0
  51. {xmlsec-1.3.14 → xmlsec-1.3.16}/src/xmlsec/tree.pyi +0 -0
  52. {xmlsec-1.3.14 → xmlsec-1.3.16}/tests/__init__.py +0 -0
  53. {xmlsec-1.3.14 → xmlsec-1.3.16}/tests/base.py +0 -0
  54. {xmlsec-1.3.14 → xmlsec-1.3.16}/tests/conftest.py +0 -0
  55. {xmlsec-1.3.14 → xmlsec-1.3.16}/tests/data/deskey.bin +0 -0
  56. {xmlsec-1.3.14 → xmlsec-1.3.16}/tests/data/doc.xml +0 -0
  57. {xmlsec-1.3.14 → xmlsec-1.3.16}/tests/data/dsacert.der +0 -0
  58. {xmlsec-1.3.14 → xmlsec-1.3.16}/tests/data/dsakey.der +0 -0
  59. {xmlsec-1.3.14 → xmlsec-1.3.16}/tests/data/enc1-in.xml +0 -0
  60. {xmlsec-1.3.14 → xmlsec-1.3.16}/tests/data/enc1-out.xml +0 -0
  61. {xmlsec-1.3.14 → xmlsec-1.3.16}/tests/data/enc2-in.xml +0 -0
  62. {xmlsec-1.3.14 → xmlsec-1.3.16}/tests/data/enc2-out.xml +0 -0
  63. {xmlsec-1.3.14 → xmlsec-1.3.16}/tests/data/enc3-in.xml +0 -0
  64. {xmlsec-1.3.14 → xmlsec-1.3.16}/tests/data/enc3-out.xml +0 -0
  65. {xmlsec-1.3.14 → xmlsec-1.3.16}/tests/data/enc_template.xml +0 -0
  66. {xmlsec-1.3.14 → xmlsec-1.3.16}/tests/data/rsacert.pem +0 -0
  67. {xmlsec-1.3.14 → xmlsec-1.3.16}/tests/data/rsakey.pem +0 -0
  68. {xmlsec-1.3.14 → xmlsec-1.3.16}/tests/data/rsapub.pem +0 -0
  69. {xmlsec-1.3.14 → xmlsec-1.3.16}/tests/data/sign1-in.xml +0 -0
  70. {xmlsec-1.3.14 → xmlsec-1.3.16}/tests/data/sign1-out.xml +0 -0
  71. {xmlsec-1.3.14 → xmlsec-1.3.16}/tests/data/sign2-in.xml +0 -0
  72. {xmlsec-1.3.14 → xmlsec-1.3.16}/tests/data/sign2-out.xml +0 -0
  73. {xmlsec-1.3.14 → xmlsec-1.3.16}/tests/data/sign3-in.xml +0 -0
  74. {xmlsec-1.3.14 → xmlsec-1.3.16}/tests/data/sign3-out.xml +0 -0
  75. {xmlsec-1.3.14 → xmlsec-1.3.16}/tests/data/sign4-in.xml +0 -0
  76. {xmlsec-1.3.14 → xmlsec-1.3.16}/tests/data/sign4-out.xml +0 -0
  77. {xmlsec-1.3.14 → xmlsec-1.3.16}/tests/data/sign5-in.xml +0 -0
  78. {xmlsec-1.3.14 → xmlsec-1.3.16}/tests/data/sign5-out-xmlsec_1_2_36_to_37.xml +0 -0
  79. {xmlsec-1.3.14 → xmlsec-1.3.16}/tests/data/sign5-out.xml +0 -0
  80. {xmlsec-1.3.14 → xmlsec-1.3.16}/tests/data/sign6-in.bin +0 -0
  81. {xmlsec-1.3.14 → xmlsec-1.3.16}/tests/data/sign6-out.bin +0 -0
  82. {xmlsec-1.3.14 → xmlsec-1.3.16}/tests/data/sign_template.xml +0 -0
  83. {xmlsec-1.3.14 → xmlsec-1.3.16}/tests/softhsm_setup.py +0 -0
  84. {xmlsec-1.3.14 → xmlsec-1.3.16}/tests/test_constants.py +0 -0
  85. {xmlsec-1.3.14 → xmlsec-1.3.16}/tests/test_doc_examples.py +0 -0
  86. {xmlsec-1.3.14 → xmlsec-1.3.16}/tests/test_ds.py +0 -0
  87. {xmlsec-1.3.14 → xmlsec-1.3.16}/tests/test_enc.py +0 -0
  88. {xmlsec-1.3.14 → xmlsec-1.3.16}/tests/test_keys.py +0 -0
  89. {xmlsec-1.3.14 → xmlsec-1.3.16}/tests/test_main.py +0 -0
  90. {xmlsec-1.3.14 → xmlsec-1.3.16}/tests/test_pkcs11.py +0 -0
  91. {xmlsec-1.3.14 → xmlsec-1.3.16}/tests/test_templates.py +0 -0
  92. {xmlsec-1.3.14 → xmlsec-1.3.16}/tests/test_tree.py +0 -0
  93. {xmlsec-1.3.14 → xmlsec-1.3.16}/tests/test_type_stubs.py +0 -0
  94. {xmlsec-1.3.14 → xmlsec-1.3.16}/tests/test_xmlsec.py +0 -0
@@ -2,14 +2,14 @@
2
2
  # See https://pre-commit.com/hooks.html for more hooks
3
3
  repos:
4
4
  - repo: https://github.com/psf/black
5
- rev: 24.3.0
5
+ rev: 25.1.0
6
6
  hooks:
7
7
  - id: black
8
8
  types: []
9
9
  files: ^.*.pyi?$
10
10
  exclude: ^doc/
11
11
  - repo: https://github.com/pre-commit/pre-commit-hooks
12
- rev: v4.6.0
12
+ rev: v5.0.0
13
13
  hooks:
14
14
  - id: no-commit-to-branch
15
15
  - id: trailing-whitespace
@@ -25,17 +25,17 @@ repos:
25
25
  - id: pretty-format-json
26
26
  args: [--autofix]
27
27
  - repo: https://github.com/PyCQA/flake8
28
- rev: 7.0.0
28
+ rev: 7.3.0
29
29
  hooks:
30
30
  - id: flake8
31
31
  exclude: ^setup.py$
32
32
  additional_dependencies: [flake8-docstrings, flake8-bugbear, flake8-logging-format, flake8-builtins, flake8-eradicate, flake8-fixme, pep8-naming, flake8-pep3101, flake8-annotations-complexity,flake8-pyi]
33
33
  - repo: https://github.com/PyCQA/isort
34
- rev: 5.13.2
34
+ rev: 6.0.1
35
35
  hooks:
36
36
  - id: isort
37
37
  - repo: https://github.com/pre-commit/mirrors-mypy
38
- rev: v1.9.0
38
+ rev: v1.16.1
39
39
  hooks:
40
40
  - id: mypy
41
41
  exclude: (setup.py|tests/.*.py|doc/.*)
xmlsec-1.3.16/PKG-INFO ADDED
@@ -0,0 +1,278 @@
1
+ Metadata-Version: 2.4
2
+ Name: xmlsec
3
+ Version: 1.3.16
4
+ Summary: Python bindings for the XML Security Library
5
+ Home-page: https://github.com/mehcode/python-xmlsec
6
+ Author: Bulat Gaifullin
7
+ Author-email: support@mehcode.com
8
+ Maintainer: Oleg Hoefling
9
+ Maintainer-email: oleg.hoefling@gmail.com
10
+ License: MIT
11
+ Project-URL: Documentation, https://xmlsec.readthedocs.io
12
+ Project-URL: Source, https://github.com/mehcode/python-xmlsec
13
+ Project-URL: Changelog, https://github.com/mehcode/python-xmlsec/releases
14
+ Keywords: xmlsec
15
+ Classifier: Development Status :: 5 - Production/Stable
16
+ Classifier: Intended Audience :: Developers
17
+ Classifier: Intended Audience :: System Administrators
18
+ Classifier: License :: OSI Approved :: MIT License
19
+ Classifier: Operating System :: OS Independent
20
+ Classifier: Programming Language :: C
21
+ Classifier: Programming Language :: Python :: 3
22
+ Classifier: Programming Language :: Python :: 3.5
23
+ Classifier: Programming Language :: Python :: 3.6
24
+ Classifier: Programming Language :: Python :: 3.7
25
+ Classifier: Programming Language :: Python :: 3.8
26
+ Classifier: Programming Language :: Python :: 3.9
27
+ Classifier: Programming Language :: Python :: 3.11
28
+ Classifier: Topic :: Text Processing :: Markup :: XML
29
+ Classifier: Typing :: Typed
30
+ Requires-Python: >=3.5
31
+ Description-Content-Type: text/markdown
32
+ License-File: LICENSE
33
+ Requires-Dist: lxml>=3.8
34
+ Dynamic: author
35
+ Dynamic: author-email
36
+ Dynamic: classifier
37
+ Dynamic: description
38
+ Dynamic: description-content-type
39
+ Dynamic: home-page
40
+ Dynamic: keywords
41
+ Dynamic: license
42
+ Dynamic: license-file
43
+ Dynamic: maintainer
44
+ Dynamic: maintainer-email
45
+ Dynamic: project-url
46
+ Dynamic: requires-dist
47
+ Dynamic: requires-python
48
+ Dynamic: summary
49
+
50
+ python-xmlsec
51
+ =============
52
+
53
+ .. image:: https://img.shields.io/pypi/v/xmlsec.svg?logo=python&logoColor=white
54
+ :target: https://pypi.python.org/pypi/xmlsec
55
+ .. image:: https://results.pre-commit.ci/badge/github/xmlsec/python-xmlsec/master.svg
56
+ :target: https://results.pre-commit.ci/latest/github/xmlsec/python-xmlsec/master
57
+ :alt: pre-commit.ci status
58
+ .. image:: https://img.shields.io/appveyor/ci/hoefling/xmlsec/master.svg?logo=appveyor&logoColor=white&label=AppVeyor
59
+ :target: https://ci.appveyor.com/project/hoefling/xmlsec
60
+ .. image:: https://github.com/mehcode/python-xmlsec/actions/workflows/manylinux.yml/badge.svg
61
+ :target: https://github.com/mehcode/python-xmlsec/actions/workflows/manylinux.yml
62
+ .. image:: https://github.com/mehcode/python-xmlsec/actions/workflows/macosx.yml/badge.svg
63
+ :target: https://github.com/mehcode/python-xmlsec/actions/workflows/macosx.yml
64
+ .. image:: https://github.com/mehcode/python-xmlsec/actions/workflows/linuxbrew.yml/badge.svg
65
+ :target: https://github.com/mehcode/python-xmlsec/actions/workflows/linuxbrew.yml
66
+ .. image:: https://github.com/mehcode/python-xmlsec/actions/workflows/opensuse-tumbleweed.yml/badge.svg
67
+ :target: https://github.com/mehcode/python-xmlsec/actions/workflows/opensuse-tumbleweed.yml
68
+ .. image:: https://codecov.io/gh/xmlsec/python-xmlsec/branch/master/graph/badge.svg
69
+ :target: https://codecov.io/gh/xmlsec/python-xmlsec
70
+ .. image:: https://img.shields.io/readthedocs/xmlsec/latest?logo=read-the-docs
71
+ :target: https://xmlsec.readthedocs.io/en/latest/?badge=latest
72
+ :alt: Documentation Status
73
+
74
+ Python bindings for the `XML Security Library <https://www.aleksey.com/xmlsec/>`_.
75
+
76
+ Documentation
77
+ *************
78
+
79
+ A documentation for ``xmlsec`` can be found at `xmlsec.readthedocs.io <https://xmlsec.readthedocs.io/>`_.
80
+
81
+ Usage
82
+ *****
83
+
84
+ Check the `examples <https://xmlsec.readthedocs.io/en/latest/examples.html>`_ section in the documentation to see various examples of signing and verifying using the library.
85
+
86
+ Requirements
87
+ ************
88
+ - ``libxml2 >= 2.9.1``
89
+ - ``libxmlsec1 >= 1.2.33``
90
+
91
+ Install
92
+ *******
93
+
94
+ ``xmlsec`` is available on PyPI:
95
+
96
+ .. code-block:: bash
97
+
98
+ pip install xmlsec
99
+
100
+ Depending on your OS, you may need to install the required native
101
+ libraries first:
102
+
103
+ Linux (Debian)
104
+ ^^^^^^^^^^^^^^
105
+
106
+ .. code-block:: bash
107
+
108
+ apt-get install pkg-config libxml2-dev libxmlsec1-dev libxmlsec1-openssl
109
+
110
+
111
+ Note: There is no required version of LibXML2 for Ubuntu Precise,
112
+ so you need to download and install it manually.
113
+
114
+ .. code-block:: bash
115
+
116
+ wget http://xmlsoft.org/sources/libxml2-2.9.1.tar.gz
117
+ tar -xvf libxml2-2.9.1.tar.gz
118
+ cd libxml2-2.9.1
119
+ ./configure && make && make install
120
+
121
+
122
+ Linux (CentOS)
123
+ ^^^^^^^^^^^^^^
124
+
125
+ .. code-block:: bash
126
+
127
+ yum install libxml2-devel xmlsec1-devel xmlsec1-openssl-devel libtool-ltdl-devel
128
+
129
+
130
+ Linux (Fedora)
131
+ ^^^^^^^^^^^^^^
132
+
133
+ .. code-block:: bash
134
+
135
+ dnf install libxml2-devel xmlsec1-devel xmlsec1-openssl-devel libtool-ltdl-devel
136
+
137
+
138
+ Mac
139
+ ^^^
140
+
141
+ .. code-block:: bash
142
+
143
+ brew install libxml2 libxmlsec1 pkg-config
144
+
145
+ or
146
+
147
+ .. code-block:: bash
148
+
149
+ port install libxml2 xmlsec pkgconfig
150
+
151
+
152
+ Alpine
153
+ ^^^^^^
154
+
155
+ .. code-block:: bash
156
+
157
+ apk add build-base libressl libffi-dev libressl-dev libxslt-dev libxml2-dev xmlsec-dev xmlsec
158
+
159
+
160
+ Troubleshooting
161
+ ***************
162
+
163
+ Mac
164
+ ^^^
165
+
166
+ If you get any fatal errors about missing ``.h`` files, update your
167
+ ``C_INCLUDE_PATH`` environment variable to include the appropriate
168
+ files from the ``libxml2`` and ``libxmlsec1`` libraries.
169
+
170
+
171
+ Windows
172
+ ^^^^^^^
173
+
174
+ Starting with 1.3.7, prebuilt wheels are available for Windows,
175
+ so running ``pip install xmlsec`` should suffice. If you want
176
+ to build from source:
177
+
178
+ #. Configure build environment, see `wiki.python.org <https://wiki.python.org/moin/WindowsCompilers>`_ for more details.
179
+
180
+ #. Install from source dist:
181
+
182
+ .. code-block:: bash
183
+
184
+ pip install xmlsec --no-binary=xmlsec
185
+
186
+
187
+ Building from source
188
+ ********************
189
+
190
+ #. Clone the ``xmlsec`` source code repository to your local computer.
191
+
192
+ .. code-block:: bash
193
+
194
+ git clone https://github.com/xmlsec/python-xmlsec.git
195
+
196
+ #. Change into the ``python-xmlsec`` root directory.
197
+
198
+ .. code-block:: bash
199
+
200
+ cd /path/to/xmlsec
201
+
202
+
203
+ #. Install the project and all its dependencies using ``pip``.
204
+
205
+ .. code-block:: bash
206
+
207
+ pip install .
208
+
209
+
210
+ Contributing
211
+ ************
212
+
213
+ Setting up your environment
214
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^
215
+
216
+ #. Follow steps 1 and 2 of the `manual installation instructions <#building-from-source>`_.
217
+
218
+
219
+ #. Initialize a virtual environment to develop in.
220
+ This is done so as to ensure every contributor is working with
221
+ close-to-identicial versions of packages.
222
+
223
+ .. code-block:: bash
224
+
225
+ mkvirtualenv xmlsec
226
+
227
+ The ``mkvirtualenv`` command is available from ``virtualenvwrapper`` package which can be installed by following `link <http://virtualenvwrapper.readthedocs.org/en/latest/install.html#basic-installation>`_.
228
+
229
+ #. Activate the created virtual environment:
230
+
231
+ .. code-block:: bash
232
+
233
+ workon xmlsec
234
+
235
+ #. Install ``xmlsec`` in development mode with testing enabled.
236
+ This will download all dependencies required for running the unit tests.
237
+
238
+ .. code-block:: bash
239
+
240
+ pip install -r requirements-test.txt
241
+ pip install -e "."
242
+
243
+
244
+ Running the test suite
245
+ ^^^^^^^^^^^^^^^^^^^^^^
246
+
247
+ #. `Set up your environment <#setting-up-your-environment>`_.
248
+
249
+ #. Run the unit tests.
250
+
251
+ .. code-block:: bash
252
+
253
+ pytest tests
254
+
255
+ #. Tests configuration
256
+
257
+ Env variable ``PYXMLSEC_TEST_ITERATIONS`` specifies number of
258
+ test iterations to detect memory leaks.
259
+
260
+ Reporting an issue
261
+ ^^^^^^^^^^^^^^^^^^
262
+
263
+ Please attach the output of following information:
264
+
265
+ * version of ``xmlsec``
266
+ * version of ``libxmlsec1``
267
+ * version of ``libxml2``
268
+ * output from the command
269
+
270
+ .. code-block:: bash
271
+
272
+ pkg-config --cflags xmlsec1
273
+
274
+ License
275
+ *******
276
+
277
+ Unless otherwise noted, all files contained within this project are licensed under the MIT opensource license.
278
+ See the included ``LICENSE`` file or visit `opensource.org <http://opensource.org/licenses/MIT>`_ for more information.
@@ -93,6 +93,12 @@ Mac
93
93
 
94
94
  brew install libxml2 libxmlsec1 pkg-config
95
95
 
96
+ or
97
+
98
+ .. code-block:: bash
99
+
100
+ port install libxml2 xmlsec pkgconfig
101
+
96
102
 
97
103
  Alpine
98
104
  ^^^^^^
@@ -54,10 +54,11 @@ skip = [
54
54
  "*-musllinux_i686",
55
55
  # LXML doesn't publish wheels for these platforms, which makes it
56
56
  # difficult for us to build wheels, so we exclude them.
57
- "cp36-manylinux_aarch64",
58
- "cp37-manylinux_aarch64",
59
- "cp36-musllinux_aarch64",
60
- "cp37-musllinux_aarch64",
57
+ "cp36-*",
58
+ "cp37-*",
59
+ "cp38-manylinux_aarch64",
60
+ "cp38-musllinux_aarch64",
61
+ "cp38-macosx*",
61
62
  ]
62
63
  test-command = "pytest -v --color=yes {package}/tests"
63
64
  before-test = "pip install -r requirements-test.txt"
@@ -4,6 +4,7 @@ import io
4
4
  import json
5
5
  import multiprocessing
6
6
  import os
7
+ import platform
7
8
  import re
8
9
  import subprocess
9
10
  import sys
@@ -70,22 +71,18 @@ def latest_release_from_gnome_org_cache(url, lib_name):
70
71
  return '{}/{}'.format(url, latest_source)
71
72
 
72
73
 
73
- def latest_release_from_github_api(repo):
74
- api_url = 'https://api.github.com/repos/{}/releases'.format(repo)
74
+ def latest_release_json_from_github_api(repo):
75
+ api_url = 'https://api.github.com/repos/{}/releases/latest'.format(repo)
75
76
 
76
77
  # if we are running in CI, pass along the GH_TOKEN, so we don't get rate limited
77
78
  token = os.environ.get("GH_TOKEN")
78
79
  if token:
79
80
  log.info("Using GitHub token to avoid rate limiting")
80
- api_releases = make_request(api_url, token, json_response=True)
81
- releases = [r['tarball_url'] for r in api_releases if r['prerelease'] is False and r['draft'] is False]
82
- if not releases:
83
- raise DistutilsError('No release found for {}'.format(repo))
84
- return releases[0]
81
+ return make_request(api_url, token, json_response=True)
85
82
 
86
83
 
87
84
  def latest_openssl_release():
88
- return latest_release_from_github_api('openssl/openssl')
85
+ return latest_release_json_from_github_api('openssl/openssl')['tarball_url']
89
86
 
90
87
 
91
88
  def latest_zlib_release():
@@ -105,7 +102,9 @@ def latest_libxslt_release():
105
102
 
106
103
 
107
104
  def latest_xmlsec_release():
108
- return latest_release_from_html('https://www.aleksey.com/xmlsec/download/', re.compile('xmlsec1-(?P<version>.*).tar.gz'))
105
+ assets = latest_release_json_from_github_api('lsh123/xmlsec')['assets']
106
+ (tar_gz,) = [asset for asset in assets if asset['name'].endswith('.tar.gz')]
107
+ return tar_gz['browser_download_url']
109
108
 
110
109
 
111
110
  class CrossCompileInfo:
@@ -213,19 +212,21 @@ class build_ext(build_ext_orig):
213
212
  super(build_ext, self).run()
214
213
 
215
214
  def prepare_static_build_win(self):
216
- release_url = 'https://github.com/mxamin/python-xmlsec-win-binaries/releases/download/2024.04.17/'
217
- if sys.maxsize > 2147483647: # 2.0 GiB
215
+ release_url = 'https://github.com/mxamin/python-xmlsec-win-binaries/releases/download/2025.07.10/'
216
+ if platform.machine() == 'ARM64':
217
+ suffix = 'win-arm64'
218
+ elif sys.maxsize > 2**32: # 2.0 GiB
218
219
  suffix = 'win64'
219
220
  else:
220
221
  suffix = 'win32'
221
222
 
222
223
  libs = [
223
- 'libxml2-2.11.7.{}.zip'.format(suffix),
224
- 'libxslt-1.1.37.{}.zip'.format(suffix),
225
- 'zlib-1.2.12.{}.zip'.format(suffix),
226
- 'iconv-1.16-1.{}.zip'.format(suffix),
227
- 'openssl-3.0.8.{}.zip'.format(suffix),
228
- 'xmlsec-1.3.4.{}.zip'.format(suffix),
224
+ 'libxml2-2.11.9-3.{}.zip'.format(suffix),
225
+ 'libxslt-1.1.39.{}.zip'.format(suffix),
226
+ 'zlib-1.3.1.{}.zip'.format(suffix),
227
+ 'iconv-1.18-1.{}.zip'.format(suffix),
228
+ 'openssl-3.0.16.pl1.{}.zip'.format(suffix),
229
+ 'xmlsec-1.3.7.{}.zip'.format(suffix),
229
230
  ]
230
231
 
231
232
  for libfile in libs:
@@ -381,7 +382,7 @@ class build_ext(build_ext_orig):
381
382
  url = latest_xmlsec_release()
382
383
  self.info('{:10}: {}'.format('xmlsec1', 'PYXMLSEC_XMLSEC1_VERSION unset, downloading latest from {}'.format(url)))
383
384
  else:
384
- url = 'https://www.aleksey.com/xmlsec/download/xmlsec1-{}.tar.gz'.format(self.xmlsec1_version)
385
+ url = 'https://github.com/lsh123/xmlsec/releases/download/{v}/xmlsec1-{v}.tar.gz'.format(v=self.xmlsec1_version)
385
386
  self.info(
386
387
  '{:10}: {}'.format(
387
388
  'xmlsec1', 'PYXMLSEC_XMLSEC1_VERSION={}, downloading from {}'.format(self.xmlsec1_version, url)
@@ -435,43 +436,41 @@ class build_ext(build_ext_orig):
435
436
  openssl_config_cmd.append(cross_compiling.triplet)
436
437
  else:
437
438
  openssl_config_cmd.insert(0, './config')
438
- subprocess.check_output(openssl_config_cmd, cwd=str(openssl_dir), env=env)
439
- subprocess.check_output(['make', '-j{}'.format(multiprocessing.cpu_count() + 1)], cwd=str(openssl_dir), env=env)
440
- subprocess.check_output(
439
+ subprocess.check_call(openssl_config_cmd, cwd=str(openssl_dir), env=env)
440
+ subprocess.check_call(['make', '-j{}'.format(multiprocessing.cpu_count() + 1)], cwd=str(openssl_dir), env=env)
441
+ subprocess.check_call(
441
442
  ['make', '-j{}'.format(multiprocessing.cpu_count() + 1), 'install_sw'], cwd=str(openssl_dir), env=env
442
443
  )
443
444
 
444
445
  self.info('Building zlib')
445
446
  zlib_dir = next(self.build_libs_dir.glob('zlib-*'))
446
- subprocess.check_output(['./configure', prefix_arg], cwd=str(zlib_dir), env=env)
447
- subprocess.check_output(['make', '-j{}'.format(multiprocessing.cpu_count() + 1)], cwd=str(zlib_dir), env=env)
448
- subprocess.check_output(['make', '-j{}'.format(multiprocessing.cpu_count() + 1), 'install'], cwd=str(zlib_dir), env=env)
447
+ subprocess.check_call(['./configure', prefix_arg], cwd=str(zlib_dir), env=env)
448
+ subprocess.check_call(['make', '-j{}'.format(multiprocessing.cpu_count() + 1)], cwd=str(zlib_dir), env=env)
449
+ subprocess.check_call(['make', '-j{}'.format(multiprocessing.cpu_count() + 1), 'install'], cwd=str(zlib_dir), env=env)
449
450
 
450
- host_arg = ""
451
+ host_arg = []
451
452
  if cross_compiling:
452
- host_arg = '--host={}'.format(cross_compiling.arch)
453
+ host_arg = ['--host={}'.format(cross_compiling.arch)]
453
454
 
454
455
  self.info('Building libiconv')
455
456
  libiconv_dir = next(self.build_libs_dir.glob('libiconv-*'))
456
- subprocess.check_output(
457
+ subprocess.check_call(
457
458
  [
458
459
  './configure',
459
460
  prefix_arg,
460
461
  '--disable-dependency-tracking',
461
462
  '--disable-shared',
462
- host_arg,
463
+ *host_arg,
463
464
  ],
464
465
  cwd=str(libiconv_dir),
465
466
  env=env,
466
467
  )
467
- subprocess.check_output(['make', '-j{}'.format(multiprocessing.cpu_count() + 1)], cwd=str(libiconv_dir), env=env)
468
- subprocess.check_output(
469
- ['make', '-j{}'.format(multiprocessing.cpu_count() + 1), 'install'], cwd=str(libiconv_dir), env=env
470
- )
468
+ subprocess.check_call(['make', '-j{}'.format(multiprocessing.cpu_count() + 1)], cwd=str(libiconv_dir), env=env)
469
+ subprocess.check_call(['make', '-j{}'.format(multiprocessing.cpu_count() + 1), 'install'], cwd=str(libiconv_dir), env=env)
471
470
 
472
471
  self.info('Building LibXML2')
473
472
  libxml2_dir = next(self.build_libs_dir.glob('libxml2-*'))
474
- subprocess.check_output(
473
+ subprocess.check_call(
475
474
  [
476
475
  './configure',
477
476
  prefix_arg,
@@ -481,19 +480,17 @@ class build_ext(build_ext_orig):
481
480
  '--without-python',
482
481
  '--with-iconv={}'.format(self.prefix_dir),
483
482
  '--with-zlib={}'.format(self.prefix_dir),
484
- host_arg,
483
+ *host_arg,
485
484
  ],
486
485
  cwd=str(libxml2_dir),
487
486
  env=env,
488
487
  )
489
- subprocess.check_output(['make', '-j{}'.format(multiprocessing.cpu_count() + 1)], cwd=str(libxml2_dir), env=env)
490
- subprocess.check_output(
491
- ['make', '-j{}'.format(multiprocessing.cpu_count() + 1), 'install'], cwd=str(libxml2_dir), env=env
492
- )
488
+ subprocess.check_call(['make', '-j{}'.format(multiprocessing.cpu_count() + 1)], cwd=str(libxml2_dir), env=env)
489
+ subprocess.check_call(['make', '-j{}'.format(multiprocessing.cpu_count() + 1), 'install'], cwd=str(libxml2_dir), env=env)
493
490
 
494
491
  self.info('Building libxslt')
495
492
  libxslt_dir = next(self.build_libs_dir.glob('libxslt-*'))
496
- subprocess.check_output(
493
+ subprocess.check_call(
497
494
  [
498
495
  './configure',
499
496
  prefix_arg,
@@ -502,27 +499,26 @@ class build_ext(build_ext_orig):
502
499
  '--without-python',
503
500
  '--without-crypto',
504
501
  '--with-libxml-prefix={}'.format(self.prefix_dir),
505
- host_arg,
502
+ *host_arg,
506
503
  ],
507
504
  cwd=str(libxslt_dir),
508
505
  env=env,
509
506
  )
510
- subprocess.check_output(['make', '-j{}'.format(multiprocessing.cpu_count() + 1)], cwd=str(libxslt_dir), env=env)
511
- subprocess.check_output(
512
- ['make', '-j{}'.format(multiprocessing.cpu_count() + 1), 'install'], cwd=str(libxslt_dir), env=env
513
- )
507
+ subprocess.check_call(['make', '-j{}'.format(multiprocessing.cpu_count() + 1)], cwd=str(libxslt_dir), env=env)
508
+ subprocess.check_call(['make', '-j{}'.format(multiprocessing.cpu_count() + 1), 'install'], cwd=str(libxslt_dir), env=env)
514
509
 
515
510
  self.info('Building xmlsec1')
516
511
  ldflags.append('-lpthread')
517
512
  env['LDFLAGS'] = ' '.join(ldflags)
518
513
  xmlsec1_dir = next(self.build_libs_dir.glob('xmlsec1-*'))
519
- subprocess.check_output(
514
+ subprocess.check_call(
520
515
  [
521
516
  './configure',
522
517
  prefix_arg,
523
518
  '--disable-shared',
524
519
  '--disable-gost',
525
520
  '--enable-md5',
521
+ '--enable-ripemd160',
526
522
  '--disable-crypto-dl',
527
523
  '--enable-static=yes',
528
524
  '--enable-shared=no',
@@ -531,20 +527,18 @@ class build_ext(build_ext_orig):
531
527
  '--with-openssl={}'.format(self.prefix_dir),
532
528
  '--with-libxml={}'.format(self.prefix_dir),
533
529
  '--with-libxslt={}'.format(self.prefix_dir),
534
- host_arg,
530
+ *host_arg,
535
531
  ],
536
532
  cwd=str(xmlsec1_dir),
537
533
  env=env,
538
534
  )
539
- subprocess.check_output(
535
+ subprocess.check_call(
540
536
  ['make', '-j{}'.format(multiprocessing.cpu_count() + 1)]
541
537
  + ['-I{}'.format(str(self.prefix_dir / 'include')), '-I{}'.format(str(self.prefix_dir / 'include' / 'libxml'))],
542
538
  cwd=str(xmlsec1_dir),
543
539
  env=env,
544
540
  )
545
- subprocess.check_output(
546
- ['make', '-j{}'.format(multiprocessing.cpu_count() + 1), 'install'], cwd=str(xmlsec1_dir), env=env
547
- )
541
+ subprocess.check_call(['make', '-j{}'.format(multiprocessing.cpu_count() + 1), 'install'], cwd=str(xmlsec1_dir), env=env)
548
542
 
549
543
  ext = self.ext_map['xmlsec']
550
544
  ext.define_macros = [
@@ -195,7 +195,7 @@ ON_FAIL:
195
195
 
196
196
  // release the replaced nodes in a way safe for `lxml`
197
197
  static void PyXmlSec_ClearReplacedNodes(xmlSecEncCtxPtr ctx, PyXmlSec_LxmlDocumentPtr doc) {
198
- PyXmlSec_LxmlElementPtr* elem;
198
+ PyXmlSec_LxmlElementPtr elem;
199
199
  // release the replaced nodes in a way safe for `lxml`
200
200
  xmlNodePtr n = ctx->replacedNodeList;
201
201
  xmlNodePtr nn;
@@ -204,7 +204,7 @@ static void PyXmlSec_ClearReplacedNodes(xmlSecEncCtxPtr ctx, PyXmlSec_LxmlDocume
204
204
  PYXMLSEC_DEBUGF("clear replaced node %p", n);
205
205
  nn = n->next;
206
206
  // if n has references, it will not be deleted
207
- elem = PyXmlSec_elementFactory(doc, n);
207
+ elem = (PyXmlSec_LxmlElementPtr)PyXmlSec_elementFactory(doc, n);
208
208
  if (NULL == elem)
209
209
  xmlFreeNode(n);
210
210
  else
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
- Name: xmlsec
3
- Version: 1.3.14
2
+ Name: python-xmlsec1
3
+ Version: 1.3.14rc1
4
4
  Summary: Python bindings for the XML Security Library
5
5
  Home-page: https://github.com/mehcode/python-xmlsec
6
6
  Author: Bulat Gaifullin
@@ -12,6 +12,7 @@ Project-URL: Documentation, https://xmlsec.readthedocs.io
12
12
  Project-URL: Source, https://github.com/mehcode/python-xmlsec
13
13
  Project-URL: Changelog, https://github.com/mehcode/python-xmlsec/releases
14
14
  Keywords: xmlsec
15
+ Platform: UNKNOWN
15
16
  Classifier: Development Status :: 5 - Production/Stable
16
17
  Classifier: Intended Audience :: Developers
17
18
  Classifier: Intended Audience :: System Administrators
@@ -28,9 +29,7 @@ Classifier: Programming Language :: Python :: 3.11
28
29
  Classifier: Topic :: Text Processing :: Markup :: XML
29
30
  Classifier: Typing :: Typed
30
31
  Requires-Python: >=3.5
31
- Description-Content-Type: text/markdown
32
32
  License-File: LICENSE
33
- Requires-Dist: lxml>=3.8
34
33
 
35
34
  python-xmlsec
36
35
  =============
@@ -255,3 +254,5 @@ License
255
254
 
256
255
  Unless otherwise noted, all files contained within this project are licensed under the MIT opensource license.
257
256
  See the included ``LICENSE`` file or visit `opensource.org <http://opensource.org/licenses/MIT>`_ for more information.
257
+
258
+