Skip to content

Commit

Permalink
Add numpy dependency to python wrapper. (#1935)
Browse files Browse the repository at this point in the history
* update pyproject.toml and python workflows: Add numpy dependency

- Additional dependencies required for the build environment
Numpy must be installed in the python environment where the build is being performed in order to build.

- Automatic installation of dependencies like a normal python package
When installing this package, if numpy does not exist in the python environment, it will be installed automatically.

Signed-off-by: HyeongSeok Kim <tiryul@gmail.com>

* update python-wheels-*yml, pyproject.toml: remove BEFORE_BUILD, remove numpy in build requires

- python-wheels-*yml: When testing on other PRs, I found that dependencies were not properly installed for each build case, so I added this code. However, this PR is for adding numpy dependencies, so it is not needed as @JeanChristopheMorinPerso suggested.

- pyproject.toml: If you are going to do any additional work with the build artifacts, like generating stubs, you will need numpy in your build environment, but it is not needed at the moment. I agree with the review by @JeanChristopheMorinPerso.

Signed-off-by: HyeongSeok Kim <tiryul@gmail.com>

---------

Signed-off-by: HyeongSeok Kim <tiryul@gmail.com>
  • Loading branch information
404Vector authored Dec 16, 2024
1 parent 867ce30 commit 89fd37e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ build-nuget/
*~
.vscode
docs/_test_images/
dist/*
__pycache__/
*.py[cod]
*$py.class

# Ignore Bazel generated files
bazel-*
Expand Down
4 changes: 4 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ authors = [
]
requires-python = ">=3.7"

dependencies = [
"numpy>=1.7.0"
]

[project.urls]
"Homepage" = "https://openexr.com"
"Source" = "https://github.com/AcademySoftwareFoundation/OpenEXR"
Expand Down

0 comments on commit 89fd37e

Please sign in to comment.