1
0
mirror of https://gitlab.gnome.org/GNOME/libxslt synced 2025-07-28 04:41:59 +03:00

39 Commits

Author SHA1 Message Date
5df99903ae python: fix typos
Typos were found with codespell.
2024-10-14 10:20:33 +02: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
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
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
fc3601b906 Set library path when running Python tests
Copied from libxml2.

Should fix #75.
2022-08-29 20:44:20 +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
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
47c8300023 Make sure that Python tests exit with error code 2019-10-21 12:52:41 +02:00
9210e72590 Fix typos
Fixes bug 788668.
2017-11-04 16:07:59 +01:00
39b0c27af8 Remove .cvsignore files which are not needed anymore 2012-09-04 14:28:28 +08:00
a2cd8a03ac Various "make distcheck" and other fixes
Makefile.am:

* Use $(VAR), not @VAR@, as the former is the correct form for AC_SUBST'ed
   variables in Makefile.am files

* Touch these *.xml/*.syms files in the "dist-hook" target to prevent them
   from being regenerated, because the "make dist" process in itself
   updates the timestamps of the source files when it copies them into
   $(distdir)

* Add EXTRA_LIBS (-lrt on my system) to xsltConf.sh, as this is a required
   dependency when client applications link against -lxslt

   (note that the definition of EXTRA_LIBS has been changed; see below)

* Removed MAKEFLAGS+=--silent bits, as this is not compatible with non-GNU
   Make programs

autogen.sh:

* Add --warnings=all options to automake and autoconf invocations, to
   better catch potential problems (most of which I've fixed in this patch)

configure.in:

* Replaced obsolete macros with their current equivalents; for reference,
   see

     http://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Obsolete-Macros.html

   (I removed AC_ISC_POSIX outright because the doc states it is no longer
   useful)

* test(1) uses "=" as an operator, not "=="

* Fixed quoting on an AC_LINK_IFELSE() invocation to quell Autoconf errors

* Don't add redundant libraries to EXTRA_LIBS, because (1) this variable
   already contains LibXSLT's own additional system-library deps, and is
   useful in that form, and (2) the LibXML2 deps are already handled by
   Libtool

* Don't delete files in srcdir, and don't create the symlink to
   "Copyright" there either

   (I don't understand why this is being symlinked in the first place...)

doc/Makefile.am:

* Can't use wildcards in EXTRA_DIST, because this breaks dependencies
   (e.g. you can't "make EXSLT/\*.html"), and they only work properly when
   building inside the source tree; these have been replaced with their
   expansions. Other entries have been added here in lieu of the wildcards
   in the dist-hook target, as well as opportunistic use of the $(*PAGES)
   variables.

* Don't define an "all" target, because this steps on Automake's toes; use
   "all-local" instead

* Define and use an "xsltproc" variable to reference an in-tree-built
   version of xsltproc, instead of e.g. $(bindir)/xsltproc

   NOTE: The makefile also uses $(XSLTPROC), which names an external
   instance of the program found at configure time. Some instances of this
   could probably be changed to $(xsltproc) to remove the dependency on an
   existing installed program.

* Qualified various filenames as appropriate with $(srcdir)

* Use $(XMLLINT) consistently instead of $(bindir)/xmllint

* In the "libxslt-api.xml ..." rule, cd into $(srcdir) before invoking
   apibuild.py as this script has to run in srcdir anyway

* In the "clean-local" rule, clear out some additional files to allow
   "make distcheck" to pass

* Eliminated the redundant "maintainer-clean-local" rule

* Added a "distclean-local" rule to clear out the build directory in an
   out-of-source build to allow "make distcheck" to pass

* Added a "check-extra-dist" target to make it easier to check that
   EXTRA_DIST isn't missing anything

* Use $(MKDIR_P), not $(mkinstalldirs), as the latter name is obsolete

* Use $(VAR) instead of @VAR@

* The "dist-hook" target didn't work (if any generated files were in
   builddir and not in srcdir), and is no longer needed thanks to the
   comprehensive EXTRA_DIST variable

* Added an "uninstall-local" rule to allow "make distcheck" to pass

* Updated the .PHONY target list, removed non-existent targets

doc/symbols.xml:

* Needed to add this bit to make the generation scripts shut up

libexslt/Makefile.am:

* AM_CPPFLAGS should be used instead of INCLUDES, as the latter is an
   obsolete name

* Moved $(LIBXML_CFLAGS) to AM_CFLAGS, to segregate CFLAGS from CPPFLAGS

   (Note that $(CFLAGS) need not be added to AM_CFLAGS, because Automake
   already references both in the build rules)

* Use $(VAR) instead of @VAR@

libxslt.pc.in:

* Add EXTRA_LIBS (-lrt on my system), as this is a required dependency
   when client applications link against -lxslt

libxslt/Makefile.am:

* AM_CPPFLAGS should be used instead of INCLUDES, as the latter is an
   obsolete name

* Moved $(LIBXML_CFLAGS) to AM_CFLAGS, to segregate CFLAGS from CPPFLAGS

* Use $(VAR) instead of @VAR@, $(MKDIR_P) instead of $(mkinstalldirs)

* Use $(MKDIR_P), not $(mkinstalldirs), as the latter name is obsolete

libxslt/xsltutils.c:

* Some systems don't know about CLOCK_MONOTONIC; older Solaris knows about
   CLOCK_HIGHRES. Some systems, alas, have no usable alternative to
   CLOCK_REALTIME.

python/Makefile.am:

* AM_CPPFLAGS should be used instead of INCLUDES, as the latter is an
   obsolete name

* Moved $(LIBXML_CFLAGS) to AM_CFLAGS, to segregate CFLAGS from CPPFLAGS

* Because libxslt-py.c is (presumably) supposed to be generated every time
   at build time, don't bundle it in the dist tarball

* Use $(VAR) instead of @VAR@

* libxsltclass.py is a generated file, so it doesn't get qualified with
   $(srcdir)

* Use $(MKDIR_P) instead of (mkinstalldirs)

* Added an uninstall-local rule so that "make distcheck" passes

* Removed the $(srcdir) qualifications in the GENERATED file list, as
   these files may exist in builddir

* In the gen_prog rule, qualify the script invocation with $(srcdir), and
   set the SRCDIR environment variable so that the script can find the
   files it needs when builddir != srcdir

* Don't define an "all" target, as this steps on Automake's toes

python/generator.py:

* Get the source directory from the SRCDIR environment variable, and use
   it appropriately

python/tests/Makefile.am:

* Set CLEANFILES instead of defining a "clean" rule

* Use $(VAR) instead of @VAR@, $(MKDIR_P) instead of $(mkinstalldirs)

tests/*/Makefile.am, tests/exslt/*/Makefile.am:

* Need to clean up .memdump files for "make distcheck" to pass

* Don't define an "all" target, as this steps on Automake's toes

tests/REC/Makefile.am:

* Added two missing *.stand.out files to EXTRA_DIST

tests/XSLTMark/Makefile.am:

* Replaced the GNU-Make-specific %.out bit with a more broadly compatible
   rule

   (the "dummy" bit shuts up Automake)

* Use "$(xsltproc)" instead of "$(top_builddir)/xsltproc/xsltproc"

* Use a less $(MAKE)-heavy invocation in the "tests" target

* Replaced a conflicting "clean" target with CLEANFILES

* Added a dependency on $(xsltproc) to all the test targets

* Added a .PHONY target list

tests/docbook/Makefile.am:

* Ditched the "echo -n" bit, because it wasn't working as advertised

* Create output directories for out-of-source builds

* "$(basename $$i)" is a typo in a makefile

* Don't embed $(srcdir) in $out/$html/$fo/$msg/$xhtml, so that we can
   refer to these files in builddir or srcdir

* Add a trailing "echo" to complete the "echo -n"

* Don't output files unconditionally to srcdir (it may be read-only, for
   starters)

tests/plugins/Makefile.am:

* AM_CPPFLAGS should be used instead of INCLUDES, as the latter is an
   obsolete name

   (Note that the "$(LIBXML_CFLAGS) $(LIBXSLT_CFLAGS)" bit that was here
   can be dropped entirely, because these already appear in
   xmlsoft_org_xslt_testplugin_la_CFLAGS)

* Use noinst_LTLIBRARIES inside the WITH_MODULES conditional instead of
   EXTRA_LTLIBRARIES, as this is cleaner (and disallows building the plugin
   if module support is disabled)

* Need to clean up *.res files for "make distcheck" to pass

* Use the abs_builddir variable conveniently provided to us by Automake
   instead of a GNU Make $(shell ...) construct

xslt-config.in:

* Add EXTRA_LIBS (-lrt on my system), as this is a required dependency
   when client applications link against -lxslt

xsltproc/Makefile.am:

* AM_CPPFLAGS should be used instead of INCLUDES, as the latter is an
   obsolete name

* Moved $(LIBXML_CFLAGS) into AM_CFLAGS

* Use $(VAR) instead of @VAR@

* Need to clean .memdump for "make distcheck" to pass

* Added rules to build lib[e]xslt.la if needed, which allows test
   makefiles to build xsltproc on the fly even if nothing else has been
   built already

* Create .memdump file in the "tests" target, as it's being grepped
   afterward
2012-08-09 19:46:03 +08:00
98893b611b applied a portability patch from Stephane Bidoul Daniel
* python/tests/pyxsltproc.py: applied a portability patch from 
  Stephane Bidoul
Daniel

svn path=/trunk/; revision=1454
2008-02-05 07:37:55 +00:00
96f2cda8a7 applied patch from Daniel Leidert to fix some typo applied another patch
* doc/xslt.html python/tests/pyxsltproc.py xsltproc/xsltproc.c:
  applied patch from Daniel Leidert to fix some typo
* xsltproc.xml xsltproc.1: applied another patch from Daniel Leidert
  and regenerated
Daniel
2006-08-21 08:46:05 +00:00
63b4680f80 Fixed regression tests wrt usage of the attributes
* tests/general/bug-36-inc.xsl tests/general/bug-37-inc.xsl
  tests/general/bug-65-inc.xsl tests/general/bug-100.xsl
  tests/REC/test-15-1.xsl tests/REC/test-7.1.1-3.xsl
  tests/namespaces/extra2.xsl tests/extensions/module.xsl
  tests/plugins/plugin.xsl python/tests/extelem.py
  python/tests/extfunc.py: Fixed regression tests wrt
  usage of the attributes "exclude-result-prefixes"
  and "extension-element-prefixes". test-7.1.1-3.xsl fails
  now, since the code still does not exclude ns-decls
  correctly.
2006-03-30 15:31:11 +00:00
db3d2b48e8 applied patch from Roumen Petrov for bug #124539 when building outside the
* configure.in python/Makefile.am python/tests/Makefile.am: applied
  patch from Roumen Petrov for bug #124539 when building outside the
  source directory
* libxslt/xsltutils.c: fixed the way to grab the line number from
  the document, use the predefiend libxml2 API which mate it work
  with both 2.5.x and 2.6.x
Daniel
2003-10-28 14:33:17 +00:00
9332a25a91 patch from Sean Treadway, adding Python bindings for extension element and
* python/generator.py python/libxslt-python-api.xml python/libxslt.c
  python/libxslt_wrap.h python/libxsltclass.txt: patch from
  Sean Treadway, adding Python bindings for extension element and
  some bindings cleanups.
* python/tests/Makefile.am python/tests/extelem.py: also add an
  example/test.
Daniel
2003-07-09 10:22:14 +00:00
8cbcc01276 add missing .cvsignore entries 2002-12-28 04:55:08 +00:00
0a04c030c7 enable libxml2 memory debug before loading libxslt since libxslt
* python/tests/*.py: enable libxml2 memory debug before
  loading libxslt since libxslt initialization now includes
  EXSLT registration which initialize the libxml2 library and
  allocate memory
Daniel
2002-11-24 14:51:51 +00:00
645c2e421a patch from Charles Bozeman fixing a memory leak in
* libexslt/date.c: patch from Charles Bozeman fixing a memory
  leak in exsltDateDurationFunction pointed out by Bernard Brinkhus
* python/tests/exslt.py: trouble with mem debug in that specific
  test...
Daniel
2002-11-23 13:48:38 +00:00
ccc8569012 make sure to register EXSLT for the bindings add a specific test minor
* python/libxslt.c: make sure to register EXSLT for the bindings
* python/tests/Makefile.am python/tests/exslt.py: add a specific test
* xsltproc/xsltproc.c: minor cleanup
Daniel
2002-11-16 22:26:08 +00:00
0eeb098cf1 trying to fix #98518 when building outside of the source tree Daniel
* python/Makefile.am python/tests/Makefile.am: trying to fix #98518
  when building outside of the source tree
Daniel
2002-11-15 11:37:04 +00:00
f015c8f98c applied a patch from Ralf Mattes providing style.saveResultToString()
* python/libxslt-python-api.xml python/libxslt.c
  python/libxsltclass.txt python/tests/basic.py: applied a patch
  from Ralf Mattes providing style.saveResultToString()
Daniel
2002-08-25 15:04:00 +00:00
6e5b48bfa0 Added Igor Zlatkovic as official maintainer Albert Chin pointed that
* AUTHORS HACKING: Added Igor Zlatkovic as official maintainer
* python/Makefile.am python/tests/Makefile.am: Albert Chin pointed
  that $(datadir) should be used for docs
Daniel
2002-03-27 09:06:22 +00:00
2abd71732c applied the same kind of fixes to the Python Makefiels than to libxml2
* python/Makefile.am python/generator.py python/libxslt.c
  python/types.c python/tests/Makefile.am: applied the same kind of
  fixes to the Python Makefiels than to libxml2 ones. Updates
  and cleanups too.
Daniel
2002-03-18 15:24:51 +00:00
c99f3afb5f removed tab used spaces preparing 1.0.12 rebuild/updated Daniel
* python/*.py: removed tab used spaces
* configure.in libxslt/xsltwin32config.h: preparing 1.0.12
* doc/news.html doc/xslt.html: rebuild/updated
Daniel
2002-02-11 18:54:47 +00:00
43ced5c60b Fixed the python Makefiles, corrected a bug showing up on ia64, changed
* configure.in libxslt.spec.in python/Makefile.am python/generator.py
  python/libxsl.py python/libxslt.c python/tests/Makefile.am:
  Fixed the python Makefiles, corrected a bug showing up on ia64,
  changed the name of the python internal module too
Daniel
2002-02-09 18:06:02 +00:00
ada89dddea change the Licence to MIT Licence and release of 1.0.11 updates of the
* Copyright Makefile.am configure.in libxslt.spec.in: change the
  Licence to MIT Licence and release of 1.0.11
* doc/FAQ.html doc/intro.html doc/libxslt-decl.txt doc/news.html
  doc/xslt.html: updates of the docs accordingly
* libxslt/xsltwin32config.h: numbering
* python/generator.py python/libxml_wrap.h python/libxsltclass.txt
  python/libxslt-python-api.xml: cleanup the dependancies with
  libxml2
* python/tests/extfunc.py: updated examples.
Daniel
2002-02-08 16:09:27 +00:00
3146d5356f fixup the script and rebuid the API cleanup provided accessors for a lot
* doc/libxslt-api.xml doc/libxslt-decl.txt doc/libxslt-refs.xml
  doc/parsedecl.py: fixup the script and rebuid the API
* libxslt/extensions.h: cleanup
* python/generator.py python/libxslt-python-api.xml python/libxslt.c
  python/libxsltclass.txt: provided accessors for a lot of the
  tructures involved in the transformation. Stylesheet and
  transformation python object don't free automatically the
  encapsulated object when deallocated.
* python/tests/Makefile.am python/tests/basic.py
  python/tests/extfunc.py python/tests/pyxsltproc.py:
  updated the examples
Daniel
2002-02-07 22:34:59 +00:00
9de2bd46fc small fix cleanup avoid a problem with $(TESTS) augmented the wrappers
* xsltproc/xsltproc.c: small fix
* Makefile.am: cleanup
* python/tests/Makefile.am: avoid a problem with $(TESTS)
* python/generator.py python/libxml_wrap.h python/libxsl.py
  python/libxslt.c python/libxsltclass.txt: augmented the
  wrappers
* python/tests/pyxsltproc.py: rewrote xsltproc on top of the
  libxslt-python API to get an estimate of what is missing
Daniel
2002-02-07 17:02:34 +00:00
ff22c1a5f9 added libxslt_xsltCleanup() added parameters to
* python/libxsl.py python/libxslt-python-api.xml python/libxslt.c
  python/libxsltclass.txt: added libxslt_xsltCleanup() added parameters
  to libxslt_xsltApplyStylesheet() removed the memleaks left and
  fixed an import order.
* python/tests/basic.py python/tests/extfunc.py: updated the tests
Daniel
2002-02-06 23:03:38 +00:00
09af30e51e plugged the extension of the engine with python defined functions added a
* python/libxlst.c python/libxslt-python-api.xml
  python/libxsltclass.txt: plugged the extension of the engine
  with python defined functions
* python/tests/Makefile.am python/tests/extfunc.py: added a
  basic test, still a memleak, cleanup function needed.
Daniel
2002-02-06 18:48:48 +00:00
ac6924c939 refactored make tests, make all now don't run the test suite added tests
* Makefile.am configure.in tests/Makefile.am tests/*/Makefile.am
  tests/*/*/Makefile.am: refactored make tests, make all now don't
  run the test suite
* python/Makefile.am: added tests
* python/tests/basic.py python/tests/Makefile.am: added the first
  basic test, memory debug included
Daniel
2002-02-06 10:35:19 +00:00
f0cb070b69 attempst to tweak to get full memory debug... the basic API starts to work
* configure.in python/Makefile.am: attempst to tweak to get
  full memory debug...
* python/generator.py python/libxsl.py python/libxslt-python-api.xml
  python/libxslt.c python/libxslt_wrap.h python/libxsltclass.txt:
  the basic API starts to work
* python/tests/test.*: first basic test
* libxslt/xsltutils.c: fixed a comment
Daniel
2002-02-05 23:23:15 +00:00