Skip to content

support binary wheels#388

Merged
pstradomski merged 3 commits intobazel-contrib:masterfrom
ankitects:binary-wheels
Jan 7, 2021
Merged

support binary wheels#388
pstradomski merged 3 commits intobazel-contrib:masterfrom
ankitects:binary-wheels

Conversation

@dae
Copy link
Copy Markdown
Contributor

@dae dae commented Dec 7, 2020

Also allow other Python tag specifiers like cp35, as binary wheels
typically list their required Python versions in the filename.

Was successfully able to upload a binary wheel created with this to PyPI,
and install it with pip.

PR Checklist

Please check if your PR fulfills the following requirements:

  • Does not include precompiled binaries, eg. .par files. See CONTRIBUTING.md for info
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature (please, look at the "Scope of the project" section in the README.md file)
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

Currently the code refuses to build a binary wheel.

Issue Number: N/A

What is the new behavior?

It accepts platforms other than 'any'.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@pstradomski
Copy link
Copy Markdown
Contributor

How does this interact with target platform specification?

Also, how does one even build a extension library in bazel?

@dae
Copy link
Copy Markdown
Contributor Author

dae commented Dec 7, 2020

It's up to the caller to provide the correct platform:

https://github.com/ankitects/anki/blob/c505894b88221e6d31ed1b7fdb3a5d835c4de83e/pylib/anki/BUILD.bazel#L103

In Anki's case we are building a Python extension module using the Rust rules + the pyo3 crate, then renaming it to the appropriate filename for the platform: https://github.com/ankitects/anki/blob/c505894b88221e6d31ed1b7fdb3a5d835c4de83e/pylib/anki/BUILD.bazel#L45

@pstradomski
Copy link
Copy Markdown
Contributor

pstradomski commented Dec 8, 2020 via email

@dae
Copy link
Copy Markdown
Contributor Author

dae commented Dec 9, 2020

Sure, done.

Copy link
Copy Markdown
Contributor

@pstradomski pstradomski left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Contributor

@hrfuller hrfuller left a comment

Choose a reason for hiding this comment

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

Change looks good to me. A test would be nice!

@pstradomski
Copy link
Copy Markdown
Contributor

Do you plan to continue working on this PR?

dae added 3 commits January 7, 2021 17:40
Also allow other Python tag specifiers like cp35, to constrain to
a particular Python version.
@dae
Copy link
Copy Markdown
Contributor Author

dae commented Jan 7, 2021

I've added a test, and this should be good to go - it's been running fine here for the last month or so.

@pstradomski pstradomski merged commit bbe0712 into bazel-contrib:master Jan 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants