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

GDAL_PYTHON_BINDINGS_WITHOUT_NUMPY is ignored #11853

Closed
Zaczero opened this issue Feb 14, 2025 · 2 comments · Fixed by #11873
Closed

GDAL_PYTHON_BINDINGS_WITHOUT_NUMPY is ignored #11853

Zaczero opened this issue Feb 14, 2025 · 2 comments · Fixed by #11873
Assignees

Comments

@Zaczero
Copy link

Zaczero commented Feb 14, 2025

What is the bug?

When defining GDAL_PYTHON_BINDINGS_WITHOUT_NUMPY=1, when numpy package is installed, gdal will still use the numpy despite being told not to.

Steps to reproduce the issue

  1. Install numpy
  2. Define GDAL_PYTHON_BINDINGS_WITHOUT_NUMPY=1
  3. Install gdal from source

Versions and provenance

latest

Additional context

No response

@jratike80
Copy link
Collaborator

jratike80 commented Feb 14, 2025

I do not quite understand if numpy is required or not. But the meaning of GDAL_PYTHON_BINDINGS_WITHOUT_NUMPY=1 seems to be to bypass an error if numpy is not installed befofe installing gdal. Not to bypass numpy if it has been installed.

Related things:

#8069.
#8926

@rouault
Copy link
Member

rouault commented Feb 14, 2025

When defining GDAL_PYTHON_BINDINGS_WITHOUT_NUMPY=1, when numpy package is installed, gdal will still use the numpy despite being told not to.

the way it is is implemented is more about GDAL_PYTHON_BINDINGS_WITHOUT_NUMPY=1 not erroring out if building without numpy.
If numpy is there, then it is ignored. But I agree the current behavior is surprising

@rouault rouault self-assigned this Feb 20, 2025
rouault added a commit to rouault/gdal that referenced this issue Feb 20, 2025
rouault added a commit to rouault/gdal that referenced this issue Feb 20, 2025
rouault added a commit to rouault/gdal that referenced this issue Feb 20, 2025
rouault added a commit to rouault/gdal that referenced this issue Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants