diff options
author | Changqing Li <changqing.li@windriver.com> | 2019-06-24 16:29:56 +0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2019-06-25 14:21:48 -0700 |
commit | 5114bb8deed690d722b0ac433f22970a8a2dcfd7 (patch) | |
tree | 8cfb6fe049e7b548cdc1c3ecf7cdfaf784afd7b8 /meta-oe/recipes-devtools/python/python-pygobject | |
parent | 68e89e60ebc07146ec063d423f77065c9e219692 (diff) | |
download | meta-openembedded-5114bb8deed690d722b0ac433f22970a8a2dcfd7.tar.gz |
python-pygobject: fix install dir for python2
* after upgrade to 3.32.1, pygobject switch to build with meson, and
default python option is python3, switch to python2
* default install dir get by python.install_sources and
python.get_install_dir is get from python's sysconfig info,
not like python3, for python2, the install dir include prefix of
recipe-sysroot-native dir, like "build/tmp-glibc/work/core2-32-wrs-linux/
python-pygobject/3.32.1-r0/recipe-sysroot-native/usr/lib/python2.7/site-packages"
add stagedir option for user to config correct install dir.
Signed-off-by: Changqing Li <changqing.li@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-devtools/python/python-pygobject')
-rw-r--r-- | meta-oe/recipes-devtools/python/python-pygobject/0001-python-pyobject-fix-install-dir.patch | 121 |
1 files changed, 121 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/python/python-pygobject/0001-python-pyobject-fix-install-dir.patch b/meta-oe/recipes-devtools/python/python-pygobject/0001-python-pyobject-fix-install-dir.patch new file mode 100644 index 000000000..848cda5aa --- /dev/null +++ b/meta-oe/recipes-devtools/python/python-pygobject/0001-python-pyobject-fix-install-dir.patch | |||
@@ -0,0 +1,121 @@ | |||
1 | From 8b4648d5bc50cb1c14961ed38bf97d5a693f5237 Mon Sep 17 00:00:00 2001 | ||
2 | From: Changqing Li <changqing.li@windriver.com> | ||
3 | Date: Mon, 24 Jun 2019 14:51:52 +0800 | ||
4 | Subject: [PATCH] python-pyobject: fix the wrong install dir for python2 | ||
5 | |||
6 | * after upgrade to 3.32.1, pygobject switch to build with meson, and | ||
7 | default python option is python3, switch to python2 | ||
8 | |||
9 | * default install dir get by python.install_sources and | ||
10 | python.get_install_dir is get from python's sysconfig info, | ||
11 | not like python3, for python2, the install dir include the basedir of | ||
12 | recipe-sysroot-native, add stagedir option for user to config | ||
13 | correct install dir. | ||
14 | |||
15 | Upstream-Status: Inappropriate [oe-specific] | ||
16 | |||
17 | Signed-off-by: Changqing Li <changqing.li@windriver.com> | ||
18 | --- | ||
19 | gi/meson.build | 7 +++---- | ||
20 | gi/overrides/meson.build | 4 ++-- | ||
21 | gi/repository/meson.build | 4 ++-- | ||
22 | meson.build | 4 +++- | ||
23 | meson_options.txt | 1 + | ||
24 | pygtkcompat/meson.build | 4 ++-- | ||
25 | 6 files changed, 13 insertions(+), 11 deletions(-) | ||
26 | |||
27 | diff --git a/gi/meson.build b/gi/meson.build | ||
28 | index c1afd68..249c23d 100644 | ||
29 | --- a/gi/meson.build | ||
30 | +++ b/gi/meson.build | ||
31 | @@ -60,9 +60,8 @@ python_sources = [ | ||
32 | 'types.py', | ||
33 | ] | ||
34 | |||
35 | -python.install_sources(python_sources, | ||
36 | - pure : false, | ||
37 | - subdir : 'gi' | ||
38 | +install_data(python_sources, | ||
39 | + install_dir: join_paths(stagedir, 'gi') | ||
40 | ) | ||
41 | |||
42 | # https://github.com/mesonbuild/meson/issues/4117 | ||
43 | @@ -76,7 +75,7 @@ giext = python.extension_module('_gi', sources, | ||
44 | dependencies : [python_ext_dep, glib_dep, gi_dep, ffi_dep], | ||
45 | include_directories: include_directories('..'), | ||
46 | install: true, | ||
47 | - subdir : 'gi', | ||
48 | + install_dir: join_paths(stagedir, 'gi'), | ||
49 | c_args: pyext_c_args + main_c_args | ||
50 | ) | ||
51 | |||
52 | diff --git a/gi/overrides/meson.build b/gi/overrides/meson.build | ||
53 | index 6ff073f..964fef1 100644 | ||
54 | --- a/gi/overrides/meson.build | ||
55 | +++ b/gi/overrides/meson.build | ||
56 | @@ -10,6 +10,6 @@ python_sources = [ | ||
57 | 'keysyms.py', | ||
58 | '__init__.py'] | ||
59 | |||
60 | -python.install_sources(python_sources, | ||
61 | - subdir : join_paths('gi', 'overrides') | ||
62 | +install_data(python_sources, | ||
63 | + install_dir: join_paths(stagedir, 'gi', 'overrides') | ||
64 | ) | ||
65 | diff --git a/gi/repository/meson.build b/gi/repository/meson.build | ||
66 | index fdc136b..fc88adf 100644 | ||
67 | --- a/gi/repository/meson.build | ||
68 | +++ b/gi/repository/meson.build | ||
69 | @@ -1,5 +1,5 @@ | ||
70 | python_sources = ['__init__.py'] | ||
71 | |||
72 | -python.install_sources(python_sources, | ||
73 | - subdir : join_paths('gi', 'repository') | ||
74 | +install_data(python_sources, | ||
75 | + install_dir: join_paths(stagedir, 'gi', 'repository') | ||
76 | ) | ||
77 | diff --git a/meson.build b/meson.build | ||
78 | index d27a005..ecd55d5 100644 | ||
79 | --- a/meson.build | ||
80 | +++ b/meson.build | ||
81 | @@ -165,12 +165,14 @@ else | ||
82 | py_version = pygobject_version | ||
83 | endif | ||
84 | |||
85 | +stagedir = get_option('stagedir') | ||
86 | + | ||
87 | pkginfo_conf = configuration_data() | ||
88 | pkginfo_conf.set('VERSION', py_version) | ||
89 | configure_file(input : 'PKG-INFO.in', | ||
90 | output : 'PyGObject-@0@.egg-info'.format(py_version), | ||
91 | configuration : pkginfo_conf, | ||
92 | - install_dir : python.get_install_dir(pure : false)) | ||
93 | + install_dir : stagedir) | ||
94 | |||
95 | subdir('gi') | ||
96 | subdir('pygtkcompat') | ||
97 | diff --git a/meson_options.txt b/meson_options.txt | ||
98 | index 5dd4cbc..21def16 100644 | ||
99 | --- a/meson_options.txt | ||
100 | +++ b/meson_options.txt | ||
101 | @@ -1,3 +1,4 @@ | ||
102 | option('python', type : 'string', value : 'python3') | ||
103 | option('pycairo', type : 'boolean', value : true, description : 'build with pycairo integration') | ||
104 | option('tests', type : 'boolean', value : true, description : 'build unit tests') | ||
105 | +option('stagedir', type : 'string', value : '') | ||
106 | diff --git a/pygtkcompat/meson.build b/pygtkcompat/meson.build | ||
107 | index 9e43c44..ef3322d 100644 | ||
108 | --- a/pygtkcompat/meson.build | ||
109 | +++ b/pygtkcompat/meson.build | ||
110 | @@ -3,6 +3,6 @@ python_sources = [ | ||
111 | 'generictreemodel.py', | ||
112 | 'pygtkcompat.py'] | ||
113 | |||
114 | -python.install_sources(python_sources, | ||
115 | - subdir : 'pygtkcompat' | ||
116 | +install_data(python_sources, | ||
117 | + install_dir: join_paths(stagedir, 'pygtkcompat') | ||
118 | ) | ||
119 | -- | ||
120 | 2.7.4 | ||
121 | |||