intake / intake/python-snappy

0.6.1: pytest is failing

Aperta
#120 10 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Python
Stelle
490
Fork
104
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

I'm trying to package your module as an rpm package. So I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.
- `python3 -sBm build -w --no-isolation`
- because I'm calling `build` with `--no-isolation` I'm using during all processes only locally installed modules
- install .whl file in
- run pytest with PYTHONPATH pointing to sitearch and sitelib inside

Here is pytest output:

```console
+ PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-snappy-0.6.1-2.fc35.x86_64/usr/lib64/python3.8/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-snappy-0.6.1-2.fc35.x86_64/usr/lib/python3.8/site-packages
+ /usr/bin/pytest -ra
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.13, pytest-7.1.2, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/python-snappy-0.6.1
plugins: forked-1.4.0, xdist-2.5.0
collected 28 items

test_formats.py ......... [ 32%]
test_hadoop_snappy.py .. [ 39%]
test_snappy.py ............... [ 92%]
test_snappy_cffi.py FF [100%]

================================================================================= FAILURES =================================================================================
__________________________________________________________________________ test_snappy_cffi_enum ___________________________________________________________________________

def test_snappy_cffi_enum():
> from snappy.snappy_cffi import lib

test_snappy_cffi.py:9:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

from __future__ import absolute_import

> from ._snappy_cffi import ffi, lib
E ModuleNotFoundError: No module named 'snappy._snappy_cffi'

../../BUILDROOT/python-snappy-0.6.1-2.fc35.x86_64/usr/lib64/python3.8/site-packages/snappy/snappy_cffi.py:3: ModuleNotFoundError
___________________________________________________________________________ test_snappy_all_cffi ___________________________________________________________________________

def test_snappy_all_cffi():
> from snappy.snappy_cffi import ffi, lib

test_snappy_cffi.py:16:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

from __future__ import absolute_import

> from ._snappy_cffi import ffi, lib
E ModuleNotFoundError: No module named 'snappy._snappy_cffi'

../../BUILDROOT/python-snappy-0.6.1-2.fc35.x86_64/usr/lib64/python3.8/site-packages/snappy/snappy_cffi.py:3: ModuleNotFoundError
========================================================================= short test summary info ==========================================================================
FAILED test_snappy_cffi.py::test_snappy_cffi_enum - ModuleNotFoundError: No module named 'snappy._snappy_cffi'
FAILED test_snappy_cffi.py::test_snappy_all_cffi - ModuleNotFoundError: No module named 'snappy._snappy_cffi'
======================================================================= 2 failed, 26 passed in 1.14s =======================================================================
```

Here is content

```console
[tkloczko@devel-g2v python-snappy-0.6.1-2.fc35.x86_64]$ ls -lR usr/lib64/python3.8/site-packages/snappy/
usr/lib64/python3.8/site-packages/snappy/:
total 68
-rw-r--r--. 1 tkloczko tkloczko 7552 May 21 19:23 hadoop_snappy.py
-rw-r--r--. 1 tkloczko tkloczko 347 May 21 19:23 __init__.py
-rw-r--r--. 1 tkloczko tkloczko 2412 May 21 19:23 __main__.py
drwxr-xr-x. 1 tkloczko tkloczko 1272 May 21 19:23 __pycache__
-rw-r--r--. 1 tkloczko tkloczko 5581 May 21 19:23 snappy_cffi_builder.py
-rw-r--r--. 1 tkloczko tkloczko 2124 May 21 19:23 snappy_cffi.py
-rwxr-xr-x. 1 tkloczko tkloczko 16400 May 21 19:23 _snappy.cpython-38-x86_64-linux-gnu.so
-rw-r--r--. 1 tkloczko tkloczko 2901 May 21 19:23 snappy_formats.py
-rw-r--r--. 1 tkloczko tkloczko 13136 May 21 19:23 snappy.py

usr/lib64/python3.8/site-packages/snappy/__pycache__:
total 124
-rw-r--r--. 1 tkloczko tkloczko 7229 May 21 19:23 hadoop_snappy.cpython-38.opt-1.pyc
-rw-r--r--. 1 tkloczko tkloczko 3917 May 21 19:23 hadoop_snappy.cpython-38.opt-2.pyc
-rw-r--r--. 1 tkloczko tkloczko 7229 May 21 19:23 hadoop_snappy.cpython-38.pyc
-rw-r--r--. 1 tkloczko tkloczko 539 May 21 19:23 __init__.cpython-38.opt-1.pyc
-rw-r--r--. 1 tkloczko tkloczko 539 May 21 19:23 __init__.cpython-38.opt-2.pyc
-rw-r--r--. 1 tkloczko tkloczko 539 May 21 19:23 __init__.cpython-38.pyc
-rw-r--r--. 1 tkloczko tkloczko 1952 May 21 19:23 __main__.cpython-38.opt-1.pyc
-rw-r--r--. 1 tkloczko tkloczko 1845 May 21 19:23 __main__.cpython-38.opt-2.pyc
-rw-r--r--. 1 tkloczko tkloczko 1952 May 21 19:23 __main__.cpython-38.pyc
-rw-r--r--. 1 tkloczko tkloczko 5770 May 21 19:23 snappy_cffi_builder.cpython-38.opt-1.pyc
-rw-r--r--. 1 tkloczko tkloczko 5770 May 21 19:23 snappy_cffi_builder.cpython-38.opt-2.pyc
-rw-r--r--. 1 tkloczko tkloczko 5770 May 21 19:23 snappy_cffi_builder.cpython-38.pyc
-rw-r--r--. 1 tkloczko tkloczko 2242 May 21 19:23 snappy_cffi.cpython-38.opt-1.pyc
-rw-r--r--. 1 tkloczko tkloczko 2242 May 21 19:23 snappy_cffi.cpython-38.opt-2.pyc
-rw-r--r--. 1 tkloczko tkloczko 2242 May 21 19:23 snappy_cffi.cpython-38.pyc
-rw-r--r--. 1 tkloczko tkloczko 9751 May 21 19:23 snappy.cpython-38.opt-1.pyc
-rw-r--r--. 1 tkloczko tkloczko 5592 May 21 19:23 snappy.cpython-38.opt-2.pyc
-rw-r--r--. 1 tkloczko tkloczko 9792 May 21 19:23 snappy.cpython-38.pyc
-rw-r--r--. 1 tkloczko tkloczko 1929 May 21 19:23 snappy_formats.cpython-38.opt-1.pyc
-rw-r--r--. 1 tkloczko tkloczko 1400 May 21 19:23 snappy_formats.cpython-38.opt-2.pyc
-rw-r--r--. 1 tkloczko tkloczko 1929 May 21 19:23 snappy_formats.cpython-38.pyc
```

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Start with test_snappy_cffi.py and the installed snappy package listing in the report, then inspect the PEP517 wheel contents. Determine why snappy._snappy_cffi is absent from the installed package and consider the issue resolved when both CFFI tests pass after the documented build and install cycle.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python
Ambito
build-system, testing
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.