Files
buildroot/package
Thomas Petazzoni 4b6e8f010a package/pkg-python: fix for per-package directories
With per-package directory support, Python external modules are
causing a problem: the _sysconfigdata.py module installed by the
Python interpreter contains a number of paths that are relative to the
current package per-package directory, i.e python or python3. For
example:

'BLDSHARED': '/home/thomas/projets/buildroot/output/per-package/python/host/bin/arm-linux-gcc -shared',
'CC': '/home/thomas/projets/buildroot/output/per-package/python/host/bin/arm-linux-gcc',
'CXX': '/home/thomas/projets/buildroot/output/per-package/python/host/bin/arm-linux-g++',
etc.

These paths are problematic, because it means that the wrong compiler
gets used when building external Python modules: instead of using the
compiler from the external Python module per-package host directory,
it uses the one from the 'python' or 'python3' per-package host
directory. Due to this, any native dependency needed by the external
Python module is not found, even though it is properly present in the
current package per-package directory.

Of course, the problem occurs with both target Python modules and host
Python modules.

To fix this, we simply rewrite those paths in _sysconfigdata.py before
building a Python package.

Interestingly, until now, the _sysconfidata.py that was used during
the build was the one from $(TARGET_DIR), which is a bit unusual: it
is more common to use files from $(STAGING_DIR) during the build
process. So this commit changes the PYTHON_PATH and PYTHON3_PATH
variables so that they point to $(STAGING_DIR), which makes the
_sysconfigdata.py fixup in $(STAGING_DIR) effective.

Fixes:

  http://autobuild.buildroot.net/results/a24b0555fd4261b50dc3986635c30717d9cbe764/ (python-psycopg2)
  http://autobuild.buildroot.net/results/080fa893e1b0e7a8c8a31ac1c98eb8871b97264d/ (python-alsaaudio)
  http://autobuild.buildroot.net/results/79bc070f98d6d9d8ef78df12b248cdc7d0e405c3/ (python-lxml)
  and many more Python packages that use native code with a native library

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2020-02-18 23:16:15 +01:00
..
2020-02-03 14:44:52 +01:00
2019-12-31 09:31:56 +01:00
2020-01-28 23:20:40 +01:00
2020-02-03 14:44:52 +01:00
2019-12-24 14:06:48 +01:00
2019-12-25 22:46:39 +01:00
2020-02-03 14:44:52 +01:00
2020-02-03 14:44:52 +01:00
2019-12-25 22:06:25 +01:00
2020-02-03 14:44:52 +01:00
2020-02-03 14:44:52 +01:00
2020-02-03 14:44:52 +01:00
2020-02-03 14:44:52 +01:00
2020-02-03 14:44:52 +01:00
2020-02-05 15:37:51 +01:00
2020-02-03 14:44:52 +01:00
2020-02-03 14:44:52 +01:00
2020-02-03 14:44:52 +01:00
2020-02-03 14:44:52 +01:00
2020-02-03 14:44:52 +01:00
2020-02-03 14:44:52 +01:00
2020-02-03 14:44:52 +01:00
2020-01-11 22:39:56 +01:00
2020-02-03 14:44:52 +01:00
2020-02-03 14:44:52 +01:00
2020-02-03 14:44:52 +01:00
2020-01-13 21:16:14 +01:00
2020-02-03 14:44:53 +01:00
2020-02-04 21:18:42 +01:00
2020-01-01 23:01:27 +01:00
2020-02-03 14:44:53 +01:00
2020-02-03 14:44:53 +01:00
2020-02-15 11:53:19 +01:00
2020-02-03 14:44:53 +01:00
2020-02-03 22:55:08 +01:00
2020-02-11 23:28:26 +01:00
2019-12-08 15:39:57 +01:00
2020-02-03 14:44:53 +01:00
2020-02-03 14:44:53 +01:00
2020-02-03 14:44:53 +01:00
2019-12-30 21:41:36 +01:00
2020-02-03 14:44:53 +01:00
2020-01-19 10:01:11 +01:00
2020-02-03 14:44:53 +01:00
2020-02-03 14:44:53 +01:00
2020-01-13 21:19:46 +01:00
2019-12-08 23:25:05 +01:00
2019-12-22 16:01:00 +01:00
2019-12-16 22:38:22 +01:00
2020-01-08 23:10:11 +01:00
2020-01-08 09:30:56 +01:00
2020-02-03 14:45:35 +01:00
2020-02-03 14:45:35 +01:00
2020-02-03 14:45:35 +01:00
2020-02-03 22:55:08 +01:00
2020-01-18 13:44:19 +01:00
2019-12-22 11:07:13 +01:00
2020-02-03 14:45:35 +01:00
2020-02-03 14:21:06 +01:00
2020-01-06 23:30:44 +01:00
2019-12-18 10:13:47 +01:00
2020-02-03 14:45:35 +01:00
2020-02-03 14:45:35 +01:00
2020-02-03 14:45:35 +01:00
2020-02-03 14:45:35 +01:00
2020-02-02 15:12:05 +01:00
2020-01-12 22:51:08 +01:00
2020-01-12 22:51:57 +01:00
2020-02-03 14:45:35 +01:00
2020-01-20 20:03:54 +01:00
2019-12-26 09:38:54 +01:00
2020-02-03 14:45:35 +01:00
2020-02-03 14:45:35 +01:00
2020-02-16 17:17:18 +01:00
2020-02-03 14:45:35 +01:00
2020-02-15 12:04:49 +01:00
2020-01-05 17:20:43 +01:00
2020-02-03 14:45:35 +01:00
2020-01-20 20:04:12 +01:00
2020-02-03 14:45:35 +01:00
2020-01-19 23:10:05 +01:00
2020-02-03 14:45:35 +01:00
2020-01-08 23:10:09 +01:00
2020-01-05 22:01:58 +01:00
2020-02-15 11:58:38 +01:00
2020-02-03 21:17:54 +01:00
2020-02-03 14:45:36 +01:00
2020-02-03 14:45:36 +01:00
2020-02-03 14:45:36 +01:00
2020-02-03 14:45:36 +01:00
2020-02-03 14:45:36 +01:00
2020-02-03 14:45:36 +01:00
2020-02-03 22:55:08 +01:00
2019-12-22 14:10:48 +01:00
2020-01-28 23:23:53 +01:00
2020-02-04 19:36:18 +01:00
2020-02-03 14:45:36 +01:00
2020-01-28 16:01:55 +01:00
2020-02-03 14:45:36 +01:00
2020-02-14 09:13:07 +01:00
2020-02-03 14:45:36 +01:00
2020-01-14 17:14:46 +01:00
2020-01-19 10:01:09 +01:00
2020-01-13 08:27:53 +01:00
2020-01-12 22:11:27 +01:00
2020-02-03 14:45:36 +01:00
2020-02-03 14:45:36 +01:00
2020-02-16 20:16:13 +01:00
2020-02-03 14:45:36 +01:00
2020-02-18 03:51:01 +01:00
2019-12-26 20:43:52 +01:00
2020-01-13 21:16:56 +01:00
2020-02-04 22:55:41 +01:00
2019-12-22 11:38:42 +01:00
2020-02-03 14:45:36 +01:00
2020-02-03 14:45:36 +01:00
2019-12-16 22:51:32 +01:00
2020-02-03 14:45:36 +01:00
2020-01-26 12:40:48 +01:00
2020-02-03 14:45:36 +01:00
2020-02-02 00:07:26 +01:00
2020-02-03 14:45:36 +01:00
2020-02-03 14:45:36 +01:00
2020-01-01 11:59:42 +01:00
2019-12-24 14:11:43 +01:00
2020-02-01 17:18:52 +01:00
2020-01-05 22:00:24 +01:00
2020-02-03 14:45:36 +01:00
2020-02-03 14:45:36 +01:00
2020-02-14 09:13:07 +01:00
2020-02-03 14:45:36 +01:00
2020-02-03 14:45:36 +01:00
2020-02-03 14:45:36 +01:00
2020-02-03 14:45:36 +01:00
2020-02-03 14:45:36 +01:00
2020-02-03 14:45:36 +01:00
2020-02-03 15:29:52 +01:00
2020-01-19 23:07:17 +01:00
2020-02-03 14:45:36 +01:00
2020-02-03 14:45:36 +01:00
2020-01-05 21:32:39 +01:00
2020-02-05 20:28:33 +01:00
2020-02-03 14:45:37 +01:00
2020-02-03 14:45:37 +01:00
2019-12-22 13:52:25 +01:00
2020-02-03 14:45:37 +01:00