[New-bugs-announce] [issue37784] Compiling Python 3 with sqlite impossible when sqlite installation is in a non standard directory
Emmanuel Coirier
report at bugs.python.org
Wed Aug 7 06:46:55 EDT 2019
New submission from Emmanuel Coirier <emmanuel.coirier at caissedesdepots.fr>:
When compiling sqlite with a specific prefix, Python compilation process is unable to find sqlite despite CFLAGS and LDFLAGS environment variable correctly set.
The problem is in the setup.py, in the detect_modules function or the detect_sqlite function.
The sqlite_inc_paths list variable (line 1351) only contains well known places for sqlite, but there is no way to include others pathes (except by modifying the source code). The inc_dirs variable is also checked. But since it is not initialized with CFLAGS env_var, the CFLAGS -I pathes are not included, then not checked for a sqlite header file.
This behavior forbids compiling and installing sqlite in a specific directory. Adding the sqlite3.h path in the detect_sqlite function allows sqlite to be included in the final python compilation and install and is a possible workaround.
There should be a way to add this path to the detect_sqlite without having to edit the file on the fly in order to have a working sqlite module with a non standard sqlite install directory.
On a side note, why installing sqlite in some random directory ? People don't always have right to write in /usr/lib and /usr/local/lib.
----------
components: Build, Extension Modules
messages: 349162
nosy: manuco
priority: normal
severity: normal
status: open
title: Compiling Python 3 with sqlite impossible when sqlite installation is in a non standard directory
type: compile error
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37784>
_______________________________________
More information about the New-bugs-announce
mailing list