python: Add pypi package infrastructure to bazel#8336
python: Add pypi package infrastructure to bazel#8336maliberty merged 15 commits intoThe-OpenROAD-Project:masterfrom
Conversation
Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
There is now infrastructure to build python wheels that we could upload to pypi. This rule can be built with `bazelisk build -c opt --features=thin_lto //openroad:openroad_wheel`. This is a precursor to removing the -python option from the OpenROAD binary, and adopting a more standard pypi distribution. This will require CI changes to build the wheel on manylinux Docker images. Signed-off-by: Ethan Mahintorabi <ethanmoon@google.com>
|
clang-tidy review says "All clean, LGTM! 👍" |
|
@vvbandeira please review/comment re: |
|
Is --features=thin_lto required? |
|
It's not required, but it helps with wheel size a lot. By default pypi caps each wheel at 100MB, and we're 345MB without LTO+Opt and 45MB with LTO+Opt. I can try to see what it's like with just opt. |
|
Hi Ethan, could I ask you to run this CI on GitHub so arm64 and macOS wheels are built as well? Here's the runner info: |
|
We do not support mac as we have no hardware on which to debug issues. Our CI runs on Jenkins/GCP not GHA so I don't see that request as possible. |
|
Then I would kindly ask you to leave the embedded interpreter as-is. Or at least a setup.py/pyproject.toml to independently build the requisite wheels outside of Bazel. |
Signed-off-by: Ethan Mahintorabi <ethanmoon@google.com>
Signed-off-by: Ethan Mahintorabi <ethanmoon@google.com>
|
clang-tidy review says "All clean, LGTM! 👍" |
Signed-off-by: Ethan Mahintorabi <ethanmoon@google.com>
|
clang-tidy review says "All clean, LGTM! 👍" |
|
If you (@donn) can do all the bring up and support to get it going we will take the changes. Mac remains a best-effort platform and I can't guarantee resources to work on it. We will not gate the move to Bazel on mac support and may remove -python when Linux platforms are working. |
|
Is the long-term plan to move all building to Bazel? |
Signed-off-by: Ethan Mahintorabi <ethanmoon@google.com>
|
clang-tidy review says "All clean, LGTM! 👍" |
|
Yes, we're going to drop cmake as soon as we're able. Python being the last major hurtle |
Signed-off-by: Ethan Mahintorabi <ethanmoon@google.com>
|
clang-tidy review says "All clean, LGTM! 👍" |
Signed-off-by: Ethan Mahintorabi <ethanmoon@google.com>
|
clang-tidy review says "All clean, LGTM! 👍" |
Signed-off-by: Ethan Mahintorabi <ethanmoon@google.com>
|
clang-tidy review says "All clean, LGTM! 👍" |
Signed-off-by: Ethan Mahintorabi <ethanmoon@google.com>
|
clang-tidy review says "All clean, LGTM! 👍" |
they also cap projects at 10GB (you can request more), so that would get used up fairly quickly. @QuantamHD at what interval would you be expecting it be uploaded? |
|
Google is a PSF sponsor so I think we could get that bumped pretty easily. I'm imagining weekly or perhaps once every 2 weeks. Even at the 10GB limit we're looking at about 4 years of weekly releases or 8 years of twice a month releases. |
Signed-off-by: Ethan Mahintorabi <ethanmoon@google.com>
|
clang-tidy review says "All clean, LGTM! 👍" |
|
I'm surprised LTO shrinks the size that much. How does it impact build time? |
Maybe 30 seconds? |
Signed-off-by: Ethan Mahintorabi <ethanmoon@google.com>
|
clang-tidy review says "All clean, LGTM! 👍" |
|
🥳 |
|
@maliberty This is good to go as is. I think there's a bit more work in setting up the CI, but I would like to do that in a separate PR. |
There is now infrastructure to build python wheels that we could upload to pypi. This rule can be built with
This is a precursor to removing the -python option from the OpenROAD binary, and adopting a more standard pypi distribution.
This will require CI changes to build the wheel on manylinux Docker images.
Signed-off-by: Ethan Mahintorabi ethanmoon@google.com