RalfG / python-wheels-manylinux-build

GitHub Action to build Python manylinux wheels
https://github.com/marketplace/actions/python-wheels-manylinux-build
Apache License 2.0
92 stars 44 forks source link

cannot access *-linux*.whl #10

Closed morugu closed 4 years ago

morugu commented 4 years ago

I tried full_workflow_example.yml on my actions. https://github.com/morugu/publish-pypi-example/blob/master/.github/workflows/main.yml

however following error occurred.

Successfully built pypi-example
+ for whl in '/github/workspace/wheelhouse/*-linux*.whl'
+ auditwheel repair '/github/workspace/wheelhouse/*-linux*.whl' --plat manylinux2010_x86_64 -w /github/workspace/wheelhouse/
usage: auditwheel [-h] [-V] [-v] command ...
auditwheel: error: cannot access /github/workspace/wheelhouse/*-linux*.whl. No such file
+ echo 'Repairing wheels failed.'
Repairing wheels failed.
+ auditwheel show '/github/workspace/wheelhouse/*-linux*.whl'
usage: auditwheel [-h] [-V] [-v] command ...
auditwheel: error: cannot access /github/workspace/wheelhouse/*-linux*.whl. No such file

I have no idea how to solve it.

RalfG commented 4 years ago

The package you want to build does not contain any non-pure Python code, so its wheel is labeled as py3-none-any, which means that the wheel can be installed on any device with Python 3, regardless of the architecture. The wheel therefore has the filename pypi_example-0.0.1-py3-none-any.whl, which does not match the *-linux*.whl pattern auditwheel is looking for.

Bottom line is, if your Python package is pure Python, you don't need this action or the manylinux container. It can be build on any system, including the default GitHub Actions Python environment. Therefore, you can replace this action with a simple python setup.py sdist bdist_wheel command, and you can even combine it with the upload step:

    - name: Build and publish 
      run: |
        python setup.py sdist bdist_wheel
        twine upload dist/*
morugu commented 4 years ago

It worked. thanks!