-
Notifications
You must be signed in to change notification settings - Fork 83
Description
To reproduce this, install meson master (currently at commit 83d18d137) and meson-python main (currently at commit 672f9ff) in a development environment, and then this can be reproduced with both the purelib-and-platlib test case in this repo and with SciPy main:
$ cd tests/packages/purelib-and-platlib
$ python -m build --wheel . --no-isolation --skip-dependency-check
....
[1/1] purelib_and_platlib-1.0.0.data/purelib/pure.pyy
Successfully built purelib_and_platlib-1.0.0-py3-none-linux_x86_64.whl
Meson produced this intro-install_plan.json:
{
"targets":{
"/home/rgommers/code/tmp/meson-python/tests/packages/purelib-and-platlib/build/plat.cpython-310-x86_64-linux-gnu.so":{
"destination":"{py_platlib}/plat.cpython-310-x86_64-linux-gnu.so",
"tag":"runtime"
}
},
"python":{
"/home/rgommers/code/tmp/meson-python/tests/packages/purelib-and-platlib/pure.py":{
"destination":"{py_purelib}/pure.py",
"tag":"runtime"
}
}
}That looks correct. The platlib part of the path gets lost though:
$ cd dist
$ unzip purelib_and_platlib-1.0.0-py3-none-linux_x86_64.whl
$ tree .
.
├── plat.cpython-310-x86_64-linux-gnu.so
├── purelib_and_platlib-1.0.0.data
│ └── purelib
│ └── pure.py
├── purelib_and_platlib-1.0.0.dist-info
│ ├── METADATA
│ ├── RECORD
│ └── WHEEL
└── purelib_and_platlib-1.0.0-py3-none-linux_x86_64.whl
The offending change is gh-130.
Running the test suite yields a failure too, which looks potentially relevant but is failing also with commit 58b0034 (the last one before gh-130):
Details
___________________________________________ test_configure_data ____________________________________________
wheel_configure_data = PosixPath('/tmp/pytest-of-rgommers/pytest-11/test0/mesonpy-test-i_23__v1/configure_data-1.0.0-py3-none-any.whl')
def test_configure_data(wheel_configure_data):
artifact = wheel.wheelfile.WheelFile(wheel_configure_data)
> assert wheel_contents(artifact) == {
'configure_data-1.0.0.data/platlib/configure_data.py',
'configure_data-1.0.0.dist-info/METADATA',
'configure_data-1.0.0.dist-info/RECORD',
'configure_data-1.0.0.dist-info/WHEEL',
}
E AssertionError: assert {'configure_d...gure_data.py'} == {'configure_d...t-info/WHEEL'}
E Extra items in the left set:
E 'configure_data.py'
E Extra items in the right set:
E 'configure_data-1.0.0.data/platlib/configure_data.py'
E Use -v to get more diff
tests/test_wheel.py:103: AssertionError
------------------------------------------ Captured stdout setup -------------------------------------------
! Using Meson to generate the project metadata (no `project` section in pyproject.toml)
+ meson setup --native-file=/home/rgommers/code/tmp/meson-python/tests/packages/configure-data/.mesonpy-native-file.ini -Ddebug=false -Doptimization=2 --prefix=/home/rgommers/anaconda3/envs/scipy-dev /home/rgommers/code/tmp/meson-python/tests/packages/configure-data /home/rgommers/code/tmp/meson-python/tests/packages/configure-data/.mesonpy-6wwbyiow/build
The Meson build system
Version: 0.63.99
Source dir: /home/rgommers/code/tmp/meson-python/tests/packages/configure-data
Build dir: /home/rgommers/code/tmp/meson-python/tests/packages/configure-data/.mesonpy-6wwbyiow/build
Build type: native build
Project name: configure-data
Project version: 1.0.0
Host machine cpu family: x86_64
Host machine cpu: x86_64
Program python found: YES (/home/rgommers/anaconda3/envs/scipy-dev/bin/python)
Configuring configure_data.py using configuration
Build targets in project: 0
configure-data 1.0.0
User defined options
Native files: /home/rgommers/code/tmp/meson-python/tests/packages/configure-data/.mesonpy-native-file.ini
debug : false
optimization: 2
prefix : /home/rgommers/anaconda3/envs/scipy-dev
Found ninja-1.10.2.git.kitware.jobserver-1 at /home/rgommers/anaconda3/envs/scipy-dev/bin/ninja
+ meson compile
ninja: no work to do.
INFO: autodetecting backend as ninja
INFO: calculating backend command to run: /home/rgommers/anaconda3/envs/scipy-dev/bin/ninja
+ meson install --destdir /home/rgommers/code/tmp/meson-python/tests/packages/configure-data/.mesonpy-6wwbyiow/install
ninja: Entering directory `/home/rgommers/code/tmp/meson-python/tests/packages/configure-data/.mesonpy-6wwbyiow/build'
ninja: no work to do.
Installing /home/rgommers/code/tmp/meson-python/tests/packages/configure-data/.mesonpy-6wwbyiow/build/configure_data.py to /home/rgommers/code/tmp/meson-python/tests/packages/configure-data/.mesonpy-6wwbyiow/install/home/rgommers/anaconda3/envs/scipy-dev/lib/python3.10/site-packages
Copying files to wheel...
[0/0] configure_data.py
test_purelib_and_platlib does not fail, because it has an xfail. However, the Meson bug is now fixed (that was the issue with absolute paths being present in intro-install_plan.json I believe). When I uncomment it I get this failure, similar to the configure test failure result above:
Details
_________________________________________ test_purelib_and_platlib _________________________________________
wheel_purelib_and_platlib = PosixPath('/tmp/pytest-of-rgommers/pytest-15/test0/mesonpy-test-ddnnbcp3/purelib_and_platlib-1.0.0-py3-none-any.whl')
def test_purelib_and_platlib(wheel_purelib_and_platlib):
artifact = wheel.wheelfile.WheelFile(wheel_purelib_and_platlib)
expecting = {
f'plat{EXT_SUFFIX}',
'purelib_and_platlib-1.0.0.data/purelib/pure.py',
'purelib_and_platlib-1.0.0.dist-info/METADATA',
'purelib_and_platlib-1.0.0.dist-info/RECORD',
'purelib_and_platlib-1.0.0.dist-info/WHEEL',
}
if platform.system() == 'Windows':
expecting.add('plat{}'.format(EXT_SUFFIX.replace('pyd', 'dll.a')))
> assert wheel_contents(artifact) == expecting
E AssertionError: assert {'pure.py', '...t-info/WHEEL'} == {'plat.cpytho...t-info/WHEEL'}
E Extra items in the left set:
E 'purelib_and_platlib-1.0.0.data/platlib/plat.cpython-310-x86_64-linux-gnu.so'
E 'pure.py'
E Extra items in the right set:
E 'purelib_and_platlib-1.0.0.data/purelib/pure.py'
E 'plat.cpython-310-x86_64-linux-gnu.so'
E Use -v to get more diff
The purelib-and-platlib test itself seems wrong, it's unclear why there is no platlib/ in f'plat{EXT_SUFFIX}'.
I'm looking into this.