Skip to content

Conversation

@reinecke
Copy link
Collaborator

@reinecke reinecke commented Apr 28, 2021

Refactors setup.py to properly leverage the newly cleaned up cmake builds (reworked in #837).

Summarize your change.

Our setup.py had been arranged to try and figure out the final install location for for the libraries and place products in there. The python packaging utilities actually want you to assemble your build into a temp location where it will then pick it up to either package or install to the proper place.

This refactor now tells the cmake build to install into that temp location. Because of this, we have to manually maintain much less code that supports determining the user's desired end action with the assembled package (e.x. install, install using --user, bdist, bdist_wheel).

Also removed _Ctx class instance that was storing build config as a global - it made it hard to follow the flow of code and would likely be prone to bugs.

@reinecke reinecke requested review from meshula and ssteinbach April 28, 2021 01:31
@codecov-commenter
Copy link

Codecov Report

Merging #955 (187b008) into master (846bfb1) will decrease coverage by 0.11%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #955      +/-   ##
==========================================
- Coverage   85.75%   85.63%   -0.12%     
==========================================
  Files         191      191              
  Lines       18098    18160      +62     
  Branches     2046     2061      +15     
==========================================
+ Hits        15520    15552      +32     
- Misses       2055     2085      +30     
  Partials      523      523              
Flag Coverage Δ
unittests 85.63% <ø> (-0.12%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
contrib/opentimelineio_contrib/adapters/rv.py 15.97% <0.00%> (-10.96%) ⬇️
tests/test_serialized_schema.py 92.59% <0.00%> (-7.41%) ⬇️
tests/test_plugin_detection.py 84.12% <0.00%> (-0.19%) ⬇️
tests/test_otiod.py 96.77% <0.00%> (ø)
tests/test_otioz.py 97.95% <0.00%> (ø)
...ntrib/opentimelineio_contrib/adapters/extern_rv.py 0.00% <0.00%> (ø)
...-opentimelineio/opentimelineio/plugins/manifest.py 88.33% <0.00%> (+1.04%) ⬆️
src/opentimelineio/composition.cpp 78.26% <0.00%> (+1.28%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 846bfb1...187b008. Read the comment docs.

@reinecke
Copy link
Collaborator Author

@ssteinbach
Copy link
Collaborator

this is a pretty substantial change to the setup.py (but one that looks good!). could we break the cmake setup.py stuff out away from the cibuildwheel stuff?

Copy link
Collaborator

@ssteinbach ssteinbach left a comment

Choose a reason for hiding this comment

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

I think I'd prefer if we could break this into two PRs - one for the setup.py changes and one for the python-wheels/cibuildwheel action addition that follows it.

@reinecke
Copy link
Collaborator Author

Sure, I could make the first one be "properly target build output from setup.py" and then make the second one be adding the action and publishing the wheel artifacts.

@reinecke
Copy link
Collaborator Author

Oh, it also looks like I may have branched from an old commit. I'll rebase and split.

@ssteinbach
Copy link
Collaborator

Great, thanks @reinecke.

Copy link
Collaborator

@meshula meshula left a comment

Choose a reason for hiding this comment

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

Great to see! Very happy to have wheels built as an action.

… into the wheel build directory"

This reverts commit db96069.
…specified by setuptools and allow it to handle the final install dir. This allows setuptools to handle targeting the final install using products of the intermediate install.
… from somewhere else) and trued up setuptools and pip with the versions enforced in setup.py
@reinecke reinecke force-pushed the wheel-build-action branch from c6a965a to b72a1fe Compare April 28, 2021 17:06
@reinecke reinecke changed the title Wheel build action Refactor setup.py Apr 28, 2021
@reinecke reinecke changed the title Refactor setup.py Refactor setup.py for cmake updates Apr 28, 2021
@reinecke reinecke closed this Apr 28, 2021
@reinecke reinecke deleted the wheel-build-action branch April 28, 2021 17:23
@reinecke reinecke restored the wheel-build-action branch April 28, 2021 17:29
@reinecke reinecke deleted the wheel-build-action branch April 28, 2021 17:30
@reinecke reinecke changed the title Refactor setup.py for cmake updates Refactor setup.py for cmake updates (old branch) Apr 28, 2021
@meshula meshula added the build issues building OTIO label Jun 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build issues building OTIO

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants