Skip to content
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

[Python] export cython module for external project #23579

Merged
merged 1 commit into from
Apr 1, 2022

Conversation

ashione
Copy link
Member

@ashione ashione commented Mar 30, 2022

Why are these changes needed?

A lot of cython data types have been defined in ray cython module, but outside project cannot reuse these since ray doesn't export all of *.pxd files.

To fix mobius python building error (https://github.com/ray-project/mobius/runs/5740167581?check_suite_focus=true) : no found ray common.pxd, etc. ,

According to cython document https://cython.readthedocs.io/en/latest/src/userguide/source_files_and_compilation.html
we might add this package_data parameter in setup.py

setup(
    package_data = {
        'my_package': ['*.pxd'],
        'my_package/sub_package': ['*.pxd'],
    },
    ...
)

Related issue number

Checks

  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

@ashione
Copy link
Member Author

ashione commented Mar 30, 2022

I upload a temp dist package for mobius building in this branch source code.
https://ray-mobius-us.oss-us-west-1.aliyuncs.com/ci/macos/ray-2.0.0.dev0-cp38-cp38-macosx_11_0_x86_64.whl

Copy link
Contributor

@jovany-wang jovany-wang left a comment

Choose a reason for hiding this comment

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

Looks good to me. Maybe it needs to be approved by @ericl for code owner purpose.

@jovany-wang
Copy link
Contributor

@ashione Could you check the CI result?

@ericl ericl added the @author-action-required The PR author is responsible for the next step. Remove tag to send back to the reviewer. label Mar 31, 2022
@ashione
Copy link
Member Author

ashione commented Mar 31, 2022

@ashione Could you check the CI result?

These failures are unrelated with changes.

@jovany-wang jovany-wang removed the @author-action-required The PR author is responsible for the next step. Remove tag to send back to the reviewer. label Apr 1, 2022
@jovany-wang
Copy link
Contributor

Lint failure is unrelated.

@jovany-wang jovany-wang merged commit 4510c2d into master Apr 1, 2022
@jovany-wang jovany-wang deleted the cython-export-module branch April 1, 2022 02:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants