Discussion:
[Mesa-dev] [PATCH] meson: Bump version to 0.46 for python module
Dylan Baker
2018-11-21 18:13:07 UTC
Permalink
From: Arfrever Frehtes Taifersar Arahesis <***@gmail.com>

Meson has two modules for finding python, the python3 module and the
python module. Python3 is older, and has some corner cases, python is
newer, has no known corner cases and can detect python2. Things have
generally seemed to work okay for us using python3, but there are cases
where things fall down (such as if you have python 3.4 as your default
python3.

Debian provides 0.48.x in buster (testing)
fedora has 0.47.x in 27 and 28
fedora has 0.48.x in 29
arch has 0.48.x

cc: ***@gmail.com
distro-bug: https://bugs.gentoo.org/671308
Reviewed-by: Dylan Baker <***@pnwbakers.com>
---
docs/meson.html | 2 +-
meson.build | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/docs/meson.html b/docs/meson.html
index 68f80d6ac42..af109d3d8b0 100644
--- a/docs/meson.html
+++ b/docs/meson.html
@@ -24,7 +24,7 @@ for production</strong></p>
<p>The meson build is tested on Linux, macOS, Cygwin and Haiku, FreeBSD,
DragonflyBSD, NetBSD, and should work on OpenBSD.</p>

-<p><strong>Mesa requires Meson >= 0.45.0 to build.</strong>
+<p><strong>Mesa requires Meson >= 0.46.0 to build.</strong>

Some older versions of meson do not check that they are too old and will error
out in odd ways.
diff --git a/meson.build b/meson.build
index 33f4e5ad3cf..ee2d1a82984 100644
--- a/meson.build
+++ b/meson.build
@@ -25,7 +25,7 @@ project(
[find_program('python', 'python2', 'python3'), 'bin/meson_get_version.py']
).stdout(),
license : 'MIT',
- meson_version : '>= 0.45',
+ meson_version : '>= 0.46',
default_options : ['buildtype=debugoptimized', 'b_ndebug=if-release', 'c_std=c99', 'cpp_std=c++11']
)

@@ -709,7 +709,7 @@ if with_platform_haiku
pre_args += '-DHAVE_HAIKU_PLATFORM'
endif

-prog_python = import('python3').find_python()
+prog_python = import('python').find_installation('python3')
has_mako = run_command(
prog_python, '-c',
'''
--
2.19.1
Matt Turner
2018-11-21 18:48:57 UTC
Permalink
Thanks Arfrever and Dylan.

Acked-by: Matt Turner <***@gmail.com>
Matt Turner
2018-11-22 21:05:38 UTC
Permalink
Post by Matt Turner
Thanks Arfrever and Dylan.
Hmm, actually this doesn't seem to work for me. With it applied I get:

src/mesa/drivers/dri/meson.build:59:8: ERROR: Python object does not
have method path.

which comes from:

meson.add_install_script(
prog_python.path(),
join_paths(meson.source_root(), 'bin/install_megadrivers.py'),
libmesa_dri_drivers.full_path(),
dri_drivers_path,
dri_link,
)
Matt Turner
2018-12-08 20:49:06 UTC
Permalink
Post by Matt Turner
Post by Matt Turner
Thanks Arfrever and Dylan.
src/mesa/drivers/dri/meson.build:59:8: ERROR: Python object does not
have method path.
meson.add_install_script(
prog_python.path(),
join_paths(meson.source_root(), 'bin/install_megadrivers.py'),
libmesa_dri_drivers.full_path(),
dri_drivers_path,
dri_link,
)
Ping. I think this one fell through the cracks.
Dylan Baker
2018-12-10 17:13:59 UTC
Permalink
Quoting Matt Turner (2018-12-08 12:49:06)
Post by Matt Turner
Post by Matt Turner
Post by Matt Turner
Thanks Arfrever and Dylan.
src/mesa/drivers/dri/meson.build:59:8: ERROR: Python object does not
have method path.
meson.add_install_script(
prog_python.path(),
join_paths(meson.source_root(), 'bin/install_megadrivers.py'),
libmesa_dri_drivers.full_path(),
dri_drivers_path,
dri_link,
)
Ping. I think this one fell through the cracks.
Yup. I'll respin and resend in just a minute.
Dylan Baker
2018-12-10 17:52:11 UTC
Permalink
Quoting Dylan Baker (2018-12-10 09:13:59)
Post by Dylan Baker
Quoting Matt Turner (2018-12-08 12:49:06)
Post by Matt Turner
Post by Matt Turner
Post by Matt Turner
Thanks Arfrever and Dylan.
src/mesa/drivers/dri/meson.build:59:8: ERROR: Python object does not
have method path.
meson.add_install_script(
prog_python.path(),
join_paths(meson.source_root(), 'bin/install_megadrivers.py'),
libmesa_dri_drivers.full_path(),
dri_drivers_path,
dri_link,
)
Ping. I think this one fell through the cracks.
Yup. I'll respin and resend in just a minute.
Gah, so much for "the python module does everything the python3 module does", it
doesn't have a path method :/

off to meson land I go.

Eero Tamminen
2018-11-23 09:40:22 UTC
Permalink
Hi,
Post by Dylan Baker
Meson has two modules for finding python, the python3 module and the
python module. Python3 is older, and has some corner cases, python is
newer, has no known corner cases and can detect python2. Things have
generally seemed to work okay for us using python3, but there are cases
where things fall down (such as if you have python 3.4 as your default
python3.
Debian provides 0.48.x in buster (testing)
fedora has 0.47.x in 27 and 28
fedora has 0.48.x in 29
arch has 0.48.x
Ubuntu 18.04 LTS has meson v0.45.1 (and LLVM v6 & kernel v4.15).

First HW enabling packages from 18.10 (kernel v4.18, LLVM v7,
meson v0.47.2) are scheduled for next February 2019.

It would be nice if build breakage would be postponed enough
that deps would be available there too.


- Eero
Post by Dylan Baker
distro-bug: https://bugs.gentoo.org/671308
---
docs/meson.html | 2 +-
meson.build | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/docs/meson.html b/docs/meson.html
index 68f80d6ac42..af109d3d8b0 100644
--- a/docs/meson.html
+++ b/docs/meson.html
@@ -24,7 +24,7 @@ for production</strong></p>
<p>The meson build is tested on Linux, macOS, Cygwin and Haiku, FreeBSD,
DragonflyBSD, NetBSD, and should work on OpenBSD.</p>
-<p><strong>Mesa requires Meson >= 0.45.0 to build.</strong>
+<p><strong>Mesa requires Meson >= 0.46.0 to build.</strong>
Some older versions of meson do not check that they are too old and will error
out in odd ways.
diff --git a/meson.build b/meson.build
index 33f4e5ad3cf..ee2d1a82984 100644
--- a/meson.build
+++ b/meson.build
@@ -25,7 +25,7 @@ project(
[find_program('python', 'python2', 'python3'), 'bin/meson_get_version.py']
).stdout(),
license : 'MIT',
- meson_version : '>= 0.45',
+ meson_version : '>= 0.46',
default_options : ['buildtype=debugoptimized', 'b_ndebug=if-release', 'c_std=c99', 'cpp_std=c++11']
)
@@ -709,7 +709,7 @@ if with_platform_haiku
pre_args += '-DHAVE_HAIKU_PLATFORM'
endif
-prog_python = import('python3').find_python()
+prog_python = import('python').find_installation('python3')
has_mako = run_command(
prog_python, '-c',
'''
Dylan Baker
2018-11-23 22:18:16 UTC
Permalink
Hi Eero,

I'm not sure how to avoid build breakages, as currently using the python3 module
is broken if the python3 file/link is < 3.5, however, trying to do a simple
`find_program('python3')` will not work on Windows or OSX. I guess we could do
an if `meson_version < 0.46` thing.

Dylan

Quoting Eero Tamminen (2018-11-23 01:40:22)
Post by Eero Tamminen
Hi,
Post by Dylan Baker
Meson has two modules for finding python, the python3 module and the
python module. Python3 is older, and has some corner cases, python is
newer, has no known corner cases and can detect python2. Things have
generally seemed to work okay for us using python3, but there are cases
where things fall down (such as if you have python 3.4 as your default
python3.
Debian provides 0.48.x in buster (testing)
fedora has 0.47.x in 27 and 28
fedora has 0.48.x in 29
arch has 0.48.x
Ubuntu 18.04 LTS has meson v0.45.1 (and LLVM v6 & kernel v4.15).
First HW enabling packages from 18.10 (kernel v4.18, LLVM v7,
meson v0.47.2) are scheduled for next February 2019.
It would be nice if build breakage would be postponed enough
that deps would be available there too.
- Eero
Post by Dylan Baker
distro-bug: https://bugs.gentoo.org/671308
---
docs/meson.html | 2 +-
meson.build | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/docs/meson.html b/docs/meson.html
index 68f80d6ac42..af109d3d8b0 100644
--- a/docs/meson.html
+++ b/docs/meson.html
@@ -24,7 +24,7 @@ for production</strong></p>
<p>The meson build is tested on Linux, macOS, Cygwin and Haiku, FreeBSD,
DragonflyBSD, NetBSD, and should work on OpenBSD.</p>
-<p><strong>Mesa requires Meson >= 0.45.0 to build.</strong>
+<p><strong>Mesa requires Meson >= 0.46.0 to build.</strong>
Some older versions of meson do not check that they are too old and will error
out in odd ways.
diff --git a/meson.build b/meson.build
index 33f4e5ad3cf..ee2d1a82984 100644
--- a/meson.build
+++ b/meson.build
@@ -25,7 +25,7 @@ project(
[find_program('python', 'python2', 'python3'), 'bin/meson_get_version.py']
).stdout(),
license : 'MIT',
- meson_version : '>= 0.45',
+ meson_version : '>= 0.46',
default_options : ['buildtype=debugoptimized', 'b_ndebug=if-release', 'c_std=c99', 'cpp_std=c++11']
)
@@ -709,7 +709,7 @@ if with_platform_haiku
pre_args += '-DHAVE_HAIKU_PLATFORM'
endif
-prog_python = import('python3').find_python()
+prog_python = import('python').find_installation('python3')
has_mako = run_command(
prog_python, '-c',
'''
_______________________________________________
mesa-dev mailing list
https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Loading...