Skip to content

Fix numpy include path for in-tree venv#263

Open
jamestjsp wants to merge 1 commit intoilayn:mainfrom
jamestjsp:contrib/fix-venv-numpy-path
Open

Fix numpy include path for in-tree venv#263
jamestjsp wants to merge 1 commit intoilayn:mainfrom
jamestjsp:contrib/fix-venv-numpy-path

Conversation

@jamestjsp
Copy link

Summary

Fix meson build error when using virtual environment inside source tree

Changes

  • Convert numpy include path from absolute to relative in python/meson.build:6

Problem

Meson rejects absolute paths pointing into source tree:

ERROR: Tried to form an absolute path to a dir in the source tree.

Occurs when .venv located inside project directory.

Solution

Use os.path.relpath() to convert numpy include path to relative (matches SciPy approach from scipy/scipy#18006)

Test

  • Built successfully with in-tree venv
  • All 355 tests pass

🤖 Generated with Claude Code

Co-Authored-By: Claude noreply@anthropic.com

@jamestjsp
Copy link
Author

@ilayn It was not building in virtual environment, the same issue was reported in scipy scipy/scipy#16312

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.

1 participant