1
0
mirror of https://gitlab.gnome.org/GNOME/libxslt synced 2025-06-12 12:21:55 +03:00
Commit Graph

153 Commits

Author SHA1 Message Date
c65a7c05f9 build: Remove mem-debug option
This is an ancient, internal debugging option which only works if
libxml2 is built with mem-debug as well. Remove the option to avoid
crashes.

Fixes #105.
2024-01-30 13:02:45 +01:00
d679f4470d functions: Fix build if libxml2 modules are disabled 2023-12-29 00:44:17 +01:00
405e3e1980 python: Make sure to distribute new files
Add pyproject.toml and tests/setup_test.py to Makefile.am.
2023-11-16 13:58:16 +01:00
1534c167fc python: Make it compatible with python3.12
Python 3.12 removes distutils so it's mandatory to use setuptools with
python >= 3.12.

This patch prints a message when trying to run the setup.py script with
a python >= 3.12 without setuptools and try to use the setuptools import
by default.

This patch also creates a new file, pyproject.toml [1], to prepare for
building in modern systems.

[1] https://peps.python.org/pep-0517/
2023-10-24 07:41:28 +02:00
99f2036bd2 python: Don't set deprecated global 2023-09-21 03:29:28 +02:00
8c2e8031b2 python: Fix tests on MinGW
Add the directories containing required DLLs with os.add_dll_directory
to make tests work on MinGW.
2023-09-05 17:00:41 +02:00
6bbef7f3b7 python: Remove temp file when running tests/basic.py
Fixes make distcheck.
2023-04-26 16:37:28 +02:00
eaa68b7738 xsltlocale: Make API platform-independent
Make xsltlocale.h more private. This really is an internal header.

Use LCMapStringW on Windows. Make the API platform-independent by
passing locales as `void *`.

Add support for custom locale handlers in a transform context. Update
ICU example to use these handlers.
2023-01-09 18:34:29 +01:00
e85d9dc54f build: Add a distutils-based build system for the Python bits
This is a streamlined version of the libxml2 setup.py.in that is
adapted for libxslt so that one can build the Python bindings and build
wheels easily, especially for Windows builds.

This will bundle the libxslt and libexslt DLLs, which matters more for
Python 3.8.x and later on Windows, where the dependent DLLs need to be
found at where the .pyd files are located unless one uses
os.add_dll_directory(); the libxml2 (and its dependent DLLs) should be
located with the libxml2-python package.
2022-11-21 16:14:31 +08:00
983e5fc41e python/types.c: Fix building against older libxml2
The XML_IGNORE_FPTR_CAST_WARNINGS and XML_POP_WARNINGS macros were added very
recently, so define them as nothing if they aren't defined upon including the
libxml2 headers.
2022-11-21 12:40:22 +08:00
966296cb9b python/libxslt.c: Replace ssize_t with Py_ssize_t
This ensures that we have the ssize_t that we want on all compilers supported
by Python, since ssize_t is not supported on Visual Studio, for instance, since
it is a POSIX type.
2022-11-21 12:38:53 +08:00
971d5c4dd1 tests: Port most of the test suite to C
Use runtest.c from libxml2 as a starting point.

This finally allows us to run most of tests with CMake and Autotools
VPATH builds.
2022-09-07 22:18:55 +02:00
cc64f2a78b tests: Fix out-of-tree Python tests 2022-09-07 21:09:51 +02:00
5e38ecc864 autotools: Fix Python tests in VPATH builds 2022-09-06 17:32:01 +02:00
f47413d137 autotools: Disable parallel Python build
See ea8f7c92a9
2022-09-06 17:32:01 +02:00
f9a0817b20 autotools: Use AM_CFLAGS consistently
Don't pollute CFLAGS. Always add LIBXML_CFLAGS and LIBXSLT_CFLAGS.
2022-09-06 17:32:01 +02:00
d5238cf0a2 python: Don't output missing generators during build 2022-09-06 17:32:01 +02:00
1dd4a2285f python: Fix build on Windows
- Don't pollute LDFLAGS
- Also check for MSYS
2022-09-06 15:00:48 +02:00
5443ca169c python: Support Python 3 on Windows
Copy updated implementation of PyFileGET from libxml2.
2022-09-06 15:00:48 +02:00
a0623d9f7a Fix various compiler warnings 2022-09-01 08:19:00 +02:00
33023085bf Disable Python bindings for debugger
Most of the functions couldn't be used from Python anyway.

Fixes #75.
2022-08-31 17:42:12 +02:00
fc3601b906 Set library path when running Python tests
Copied from libxml2.

Should fix #75.
2022-08-29 20:44:20 +02:00
43e3b41def Migrate from PyEval_ to PyObject_
PyEval_ functions are deprecated.
2022-08-29 17:23:35 +02:00
0d48888bc8 Also clean up __pycache__ 2022-08-29 16:29:34 +02:00
7a4a1c63f0 Remove generated files from distribution
- libxslt.spec
- python/libxslt.py

Also prefer 'dist_' prefix over EXTRA_DIST.
2022-08-29 16:29:34 +02:00
940e59939d Don't mess with xmlDefaultSAXHandler
This is deprecated and shouldn't have any effect.
2022-08-26 04:32:18 +02:00
3f3e888f1a Add missing compile definition for static builds to Autotools
Related to eaa53788 and 29923816

Closes #73
2022-08-20 13:50:46 -04:00
36bbe5ab3c Remove case labels with XPointer location types 2022-04-21 04:56:49 +02:00
02c6ce836c Use portable python shebangs
* In conda or Gentoo Prefix, we don't want to use the system python and
  instead rely on PATH lookup.
2022-04-05 11:45:23 +02:00
b06c0ba5ba python/Makefile.am: nest python docs in $(docdir) 2022-04-02 14:30:15 +02:00
23012544eb python/Makefile.am: rely on global AM_INIT_AUTOMAKE
* Even Debian oldoldstable has Automake 1.15 available nowadays.
2022-04-02 14:30:14 +02:00
a5a32b9382 Use AM_PATH_PYTHON/PKG_CHECK_MODULES for python bindings
* `AM_PATH_PYTHON` is a much more common idiom for building
  and installing python modules than writing your own.
* It also makes cross-compiling the python bindings possible.
  Previously the `PYTHON_CFLAGS`/`PYTHON_LIBS` would have been
  based on the `--build` python and not the `--host` python.
  By using `pkg-config`, we can always redirect the python-X.Y.pc.
2022-04-02 13:17:54 +02:00
22f12ce58e Stop calling deprecated libxml2 init functions 2022-03-18 15:38:40 +01:00
05cea0c72c Update links
Documentation and releases are now available on gitlab.gnome.org.
2022-02-14 22:31:18 +01:00
b3076bccdb Finish and clean up Python 3 support
- Handle Python 3 types similar to libxml2
- Copy new versions of libxml_xmlXPathDestructNsNode and
  libxml_xmlXPathObjectPtrConvert from libxml2
- Fix compiler warnings
- Fix whitespace
- Remove unneeded imports from __future__
- Remove test in extelem.py (StringIO can't be converted to FILE under
  Python 3)
- string.lower() works in both Python 2 and 3

Closes #25.
2020-11-19 17:59:37 +01:00
a2db8da1ac Initial support for Python 3
Squashed merge of pull request !19.
2020-11-19 17:08:37 +01:00
e9709fa901 Candidate release 1 of libxslt 1.1.34
* doc/xsltproc.xml: moved to new place for docbook stylesheet and work
  around a missing / inrewrite of  docbook xsl catalog in Fedora 30
* tests/fuzz/Makefile.am: add fuzz.h to sources
* python/Makefile.am: there is no more TODO
* libxslt.spec.in: run make tests instead of check to avoid fuzz in that
  environment, and drop python TODO
2019-10-23 20:49:08 +02:00
7a9b9e5300 Remove empty TODO file 2019-10-21 12:53:46 +02:00
5307ec9978 Remove generated file libxsltclass.txt from version control 2019-10-21 12:52:54 +02:00
47c8300023 Make sure that Python tests exit with error code 2019-10-21 12:52:41 +02:00
e176258ef6 Remove WIN32_EXTRA_* variables
Simply use LDFLAGS and LIBS instead.
2019-02-12 12:31:20 +01:00
d5d511f0b7 Fix vsnprintf in Python bindings on Windows
- Fix vsnprintf on older MSVC versions
- Stop using _vsnprintf on MinGW
2019-02-12 12:31:20 +01:00
51b79bfa90 Fix callback signatures in Python bindings 2018-01-16 19:04:33 +01:00
3bea417b5e Fix extension callback signatures 2017-11-29 16:52:13 +01:00
9210e72590 Fix typos
Fixes bug 788668.
2017-11-04 16:07:59 +01:00
8760bb2276 Fix Windows compiler warnings
Fixes bug 788317. Thanks to J. Peter Mugaas for the initial patch.
2017-10-25 16:21:23 +02:00
477f5779ed Fix compiler warnings in Python bindings 2017-10-08 14:26:56 +02:00
90e8b9066d Fix a couple of places where (f)printf parameters were broken
As reported by Thomas Jarosch <thomas.jarosch@intra2net.com>
2013-01-30 17:31:37 +01:00
358bd4e46c Fix python build by using libxsltmod_la_CPPFLAGS instead of AM_CPPFLAGS
Commit a2cd8a03 broke the --with-python build by moving includes from
INCLUDES to AM_CPPFLAGS. AM_CPPFLAGS gets ignored when a target-specific
*_CPPFLAGS variable exists, but at least some automake versions
automatically add "libxsltmod_la_CPPFLAGS = -shared" to python/Makefile.in

https://bugzilla.gnome.org/show_bug.cgi?id=684637
2012-11-21 14:25:45 +08:00
a27de70018 Release of libxslt-1.1.27
* configure.in doc/symbols.xml doc/xslt.html: updated for the release
* NEWS config.h.in doc/* */*.syms : regenerated
2012-09-12 14:37:09 +08:00