GrahamDumpleton / mod_wsgi

Source code for Apache/mod_wsgi.
Apache License 2.0
1.02k stars 268 forks source link

Stop adding PYTHON_CFGDIR to LD_RUN_PATH and PYTHON_LDFLAGS if there is no libpython #873

Closed hroncok closed 1 month ago

hroncok commented 8 months ago

The PYTHON_CFGDIR variable is more or less something like /usr/lib64/python3.12/config.

Not only does this directory not exist on Python 3.6+ (it is called differently), but there is no libpython.so in it. Adding it to LD paths makes no difference.

I could fix up the way the path is determined, but I decided not to touch this code not to break old use cases.

Instead, the directory is only added to LD paths when there is something relevant in it.

Fixes https://github.com/GrahamDumpleton/mod_wsgi/issues/872