-
Notifications
You must be signed in to change notification settings - Fork 45
Add an action that builds wheels #1039
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
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
90b6507
Add an action that builds wheels
corranwebster f20da08
Don't build Python 3.6
corranwebster 6d8f763
Don't build GL.
corranwebster c6ca3aa
Merge branch 'main' into enh/build-wheel-action
corranwebster b152995
Merge branch 'main' into enh/build-wheel-action
corranwebster 281c5b2
Add wheel building to publish workflow; update dependencies.
corranwebster 080afba
Clean-up build wheel workflow: make it workflow dispatch only.
corranwebster 7732b7a
Fix wokflow name.
corranwebster File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| name: Build wheels | ||
|
|
||
| on: | ||
| # Make it possible to manually trigger the workflow | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| build-wheels: | ||
| strategy: | ||
| matrix: | ||
| os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] | ||
|
|
||
| runs-on: ${{ matrix.os }} | ||
| steps: | ||
| - name: Check out the release commit | ||
| uses: actions/checkout@v3 | ||
|
|
||
| - name: Set up QEMU | ||
| uses: docker/setup-qemu-action@v2 | ||
| with: | ||
| platforms: arm64 | ||
| if: runner.os == 'Linux' | ||
|
|
||
| - name: Set up Python | ||
| uses: actions/setup-python@v4 | ||
| with: | ||
| python-version: '3.11' | ||
|
|
||
| - name: Build wheels | ||
| uses: pypa/cibuildwheel@v2.12.1 | ||
|
|
||
| - name: Archive build | ||
| uses: actions/upload-artifact@v3 | ||
| with: | ||
| name: enable_wheels | ||
| path: wheelhouse | ||
| # don't need these kept for long | ||
| retention-days: 7 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,10 @@ | ||
| [build-system] | ||
| requires = ["cython", "oldest-supported-numpy", "setuptools", "swig", "wheel"] | ||
| build-backend = "setuptools.build_meta" | ||
|
|
||
| [tool.cibuildwheel] | ||
| skip = 'pp* *-musllinux* cp36-*' | ||
|
|
||
| [tool.cibuildwheel.linux] | ||
| archs = ['auto', 'aarch64'] | ||
| before-all = "yum install -y mesa-libGL-devel" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -380,45 +380,46 @@ def macos_extensions(): | |
| if sys.platform == 'darwin': | ||
| ext_modules += macos_extensions() | ||
|
|
||
| setup(name='enable', | ||
| version=__version__, | ||
| author='Enthought, Inc', | ||
| author_email='info@enthought.com', | ||
| maintainer='ETS Developers', | ||
| maintainer_email='enthought-dev@enthought.com', | ||
| url='https://github.com/enthought/enable/', | ||
| # Note that this URL is only valid for tagged releases. | ||
| download_url=('https://github.com/enthought/enable/archive/' | ||
| '{0}.tar.gz'.format(__version__)), | ||
| license='BSD', | ||
| classifiers=[c.strip() for c in """\ | ||
| Development Status :: 5 - Production/Stable | ||
| Intended Audience :: Developers | ||
| Intended Audience :: Science/Research | ||
| License :: OSI Approved :: BSD License | ||
| Operating System :: MacOS | ||
| Operating System :: Microsoft :: Windows | ||
| Operating System :: OS Independent | ||
| Operating System :: POSIX | ||
| Operating System :: Unix | ||
| Programming Language :: C | ||
| Programming Language :: Python | ||
| Topic :: Scientific/Engineering | ||
| Topic :: Software Development | ||
| Topic :: Software Development :: Libraries | ||
| """.splitlines() if len(c.strip()) > 0], | ||
| platforms=['Windows', 'Linux', 'macOS', 'Unix', 'Solaris'], | ||
| description='low-level drawing and interaction', | ||
| long_description=long_description, | ||
| long_description_content_type="text/x-rst", | ||
| install_requires=__requires__, | ||
| extras_require=__extras_require__, | ||
| cmdclass={ | ||
| 'build': PatchedBuild, | ||
| 'install': PatchedInstall, | ||
| 'build_ext': build_ext, | ||
| }, | ||
| entry_points={ | ||
| setup( | ||
| name='enable', | ||
| version=__version__, | ||
| author='Enthought, Inc', | ||
| author_email='info@enthought.com', | ||
| maintainer='ETS Developers', | ||
| maintainer_email='enthought-dev@enthought.com', | ||
| url='https://github.com/enthought/enable/', | ||
| # Note that this URL is only valid for tagged releases. | ||
| download_url=('https://github.com/enthought/enable/archive/' | ||
| '{0}.tar.gz'.format(__version__)), | ||
| license='BSD', | ||
| classifiers=[c.strip() for c in """\ | ||
| Development Status :: 5 - Production/Stable | ||
| Intended Audience :: Developers | ||
| Intended Audience :: Science/Research | ||
| License :: OSI Approved :: BSD License | ||
| Operating System :: MacOS | ||
| Operating System :: Microsoft :: Windows | ||
| Operating System :: OS Independent | ||
| Operating System :: POSIX | ||
| Operating System :: Unix | ||
| Programming Language :: C | ||
| Programming Language :: Python | ||
| Topic :: Scientific/Engineering | ||
| Topic :: Software Development | ||
| Topic :: Software Development :: Libraries | ||
| """.splitlines() if len(c.strip()) > 0], | ||
| platforms=['Windows', 'Linux', 'macOS', 'Unix', 'Solaris'], | ||
| description='low-level drawing and interaction', | ||
| long_description=long_description, | ||
| long_description_content_type="text/x-rst", | ||
| install_requires=__requires__, | ||
| extras_require=__extras_require__, | ||
| cmdclass={ | ||
| 'build': PatchedBuild, | ||
| 'install': PatchedInstall, | ||
| 'build_ext': build_ext, | ||
| }, | ||
| entry_points={ | ||
| 'enable.toolkits': [ | ||
| 'null = enable.null.toolkit:toolkit', | ||
| 'qt = enable.qt4.toolkit:toolkit', | ||
|
|
@@ -429,26 +430,33 @@ def macos_extensions(): | |
| 'enable_examples = enable.examples._etsdemo_info:info', | ||
| 'kiva_examples = kiva.examples._etsdemo_info:info', | ||
| ] | ||
| }, | ||
| ext_modules=ext_modules, | ||
| packages=find_packages(exclude=['ci', 'docs']), | ||
| package_data={ | ||
| '': ['*.zip', '*.svg', 'images/*'], | ||
| 'enable': ['tests/primitives/data/PngSuite/*.png'], | ||
| 'enable.examples': ['demo/*', | ||
| 'demo/*/*', | ||
| 'demo/*/*/*', | ||
| 'demo/*/*/*/*', | ||
| 'demo/*/*/*/*/*'], | ||
| 'enable.savage.trait_defs.ui.wx': ['data/*.svg'], | ||
| 'kiva': ['tests/agg/doubleprom_soho_full.jpg', | ||
| 'fonttools/data/*.ttf', | ||
| 'fonttools/tests/data/*.afm', | ||
| 'fonttools/tests/data/*.ttc', | ||
| 'fonttools/tests/data/*.ttf', | ||
| 'fonttools/tests/data/*.txt'], | ||
| 'kiva.examples': ['kiva/*', | ||
| 'kiva/*/*'], | ||
| }, | ||
| zip_safe=False, | ||
| ) | ||
| }, | ||
| ext_modules=ext_modules, | ||
| packages=find_packages(exclude=['ci', 'docs']), | ||
| package_data={ | ||
| '': ['*.zip', '*.svg', 'images/*'], | ||
| 'enable': ['tests/primitives/data/PngSuite/*.png'], | ||
| 'enable.examples': [ | ||
| 'demo/*', | ||
| 'demo/*/*', | ||
| 'demo/*/*/*', | ||
| 'demo/*/*/*/*', | ||
| 'demo/*/*/*/*/*', | ||
| ], | ||
| 'enable.savage.trait_defs.ui.wx': ['data/*.svg'], | ||
| 'kiva': [ | ||
| 'tests/agg/doubleprom_soho_full.jpg', | ||
| 'fonttools/data/*.ttf', | ||
| 'fonttools/tests/data/*.afm', | ||
| 'fonttools/tests/data/*.ttc', | ||
| 'fonttools/tests/data/*.ttf', | ||
| 'fonttools/tests/data/*.txt', | ||
| ], | ||
| 'kiva.examples': [ | ||
| 'kiva/*', | ||
| 'kiva/*/*', | ||
| ], | ||
| }, | ||
| zip_safe=False, | ||
| python_requires=">=3.7", | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the only change here apart from formatting. |
||
| ) | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any reason why the sdist should be created with the latest possible version of Python? I would assume an older version was better (and Cython source would be compiled by the user of the sdist)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No particular reason other than the assumption that most recent python would automatically get the most current packaging infrastructure. Cython shouldn't be an issue because I don't think we ship the generated .cpp files in the sdist any more.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like I was wrong about that:enable/MANIFEST.in
Line 17 in 2230bb4
Probably should remove that - the isolated builds should install Cython correctly from the info in the sdist if needed when building.Edit: Nope, that's all in the agg subdirectory.
And I also spot a stray gl reference in the manifest as well.