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

ci: Add python wheel workflow #436

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

lekaf974
Copy link

This PR fix #432

Copy link

linux-foundation-easycla bot commented Sep 17, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

@lekaf974 lekaf974 force-pushed the ci/add-python-wheels-workflow branch from 7923c82 to 9b7a303 Compare September 17, 2024 03:06
@cary-ilm
Copy link
Member

Thanks for this!

The action is failing with this cryptic message:

AttributeError: module 'PyImath' has no attribute 'dynamic_metadata'

I think this is from the step that dynamically computes the version string. You're missing the sci-kit script that computes the version. Try making a local copy of this: https://github.com/AcademySoftwareFoundation/openexr/blob/main/src/wrappers/python/openexr_skbuild_plugin.py

This runs cmake to determine the version, rather than hard-coding the version into the pyproject.toml. It's invoked via the line in pyproject.toml that says dynamic = ["version"]

I'm not 100% sure that Imath's CMake currently returns the right string to extract the version, so it might need some further tweaking.

[tool.scikit-build.cmake.define]
IMATH_INSTALL = 'OFF'
IMATH_BUILD_PYTHON = 'ON'
IMATH_BUILD_EXAMPLES = 'OFF'
Copy link
Member

Choose a reason for hiding this comment

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

Double check which of these variables actually exist. I think

IMATH_BUILD_EXAMPLES
IMATH_BUILD_TOOLS
IMATH_INSTALL_TOOLS
IMATH_FORCE_INTERNAL_DEFLATE
IMATH_FORCE_INTERNAL_IMATH
IMATH_TEST_LIBRARIES

don't exist, that was copy/paste from OpenEXR.

Copy link
Author

Choose a reason for hiding this comment

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

thanks was trying to figure out, thanks

@cary-ilm
Copy link
Member

cary-ilm commented Oct 4, 2024

@lekaf974, this looks close and we'd like to have the contribution, will you be able to finish it off? Thanks!

@lekaf974
Copy link
Author

lekaf974 commented Oct 4, 2024

@cary-ilm was in a rush, I will take a look this weekend and let you know

@cary-ilm
Copy link
Member

@lekaf974, checking up on this again, would you be able to finish this off soon? Thanks!

@lekaf974 lekaf974 force-pushed the ci/add-python-wheels-workflow branch from 8b11c40 to cedd760 Compare October 10, 2024 22:29
Signed-off-by: mevrin <[email protected]>
Signed-off-by: mevrin <[email protected]>
@lekaf974
Copy link
Author

@cary-ilm sorry for delay, so I am facing the following issue

 *** scikit-build-core 0.8.1 (sdist)
Traceback (most recent call last):
  File "/opt/pipx/.cache/e34bb0d426333a3/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py", line 389, in <module>
    main()
  File "/opt/pipx/.cache/e34bb0d426333a3/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py", line 373, in main
    json_out["return_val"] = hook(**hook_input["kwargs"])
  File "/opt/pipx/.cache/e34bb0d426333a3/lib/python3.10/site-packages/pyproject_hooks/_in_process/_in_process.py", line 335, in build_sdist
    return backend.build_sdist(sdist_directory, config_settings)
  File "/tmp/build-env-v5qizh2g/lib/python3.10/site-packages/scikit_build_core/build/__init__.py", line 96, in build_sdist
    return skbuild_build_sdist(sdist_directory, config_settings)
  File "/tmp/build-env-v5qizh2g/lib/python3.10/site-packages/scikit_build_core/build/sdist.py", line 114, in build_sdist
    metadata = get_standard_metadata(pyproject, settings)
  File "/tmp/build-env-v5qizh2g/lib/python3.10/site-packages/scikit_build_core/settings/metadata.py", line 39, in get_standard_metadata
    metadata = StandardMetadata.from_pyproject(new_pyproject_dict)
  File "/tmp/build-env-v5qizh2g/lib/python3.10/site-packages/pyproject_metadata/__init__.py", line 257, in from_pyproject
    raise ConfigurationError(msg)
pyproject_metadata.ConfigurationError: Field "project.version" missing and "version" not specified in "project.dynamic"
ERROR Backend subprocess exited when trying to invoke build_sdist

any device how I can found version dynamically ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Set up a wheel workflow for python bindings
2 participants