libfuse / python-fuse

Python 2.x/3.x bindings for libfuse 2.x
GNU Lesser General Public License v2.1
286 stars 74 forks source link

Upload wheels to PyPI #21

Closed abitrolly closed 4 years ago

abitrolly commented 4 years ago

Couldn't install the package with pip. https://pythonwheels.com/ make the process much easier.

# pip install fuse-python==0.2
Collecting fuse-python==0.2
  Downloading https://files.pythonhosted.org/packages/9a/96/63370a31dc504017a110e5d38908f0155d955dfc200499c7ba5b518ab6bc/fuse-python-0.2.tar.gz (53kB)
    100% |████████████████████████████████| 61kB 961kB/s 
    Complete output from command python setup.py egg_info:
    pkg-config unavailable, build terminated

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-pbWYae/fuse-python/
sdelafond commented 4 years ago

PyPi requires manylinux-compatible wheels nowadays: https://github.com/pypa/manylinux. I don't have the bandwidth to add support for this right now, but I'll happily take a PR targeting this, for instance something modeled on https://github.com/pypa/python-manylinux-demo.

abitrolly commented 4 years ago

The command to build wheel is:

docker run -e PLAT=manylinux2010_x86_64 -it -v `pwd`:/io -w /io quay.io/pypa/manylinux2010_x86_64 bash -c "yum install -y fuse-devel && /opt/python/cp37-cp37m/bin/pip wheel . --no-clean"

This creates fuse_python-1.0.0-cp37-cp37m-linux_x86_64.whl for Python 3 and reports that build failed. For some reason pip tries to clean up non existing directory.

  removing 'build/lib.linux-x86_64-3.7' (and everything under it)
  removing 'build/bdist.linux-x86_64' (and everything under it)
  'build/scripts-3.7' does not exist -- can't clean it
  removing 'build'
Failed to build fuse-python
Removed build tracker '/tmp/pip-req-tracker-nmhi6x7x'
ERROR: Failed to build one or more wheels
Exception information:
Traceback (most recent call last):
  File "/opt/_internal/cpython-3.7.5/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 178, in main
sdelafond commented 4 years ago

If we can get a command that reports a proper exit code, I'll definitely integrate that to my release checklist.

abitrolly commented 4 years ago

SELinux shows relabelto denial on pip, and most likely the error is with SELinux on my system.

abitrolly commented 4 years ago

This command creates manylines2010 wheel in wheelhouse/ subdir.

➜  python-fuse git:(master) ✗ podman run -e PLAT=manylinux2010_x86_64 -it -v `pwd`:/io:Z -w /io quay.io/pypa/manylinux2010_x86_64 bash -c "yum install -y fuse-devel && /opt/python/cp37-cp37m/bin/python setup.py bdist_wheel && auditwheel repair dist/*.whl"
➜  python-fuse git:(master) ✗ ls -la dist
total 76
drwxr-xr-x.  2 anatoli anatoli    60 Dec 16 22:20 .
drwxr-xr-x. 10 anatoli anatoli   460 Dec 16 22:30 ..
-rw-r--r--.  1 anatoli anatoli 75177 Dec 16 22:30 fuse_python-1.0.0-cp37-cp37m-linux_x86_64.whl
➜  python-fuse git:(master) ✗ ls -la wheelhouse 
total 136
drwxr-xr-x.  2 anatoli anatoli     60 Dec 16 22:30 .
drwxr-xr-x. 10 anatoli anatoli    460 Dec 16 22:30 ..
-rw-r--r--.  1 anatoli anatoli 138806 Dec 16 22:30 fuse_python-1.0.0-cp37-cp37m-manylinux2010_x86_64.whl

This is as far as I can contribute right now.

sdelafond commented 4 years ago

Wheel also uploaded:

https://pypi.org/project/fuse-python/#files