Commit Graph

12 Commits

Author SHA1 Message Date
L. E. Segovia 3a4cb94e94 ci: Update appleclang job to test Xcode-provided Python 2025-02-04 08:16:23 +05:30
L. E. Segovia e793b1bc1a unittests: Unbreak Python bytecompile tests with Xcode Python
Apple sets sys.pycache_prefix to an user-wide cache folder, so it needs
to be prepended to the root for the glob to work correctly.
2025-02-04 08:16:23 +05:30
Andrew McNulty 4023bbfc36 unittests: Add Python unittest for limited API
This new unittest runs the existing Python limited API
test case, and checks that the resulting library was linked to
the correct library.
2024-06-11 19:47:31 +02:00
Dylan Baker e991c4d454 Use SPDX-License-Identifier consistently
This replaces all of the Apache blurbs at the start of each file with an
`# SPDX-License-Identifier: Apache-2.0` string. It also fixes existing
uses to be consistent in capitalization, and to be placed above any
copyright notices.

This removes nearly 3000 lines of boilerplate from the project (only
python files), which no developer cares to look at.

SPDX is in common use, particularly in the Linux kernel, and is the
recommended format for Meson's own `project(license: )` field
2023-12-13 15:19:21 -05:00
Eli Schwartz 77d4db533f
remove CI workaround for clang+msys2
Reverts part of commit 4e17d60d47.

msys2 is now fixed, so clang works well with the python headers.
2023-07-02 18:03:21 -04:00
Eli Schwartz df053848eb
unittests: fix incorrect calculation of bytecompile outputs
If py2 is not found *and* the compiler is MSVC, we didn't take into
account that py2 is not found. This also meant that we didn't take into
account the expected count when it *is* found, because the python module
has a better finder than just "is the binary on PATH".
2023-06-07 16:40:52 -04:00
Eli Schwartz 4e17d60d47
tests: add workarounds for python brokenness on Windows
msys2 is broken only on clang, due to -Werror issues in the python
headers as patched by msys2.

MSVC is simply weird... due to the use of an unversioned platlib/purelib
directory, the python2 and python3 components overlap.
2023-05-02 22:09:25 -04:00
Eli Schwartz 6a1427401c
tests: add a python test for bytecode compilation
Some tweaks are added to the test case so that it supports python2 as
well.
2023-05-02 19:28:35 -04:00
Jussi Pakkanen 2fcd3a4174 Add regression test for Python dist. 2022-04-13 21:27:22 +03:00
Eli Schwartz 4b0c0810df
unittests: convert python tests to project tests
Perhaps when this test case was originally created, project tests could
not use a matrix of options? This is certainly possible today, so don't
write special unittest handling for this instead.

This adds proper visibility into what gets run and what doesn't. Now we
know which python executables got tested and which got skipped.
2022-03-16 18:39:02 -04:00
Eli Schwartz 59d4f771d2
editorconfig: add setting to trim trailing whitespace
and clean up all outstanding issues

Skip 'test cases/common/141 special characters/meson.build' since it
intentionally uses trailing newlines.
2021-08-15 09:36:18 -04:00
Xavier Claessens 7eb4c23156 Split run_unittests.py file 2021-07-26 15:19:13 -04:00