Commit Graph

119 Commits

Author SHA1 Message Date
Xavier Claessens 6112e6a815 Fix version check when passing feature option to find_installation() 2018-09-17 11:37:14 -04:00
Xavier Claessens 3cf03ec6d6 find_installation: Add support for feature option in required kwarg
Closes: #4165.
2018-09-16 15:07:43 +03:00
David Seifert ab01db177b Make python module more robust
* Lookup is now performed according to the following order:
  1. use `pkg-config` with `PKG_CONFIG_LIBDIR=LIBPC` from python
  2. use plain `PKG_CONFIG_{LIBDIR,PATH}` from the environment
  3. try to extract the information from SYSCONFIG

The second step is necessary for relocated python installations
and cross compilation scenarios, where the value of `LIBPC` might
be wrong.
2018-08-09 06:27:53 -07:00
Christoph Reiter 6b9fdfe67b python.find_installation: only try to find python with the py launcher if it isn't in PATH
Meson tries to find the interpreter path through the "py" launcher on Windows in all
cases which breaks if meson is run under MSYS2 and an official CPython is installed as well.
MSYS2 Python doesn't install a py launcher which results in meson finding the system one instead
even though python2/python3 is in PATH.

Always check if the interpreter name is in PATH before falling back to checking the py launcher.
2018-07-27 18:10:13 +03:00
Nirbheek Chauhan 907a68bcf1 FeatureNew: Fix method names for some feature checks 2018-07-02 07:05:08 +00:00
Nirbheek Chauhan 817dcaa23b Remove permittedSnippetKwargs, snippets are not special
All we needed to do was change _get_callee_args() to also support
snippets.
2018-07-02 07:05:08 +00:00
Nirbheek Chauhan d737488150 dependencies: Don't assume self.compiler is a C compiler
All dependencies were using find_library, has_header, get_define, etc on
self.compiler assuming that it's a compiler that outputs and consumes
C-like libraries. This is not true for D (and in the future, for Rust)
since although they can consume C libraries, they do not use the
C ecosystem.

For such purposes, we now have self.clib_compiler. Nothing uses
self.compiler anymore as a result, and it has been removed.
2018-06-20 11:27:08 +00:00
Salamandar 2fb6018763 Add 0.46.0 features 2018-06-01 14:23:24 +02:00
Mathieu Duponchelle f1c92d7c9c Interpreter: don't flatten the arguments of various methods
this fixes eg set_variable('foo', ['bar', 'baz']), which
was previously erroring out complaining about the number
of arguments.

Closes #1481
2018-05-04 15:24:21 +00:00
Mathieu Duponchelle 8bda86faab python module: make it work with pypy
pypy installations don't usuallyy ship with pkg-config files,
we thus need to replicate what their version of distutils does.

In addition, we also try our best to build against other
pythons that do not have pkg-config files.
2018-05-03 18:50:40 +05:30
Havard Graff 14db3861d8 modules/python: add some more options around path and config_vars
What is actually defined here varies wildly on different python-versions
for different platforms.
On my python2.7 on Windows len(sysconfig.get_config_vars()) returns 17,
whereas in my Ubuntu that number is 517!

Hence it is useful to be able to check which keys are available, as
well as allowing specifying a default option.
2018-04-21 19:50:53 +02:00
Jussi Pakkanen 9790f2d500 Made Python module match the new init interface. 2018-04-18 00:20:52 +03:00
Mathieu Duponchelle c3bc7873e9 [fixup]: various minor tweaks found while documenting 2018-04-09 15:46:06 +02:00
Mathieu Duponchelle 33abe0cf55 [fixup]: Rename find to find_installation 2018-04-09 15:43:25 +02:00
Mathieu Duponchelle dce770c0a7 [fixup]: Fix python2 detection and unit test 2018-04-09 02:06:22 +02:00
Mathieu Duponchelle 5b13742ff4 [fixup]: trivial fix after rebase 2018-04-07 00:37:28 +02:00
Mathieu Duponchelle ad296976f0 [fixup]: extension_module: allow specifying install_dir OR subdir 2018-04-07 00:37:28 +02:00
Mathieu Duponchelle 423f2f5c92 [fixup]: Address PKG_CONFIG env vars comments 2018-04-07 00:37:28 +02:00
Mathieu Duponchelle e1b138a21b Implement a generic python module
With contributions from Håvard Graff
2018-04-06 22:43:35 +02:00