Skip to content

Python: use platform-specific site packages dir#25998

Merged
tldahlgren merged 1 commit intospack:developfrom
adamjstewart:fixes/python
Sep 19, 2021
Merged

Python: use platform-specific site packages dir#25998
tldahlgren merged 1 commit intospack:developfrom
adamjstewart:fixes/python

Conversation

@adamjstewart
Copy link
Copy Markdown
Member

This is yet another follow-up to #24095.

On most systems that I've tested, the platform-dependent and platform-independent site packages directories are the same. However, in #25973, @robertu94 discovered that on his system, this is not the case. During installation, we pass both --install-purelib and --install-platlib, and Cython chooses to install to platlib instead of purelib. I see two possibilities:

  1. Packages always install to platlib and we should always add platlib to the PYTHONPATH (done in this PR)
  2. The installation directory changes from platlib to purelib depending on the package and we need to add both to the PYTHONPATH

@robertu94 can you test this and see if it introduces more bugs than it fixes? I'm also hoping GitLab will catch any potential issues as it builds a decently sized Python stack.

@tldahlgren tldahlgren enabled auto-merge (squash) September 16, 2021 18:05
@tldahlgren tldahlgren self-assigned this Sep 16, 2021
@tldahlgren tldahlgren disabled auto-merge September 16, 2021 18:05
@tldahlgren
Copy link
Copy Markdown
Contributor

tldahlgren commented Sep 16, 2021

Deferring merge until Adam receives the requested feedback.

@robertu94
Copy link
Copy Markdown
Contributor

@adamjstewart and @tldahlgren this patch fixes my problem! Thank you! I tested all of the python packages that I use regularly which includes py-cython, py-toml, py-setuptools, py-numcodecs, py-numpy, and some compressor packages that I use and maintain.

@adamjstewart
Copy link
Copy Markdown
Member Author

@spackbot run pipeline

@spackbot-app
Copy link
Copy Markdown

spackbot-app bot commented Sep 18, 2021

I've started that pipeline for you!

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.

3 participants