libfuse/pyfuse3

pyfuse3 module is empty (likely cython issue)

Closed this issue · 1 comments

riaqn commented

Working on master branch. Python 3.9.1, Cython 0.29.21.
I followed the document on how to build:

root@darkbox /s/d/pyfuse3 (master) [SIGINT]# cat build.sh 
python3 setup.py build_cython
python3 setup.py build_ext --inplace
python3 -m pytest test/
python3 setup.py build_sphinx
python3 setup.py install

and ran the building script:

root@darkbox /s/d/pyfuse3 (master)# sh ./build.sh
found MANIFEST.in, running in developer mode
running build_cython
Compiling /srv/deluge/pyfuse3/src/pyfuse3.pyx
found MANIFEST.in, running in developer mode
running build_ext
building 'pyfuse3' extension
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fno-semantic-interposition -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -march=x86-64 -mtune=generic -O3 -pipe -fno-plt -fPIC -I/usr/include/python3.9 -c src/pyfuse3.c -o build/temp.linux-x86_64-3.9/src/pyfuse3.o -I/usr/include/fuse3 -DFUSE_USE_VERSION=32 -Wall -Wextra -Wconversion -Wsign-compare -DPYFUSE3_VERSION="3.2.0" -Wno-unused-function -Wno-implicit-fallthrough -Wno-unused-function -Wno-unused-parameter -Werror -Wfatal-errors -Wno-error=unreachable-code -Werror=conversion -Werror=sign-compare
gcc -pthread -shared -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now -fno-semantic-interposition -Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now build/temp.linux-x86_64-3.9/src/pyfuse3.o -L/usr/lib -o build/lib.linux-x86_64-3.9/pyfuse3.cpython-39-x86_64-linux-gnu.so -lfuse3 -lpthread -lpthread -lrt
/usr/lib/python3.9/site-packages/setuptools/lib2to3_ex.py:10: PendingDeprecationWarning: lib2to3 package is deprecated and may not be able to parse Python 3.10+
  from lib2to3.refactor import RefactoringTool, get_fixers_from_package
copying build/lib.linux-x86_64-3.9/pyfuse3.cpython-39-x86_64-linux-gnu.so -> src
========================================================================== test session starts ===========================================================================
platform linux -- Python 3.9.1, pytest-6.2.1, py-1.10.0, pluggy-0.13.1 -- /usr/bin/python3
cachedir: .pytest_cache
rootdir: /srv/deluge/pyfuse3/test, configfile: pytest.ini
collected 17 items                                                                                                                                                       

test/test_api.py::test_listdir PASSED                                                                                                                              [  5%]
test/test_api.py::test_sup_groups PASSED                                                                                                                           [ 11%]
test/test_api.py::test_syncfs PASSED                                                                                                                               [ 17%]
test/test_api.py::test_entry_res PASSED                                                                                                                            [ 23%]
test/test_api.py::test_xattr SKIPPED (ACLs not supported for /tmp/tmpve38m2ob)                                                                                     [ 29%]
test/test_api.py::test_copy PASSED                                                                                                                                 [ 35%]
test/test_examples.py::test_hello[hello.py] PASSED                                                                                                                 [ 41%]
test/test_examples.py::test_hello[hello_asyncio.py] PASSED                                                                                                         [ 47%]
test/test_examples.py::test_tmpfs PASSED                                                                                                                           [ 52%]
test/test_examples.py::test_passthroughfs PASSED                                                                                                                   [ 58%]
test/test_fs.py::test_invalidate_entry PASSED                                                                                                                      [ 64%]
test/test_fs.py::test_invalidate_inode PASSED                                                                                                                      [ 70%]
test/test_fs.py::test_notify_store PASSED                                                                                                                          [ 76%]
test/test_fs.py::test_entry_timeout PASSED                                                                                                                         [ 82%]
test/test_fs.py::test_attr_timeout PASSED                                                                                                                          [ 88%]
test/test_fs.py::test_terminate PASSED                                                                                                                             [ 94%]
test/test_rounding.py::test_rounding PASSED                                                                                                                        [100%]

============================================================================ warnings summary ============================================================================
test/test_fs.py:47
  /srv/deluge/pyfuse3/test/test_fs.py:47: PytestDeprecationWarning: @pytest.yield_fixture is deprecated.
  Use @pytest.fixture instead; they are the same.
    @pytest.yield_fixture()

-- Docs: https://docs.pytest.org/en/stable/warnings.html
================================================================ 16 passed, 1 skipped, 1 warning in 5.95s ================================================================
found MANIFEST.in, running in developer mode
running build_sphinx
Running Sphinx v3.4.3

Extension error:
Could not import extension sphinxcontrib.asyncio (exception: No module named 'sphinxcontrib.asyncio')
found MANIFEST.in, running in developer mode
running install
/usr/lib/python3.9/site-packages/packaging/version.py:127: DeprecationWarning: Creating a LegacyVersion has been deprecated and will be removed in the next major release
  warnings.warn(
running bdist_egg
running egg_info
writing src/pyfuse3.egg-info/PKG-INFO
writing dependency_links to src/pyfuse3.egg-info/dependency_links.txt
writing requirements to src/pyfuse3.egg-info/requires.txt
writing top-level names to src/pyfuse3.egg-info/top_level.txt
/usr/lib/python3.9/site-packages/setuptools/lib2to3_ex.py:10: PendingDeprecationWarning: lib2to3 package is deprecated and may not be able to parse Python 3.10+
  from lib2to3.refactor import RefactoringTool, get_fixers_from_package
reading manifest file 'src/pyfuse3.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no directories found matching 'doc/html'
no previously-included directories found matching 'test/.cache'
writing manifest file 'src/pyfuse3.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
running build_ext
creating build/bdist.linux-x86_64/egg
copying build/lib.linux-x86_64-3.9/_pyfuse3.py -> build/bdist.linux-x86_64/egg
copying build/lib.linux-x86_64-3.9/pyfuse3_twisted.py -> build/bdist.linux-x86_64/egg
copying build/lib.linux-x86_64-3.9/pyfuse3_asyncio.py -> build/bdist.linux-x86_64/egg
copying build/lib.linux-x86_64-3.9/pyfuse3.cpython-39-x86_64-linux-gnu.so -> build/bdist.linux-x86_64/egg
byte-compiling build/bdist.linux-x86_64/egg/_pyfuse3.py to _pyfuse3.cpython-39.pyc
byte-compiling build/bdist.linux-x86_64/egg/pyfuse3_twisted.py to pyfuse3_twisted.cpython-39.pyc
byte-compiling build/bdist.linux-x86_64/egg/pyfuse3_asyncio.py to pyfuse3_asyncio.cpython-39.pyc
creating stub loader for pyfuse3.cpython-39-x86_64-linux-gnu.so
byte-compiling build/bdist.linux-x86_64/egg/pyfuse3.py to pyfuse3.cpython-39.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying src/pyfuse3.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying src/pyfuse3.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying src/pyfuse3.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying src/pyfuse3.egg-info/requires.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying src/pyfuse3.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying src/pyfuse3.egg-info/zip-safe -> build/bdist.linux-x86_64/egg/EGG-INFO
writing build/bdist.linux-x86_64/egg/EGG-INFO/native_libs.txt
creating 'dist/pyfuse3-3.2.0-py3.9-linux-x86_64.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing pyfuse3-3.2.0-py3.9-linux-x86_64.egg
Removing /usr/lib/python3.9/site-packages/pyfuse3-3.2.0-py3.9-linux-x86_64.egg
Copying pyfuse3-3.2.0-py3.9-linux-x86_64.egg to /usr/lib/python3.9/site-packages
pyfuse3 3.2.0 is already the active version in easy-install.pth

Installed /usr/lib/python3.9/site-packages/pyfuse3-3.2.0-py3.9-linux-x86_64.egg
Processing dependencies for pyfuse3==3.2.0
Searching for trio==0.17.0
Best match: trio 0.17.0
Adding trio 0.17.0 to easy-install.pth file

Using /usr/lib/python3.9/site-packages
Searching for async-generator==1.10
Best match: async-generator 1.10
Adding async-generator 1.10 to easy-install.pth file

Using /usr/lib/python3.9/site-packages
Searching for attrs==20.3.0
Best match: attrs 20.3.0
Adding attrs 20.3.0 to easy-install.pth file

Using /usr/lib/python3.9/site-packages
Searching for sortedcontainers==2.3.0
Best match: sortedcontainers 2.3.0
Adding sortedcontainers 2.3.0 to easy-install.pth file

Using /usr/lib/python3.9/site-packages
Searching for idna==2.10
Best match: idna 2.10
Adding idna 2.10 to easy-install.pth file

Using /usr/lib/python3.9/site-packages
Searching for outcome==1.1.0
Best match: outcome 1.1.0
Adding outcome 1.1.0 to easy-install.pth file

Using /usr/lib/python3.9/site-packages
Searching for sniffio==1.2.0
Best match: sniffio 1.2.0
Adding sniffio 1.2.0 to easy-install.pth file

Using /usr/lib/python3.9/site-packages
Finished processing dependencies for pyfuse3==3.2.0

everything look ok. But when I try to use the module:

root@darkbox /s/d/pyfuse3 (master)# python
Python 3.9.1 (default, Dec 13 2020, 11:55:53) 
[GCC 10.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyfuse3
>>> dir(pyfuse3)
['__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__spec__']
riaqn commented

Closing this issue since it's mostly my problem, and I found a workaround.