Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build wheel using cibuildwheel #103

Merged
merged 7 commits into from
Feb 16, 2021
Merged

Conversation

Czaki
Copy link
Contributor

@Czaki Czaki commented Feb 1, 2021

Closes #93

This PR build wheel for Linux and macOS.
Its build wheel for CPython 2.7, 3.5-9. PyPy 2.7, 3.6, 3.7 for Linux 32 bits/64 bits and macOS.

It builds CPython 3.5-9 pypy3.6, pypy3.7 for windows.

When cibuilwheel 2.0 was released then also macOS universal2 could be a simple build.

This PR move source code to src to avoid name collision when executing tests.

work for linux and macos, 
initial for windows
@martindurant
Copy link
Member

I can't personally help with the Windows thing. Perhaps someone else can.

@Czaki
Copy link
Contributor Author

Czaki commented Feb 2, 2021

@martindurant I read a little and it is now building windows wheel above 3.5.

@Czaki
Copy link
Contributor Author

Czaki commented Feb 2, 2021

@martindurant I'm an active contributor to cibuildwheel so if You have any questions I could try to explain some nonclear parts.

@martindurant
Copy link
Member

What would trigger an actual upload to pypi, a new git tag?

I notice that a lot of files were moved around such as snappy/snappy.py → src/snappy/snappy.py; this, for me, beraks the typical pydata package layout, so I wonder whether it is necessary.

runs-on: ubuntu-latest
name: upload wheels
needs: ['sdist', 'build']
if: startsWith(github.ref, 'refs/tags/0.')
Copy link
Contributor Author

@Czaki Czaki Feb 4, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here is the upload trigger

@Czaki
Copy link
Contributor Author

Czaki commented Feb 4, 2021

I notice that a lot of files were moved around such as snappy/snappy.py → src/snappy/snappy.py; this, for me, beraks the typical pydata package layout, so I wonder whether it is necessary.

this is because the test grabs a snappy folder instead of the content of the snappy package. The previous workflow delete files to prevent this.

I strongly prefer src directory, to prevent PYTHONPATH pollution.

Maybe the other solution could be a move test (which also should not be in a top lever directory).

Comment on lines -58 to -61
- name: Clean up sources
# this cleans up the sources to make sure `import snappy` uses the wheel
# an alternative would be to run pytest in a different working directory
run: rm -rf setup.py ./snappy
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here is the reason of move to src.

@Czaki
Copy link
Contributor Author

Czaki commented Feb 8, 2021

Maybe nice to read: https://iscinumpy.gitlab.io/post/overview-of-cibuildwheel/

In a few days, I will try to use the newest cibuildwheel release to build wheels for macOS arm processors.

@martindurant
Copy link
Member

Thanks @Czaki , and glad to see you still pushing this

@Czaki
Copy link
Contributor Author

Czaki commented Feb 8, 2021

It looks ready. Current PR builds 71 wheels:

  • Windows 3.5+ CPython (win32 and amd64) and PyPy
  • macOS 2.7, 3.[5-9] x86_64 and 3.9 universal2
  • Linux x86 and i686: 2.7, 3.[5-9] and aarch64, ppc64le and s390x

list of current wheels:

python_snappy-0.6.0-cp27-cp27m-macosx_10_9_x86_64.whl
python_snappy-0.6.0-cp27-cp27m-manylinux1_i686.whl
python_snappy-0.6.0-cp27-cp27m-manylinux1_x86_64.whl
python_snappy-0.6.0-cp27-cp27m-manylinux2010_i686.whl
python_snappy-0.6.0-cp27-cp27m-manylinux2010_x86_64.whl
python_snappy-0.6.0-cp27-cp27mu-manylinux1_i686.whl
python_snappy-0.6.0-cp27-cp27mu-manylinux1_x86_64.whl
python_snappy-0.6.0-cp27-cp27mu-manylinux2010_i686.whl
python_snappy-0.6.0-cp27-cp27mu-manylinux2010_x86_64.whl
python_snappy-0.6.0-cp35-cp35m-macosx_10_9_x86_64.whl
python_snappy-0.6.0-cp35-cp35m-manylinux1_i686.whl
python_snappy-0.6.0-cp35-cp35m-manylinux1_x86_64.whl
python_snappy-0.6.0-cp35-cp35m-manylinux2010_i686.whl
python_snappy-0.6.0-cp35-cp35m-manylinux2010_x86_64.whl
python_snappy-0.6.0-cp35-cp35m-manylinux2014_aarch64.whl
python_snappy-0.6.0-cp35-cp35m-manylinux2014_ppc64le.whl
python_snappy-0.6.0-cp35-cp35m-manylinux2014_s390x.whl
python_snappy-0.6.0-cp35-cp35m-win32.whl
python_snappy-0.6.0-cp35-cp35m-win_amd64.whl
python_snappy-0.6.0-cp36-cp36m-macosx_10_9_x86_64.whl
python_snappy-0.6.0-cp36-cp36m-manylinux1_i686.whl
python_snappy-0.6.0-cp36-cp36m-manylinux1_x86_64.whl
python_snappy-0.6.0-cp36-cp36m-manylinux2010_i686.whl
python_snappy-0.6.0-cp36-cp36m-manylinux2010_x86_64.whl
python_snappy-0.6.0-cp36-cp36m-manylinux2014_aarch64.whl
python_snappy-0.6.0-cp36-cp36m-manylinux2014_ppc64le.whl
python_snappy-0.6.0-cp36-cp36m-manylinux2014_s390x.whl
python_snappy-0.6.0-cp36-cp36m-win32.whl
python_snappy-0.6.0-cp36-cp36m-win_amd64.whl
python_snappy-0.6.0-cp37-cp37m-macosx_10_9_x86_64.whl
python_snappy-0.6.0-cp37-cp37m-manylinux1_i686.whl
python_snappy-0.6.0-cp37-cp37m-manylinux1_x86_64.whl
python_snappy-0.6.0-cp37-cp37m-manylinux2010_i686.whl
python_snappy-0.6.0-cp37-cp37m-manylinux2010_x86_64.whl
python_snappy-0.6.0-cp37-cp37m-manylinux2014_aarch64.whl
python_snappy-0.6.0-cp37-cp37m-manylinux2014_ppc64le.whl
python_snappy-0.6.0-cp37-cp37m-manylinux2014_s390x.whl
python_snappy-0.6.0-cp37-cp37m-win32.whl
python_snappy-0.6.0-cp37-cp37m-win_amd64.whl
python_snappy-0.6.0-cp38-cp38-macosx_10_9_x86_64.whl
python_snappy-0.6.0-cp38-cp38-manylinux1_i686.whl
python_snappy-0.6.0-cp38-cp38-manylinux1_x86_64.whl
python_snappy-0.6.0-cp38-cp38-manylinux2010_i686.whl
python_snappy-0.6.0-cp38-cp38-manylinux2010_x86_64.whl
python_snappy-0.6.0-cp38-cp38-manylinux2014_aarch64.whl
python_snappy-0.6.0-cp38-cp38-manylinux2014_ppc64le.whl
python_snappy-0.6.0-cp38-cp38-manylinux2014_s390x.whl
python_snappy-0.6.0-cp38-cp38-win32.whl
python_snappy-0.6.0-cp38-cp38-win_amd64.whl
python_snappy-0.6.0-cp39-cp39-macosx_10_9_universal2.whl
python_snappy-0.6.0-cp39-cp39-macosx_10_9_x86_64.whl
python_snappy-0.6.0-cp39-cp39-manylinux1_i686.whl
python_snappy-0.6.0-cp39-cp39-manylinux1_x86_64.whl
python_snappy-0.6.0-cp39-cp39-manylinux2010_i686.whl
python_snappy-0.6.0-cp39-cp39-manylinux2010_x86_64.whl
python_snappy-0.6.0-cp39-cp39-manylinux2014_aarch64.whl
python_snappy-0.6.0-cp39-cp39-manylinux2014_ppc64le.whl
python_snappy-0.6.0-cp39-cp39-manylinux2014_s390x.whl
python_snappy-0.6.0-cp39-cp39-win32.whl
python_snappy-0.6.0-cp39-cp39-win_amd64.whl
python_snappy-0.6.0-pp27-pypy_73-macosx_10_9_x86_64.whl
python_snappy-0.6.0-pp27-pypy_73-manylinux1_x86_64.whl
python_snappy-0.6.0-pp27-pypy_73-manylinux2010_x86_64.whl
python_snappy-0.6.0-pp36-pypy36_pp73-macosx_10_9_x86_64.whl
python_snappy-0.6.0-pp36-pypy36_pp73-manylinux1_x86_64.whl
python_snappy-0.6.0-pp36-pypy36_pp73-manylinux2010_x86_64.whl
python_snappy-0.6.0-pp36-pypy36_pp73-win32.whl
python_snappy-0.6.0-pp37-pypy37_pp73-macosx_10_9_x86_64.whl
python_snappy-0.6.0-pp37-pypy37_pp73-manylinux1_x86_64.whl
python_snappy-0.6.0-pp37-pypy37_pp73-manylinux2010_x86_64.whl
python_snappy-0.6.0-pp37-pypy37_pp73-win32.whl

@martindurant martindurant merged commit 2bbcd61 into intake:master Feb 16, 2021
@martindurant
Copy link
Member

Thanks @Czaki

@Czaki
Copy link
Contributor Author

Czaki commented Feb 16, 2021

There is a plan to upload the whole set of wheels in a short time?

@martindurant
Copy link
Member

If you tell me how! :)

@Czaki
Copy link
Contributor Author

Czaki commented Feb 16, 2021

Without a new release, you could download artifacts from the bottom of the build page https://github.com/andrix/python-snappy/actions/runs/572119475 and then use twine to upload (you need to filter out already uploaded wheels)

Zrzut ekranu z 2021-02-16 22-30-53

@martindurant
Copy link
Member

Lots of wheels uploaded

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Could you upload python3.7 python3.8 wheel to pypi.org?
2 participants