New submission from Emmanuel Coirier <emmanuel.coir...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue37784>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to