Skip to content

TST: add test package with internal shared library, installed in site…

Cirrus CI / macos-arm64 failed Oct 27, 2024 in 1m 44s

Task Summary

Instruction test failed in 01:14

Details

⚠️ Not enough compute credits to prioritize tasks!
⚠️ Only ghcr.io/cirruslabs/macos-runner:sonoma is allowed. Automatically upgraded.

✅ 00:00 clone
✅ 00:23 install
❌ 01:14 test

/opt/homebrew/Cellar/[email protected]/3.13.0_1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/subprocess.py:577: CalledProcessError
---------------------------- Captured stdout setup -----------------------------
Initialized empty Git repository in /private/var/folders/xf/_tm0f94d66n8kr12tqwrylrr0000gn/T/cirrus-ci-build/tests/packages/sharedlib-in-package/.git/
+ meson setup /private/var/folders/xf/_tm0f94d66n8kr12tqwrylrr0000gn/T/cirrus-ci-build/tests/packages/sharedlib-in-package /private/var/folders/xf/_tm0f94d66n8kr12tqwrylrr0000gn/T/cirrus-ci-build/tests/packages/sharedlib-in-package/.mesonpy-hj38md2c -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=/private/var/folders/xf/_tm0f94d66n8kr12tqwrylrr0000gn/T/cirrus-ci-build/tests/packages/sharedlib-in-package/.mesonpy-hj38md2c/meson-python-native-file.ini
The Meson build system
Version: 1.6.0
Source dir: /private/var/folders/xf/_tm0f94d66n8kr12tqwrylrr0000gn/T/cirrus-ci-build/tests/packages/sharedlib-in-package
Build dir: /private/var/folders/xf/_tm0f94d66n8kr12tqwrylrr0000gn/T/cirrus-ci-build/tests/packages/sharedlib-in-package/.mesonpy-hj38md2c
Build type: native build
Project name: sharedlib-in-package
Project version: 1.0.0
C compiler for the host machine: cc (clang 16.0.0 "Apple clang version 16.0.0 (clang-1600.0.26.3)")
C linker for the host machine: cc ld64 1115.7.3
Host machine cpu family: aarch64
Host machine cpu: aarch64
Program python found: YES (/private/var/folders/xf/_tm0f94d66n8kr12tqwrylrr0000gn/T/cirrus-ci-build/env/bin/python3)
Found pkg-config: YES (/opt/homebrew/bin/pkg-config) 0.29.2
Run-time dependency python found: YES 3.13
Build targets in project: 2

sharedlib-in-package 1.0.0

  User defined options
    Native files: /private/var/folders/xf/_tm0f94d66n8kr12tqwrylrr0000gn/T/cirrus-ci-build/tests/packages/sharedlib-in-package/.mesonpy-hj38md2c/meson-python-native-file.ini
    b_ndebug    : if-release
    b_vscrt     : md
    buildtype   : release

Found ninja-1.12.1 at /opt/homebrew/bin/ninja
+ /opt/homebrew/bin/ninja
[1/5] Compiling C object mypkg/libexamplelib.dylib.p/examplelib.c.o
[2/5] Compiling C object mypkg/_example.cpython-313-darwin.so.p/_examplemod.c.o
[3/5] Linking target mypkg/libexamplelib.dylib
[4/5] Generating symbol file mypkg/libexamplelib.dylib.p/libexamplelib.dylib.symbols
[5/5] Linking target mypkg/_example.cpython-313-darwin.so
[1/3] /private/var/folders/xf/_tm0f94d66n8kr12tqwrylrr0000gn/T/cirrus-ci-build/tests/packages/sharedlib-in-package/.mesonpy-hj38md2c/mypkg/libexamplelib.dylib
[2/3] /private/var/folders/xf/_tm0f94d66n8kr12tqwrylrr0000gn/T/cirrus-ci-build/tests/packages/sharedlib-in-package/.mesonpy-hj38md2c/mypkg/_example.cpython-313-darwin.so
[3/3] /private/var/folders/xf/_tm0f94d66n8kr12tqwrylrr0000gn/T/cirrus-ci-build/tests/packages/sharedlib-in-package/mypkg/__init__.py
----------------------------- Captured stderr call -----------------------------
Traceback (most recent call last):
  File "<string>", line 1, in <module>
    import mypkg; print(mypkg.example_sum(2, 5))
    ^^^^^^^^^^^^
  File "/private/var/folders/xf/_tm0f94d66n8kr12tqwrylrr0000gn/T/pytest-of-admin/pytest-0/mesonpy-test-venv5/lib/python3.13/site-packages/mypkg/__init__.py", line 19, in <module>
    _load_sharedlib()
    ~~~~~~~~~~~~~~~^^
  File "/private/var/folders/xf/_tm0f94d66n8kr12tqwrylrr0000gn/T/pytest-of-admin/pytest-0/mesonpy-test-venv5/lib/python3.13/site-packages/mypkg/__init__.py", line 12, in _load_sharedlib
    if os.name == "nt":
       ^^
NameError: name 'os' is not defined. Did you forget to import 'os'?
=========================== short test summary info ============================
SKIPPED [1] tests/test_project.py:204: Requires MSVC
FAILED tests/test_wheel.py::test_sharedlib_in_package - subprocess.CalledProcessError: Command '['/private/var/folders/xf/_tm0f94d66n8kr12tqwrylrr0000gn/T/pytest-of-admin/pytest-0/mesonpy-test-venv5/bin/python3.13', '-c', 'import mypkg; print(mypkg.example_sum(2, 5))']' returned non-zero exit status 1.
============= 1 failed, 122 passed, 1 skipped in 66.63s (0:01:06) ==============
��������������������������������������������������������������������������������