-
Notifications
You must be signed in to change notification settings - Fork 390
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
Add cibuildwheel #124
Add cibuildwheel #124
Conversation
@@ -51,6 +51,6 @@ def test_lda_sparse(self): | |||
np.testing.assert_array_almost_equal(model.topic_word_.sum(axis=1), np.ones(K)) | |||
|
|||
def test_lda_sparse_error_float(self): | |||
dtm = self.dtm.astype(np.float) | |||
dtm = self.dtm.astype(float) |
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.
This raised:
AttributeError: module 'numpy' has no attribute 'float'.
`np.float` was a deprecated alias for the builtin `float`. To avoid this error in existing code, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations. Did you mean: 'cfloat'?
|
||
[tool.cibuildwheel] | ||
build = "cp39-* cp310-* cp311-* cp312-*" | ||
skip = ["pp*", "*i686", "*win32"] |
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.
We have to skip these because of numpy/numpy#24703 (comment)
and there were also problems with win32 builds (some files NumPy relies on were unavailable iirc).
This looks great. Thank you! Might take me a week or two to check everything. |
Thanks. This all looks good. |
This PR introduces cibuildwheel to build wheels for different platforms (i.e. Windows, Linux and macOS).
I'll add a GitHub Actions workflow in the next PR where this can actually be used, but you can try it out locally by running:
(Assuming you have installed build dependencies with
poetry install --only build --no-root
)Note that specifying
macos
orwindows
as platform only works on that operating system, butlinux
works on all three, as long as Docker/Podman is installed.This will produce 8 wheels: