Commit Graph

37 Commits

Author SHA1 Message Date
32821be623 add location nodes to some Feature calls 2021-11-20 20:48:30 -05:00
7a12c911bf Remove duplicated CEXE_MAPPING table 2021-10-29 22:42:21 +03:00
8947352889 fix various flake8 whitespace errors 2021-10-27 09:51:52 -04:00
4c00e63574 modules/external_project: use typed_kwargs
Which resolves all of the remaining typing issues.
2021-10-04 19:33:43 -07:00
f228e0244b mdoules/external_project: fix most of the mypy warnings/errors 2021-10-04 19:33:43 -07:00
7c3f256b14 modules/external_project: clean up and sort modules 2021-10-04 19:33:43 -07:00
c3c30d4b06 interpreter: Use typed_kwargs for func_custom_target
This does not convert the build side, or remove any of the checking it
does. We still need that for other callers of custom target. What we'll
do for those is add an internal interface that defaults things, then
we'll be able to have those callers do their own validation, and the
CustomTarget validation machinary can be removed.

Fixes #9096
2021-09-30 21:01:38 +02:00
e836076e24 external-project: variables must be dict not list
Fixes: #9316
2021-09-29 19:01:44 -04:00
d661a0cd96 build: use an object rather than a dict for the dep_manifest
This really is more of a struct than a dict, as the types are disjoint
and they are internally handled, (ie, not from user input). This cleans
some things up, in addition I spotted a bug in the ModuleState where the
dict with the version and license is passed to a field that expects just
the version string.
2021-09-24 10:36:05 -07:00
2c34b2f063 fix traceback for undefined exception when trying to raise exception 2021-09-14 15:50:29 -04:00
12e5bfbc1c external-project: Add support for WAF build system
Fixes: #7638
2021-08-20 09:12:20 -04:00
4a0a6a8083 modules: modules need to return either an ExtensionModlue or a
NewExtensionModule object

So that we get the found() method.
2021-06-30 14:07:26 -07:00
3e396b3782 fix: Always explicitly set encoding for text files (fixes #8263) 2021-06-29 11:28:08 +02:00
7c757dff71 holders: Fix the remaining code to respect the holder changes 2021-06-18 23:48:33 +02:00
95b70bcb97 deps: Split dependencies.base
Split the Factory and dependency classes out
of the base.py script to improve maintainability.
2021-06-03 10:23:27 -07:00
2fb24b18e1 unstable_external_project: Remove unused imports 2021-05-28 15:17:10 -04:00
8abbc5cc5d modules: Replace find_program_impl() by state.find_program() 2021-05-28 15:17:10 -04:00
3340284805 modules: Stop using InterpreterObject
Custom objects returned by modules must be subclass of ModuleObject and
have the state argument in its methods.

Add MutableModuleObject base class for objects that needs to be deep
copied on assignation.
2021-05-28 15:17:10 -04:00
b1d85f3cde modules/external_project: use typed_pos_args 2021-03-26 12:28:42 -07:00
6415453f17 externalproject: Flatten configure_options kwarg 2021-03-16 18:17:58 -04:00
a0689647a9 externalproject: Do not add --includedir by default
Some projects (e.g. OpenSSL) does not support setting include directory
at all.
2021-03-16 18:17:58 -04:00
f6d5e8aa47 externalproject: Fix error when used from main project 2021-03-16 18:17:58 -04:00
6a0fabc647 mass rewrite of string formatting to use f-strings everywhere
performed by running "pyupgrade --py36-plus" and committing the results
2021-03-04 17:16:11 -05:00
8339594014 exernal_project: Fix default cross compile parameters
The variable `{host}` cannot be successfully expanded.
Using the `@HOST@` parameter, as suggested by the documentation, works.
2021-03-02 08:20:28 -05:00
2fabd4c7dc minstall: Add --skip-subprojects option
By default all subprojects are installed. If --skip-subprojects is given
with no value only the main project is installed. If --skip-subprojects
is given with a value, it should be a coma separated list of subprojects
to skip and all others will be installed.

Fixes: #2550.
2021-02-22 23:03:55 +02:00
11cfc258fc external_project: Add default configure options 2021-01-29 11:01:00 -05:00
6a6323ff09 external_project: Do not set LD in the env
This was breaking some autotools projects such as libyaml.
2021-01-29 10:10:37 -05:00
46b68d4c83 external_project: Improve logging
Write output of 'make' and 'make install' into log files as well when
not verbose.
2021-01-29 10:01:36 -05:00
05ab792d58 external_project: Log configure command 2021-01-20 19:11:50 +00:00
903c8716e3 external_project: Write output in log files when not verbose 2021-01-17 11:08:08 +00:00
e36aca42d0 build/interpreter: Split InstallDir to fix layering violation
Currently InstallDir is part of the interpreter, and is an Interpreter
object, which is then put in the Build object. This is a layering
violation, the interperter should have a Holder for build data. This
patch fixes that.
2021-01-13 13:32:48 -08:00
4580433b82 rename cflags_mapping to CFLAGS_MAPPING
This is PEP8 convention for a const variable. Also, make the type
Mapping, which doesn't have mutation methods. This means mypy will warn
us if someone tries to change this.
2021-01-11 11:15:06 -08:00
e81acbd606 Use a single coredata dictionary for options
This patches takes the options work to it's logical conclusion: A single
flat dictionary of OptionKey: UserOptions. This allows us to simplify a
large number of cases, as we don't need to check if an option is in this
dict or that one (or any of 5 or 6, actually).
2021-01-04 12:20:58 -08:00
f6672c7a19 use real pathlib module
We added the _pathlib module to work around defeciencies in python 3.5's
implementation, since we now rely on 3.6 lets drop this
2020-11-20 15:08:40 -08:00
1dfaccfd91 pathlib: Fix resolve() by overriding it in Python 3.5 2020-10-04 10:45:48 +02:00
6ec0b535ba external-project: Add typing annotation 2020-09-13 13:54:47 -04:00
9d338200da external-project: New module to build configure/make projects
This adds an experimental meson module to build projects with other
build systems.

Closes: #4316
2020-09-13 13:54:47 -04:00