aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/mesonlib.py
AgeCommit message (Collapse)AuthorFilesLines
2018-02-20rmtree: Don't retry when the file is not foundNirbheek Chauhan1-0/+2
No need to pointlessly loop for several seconds in this case.
2018-02-20Support running out-of-tree tests against a meson in PATHNirbheek Chauhan1-5/+11
Closes https://github.com/mesonbuild/meson/issues/3015
2018-02-04Don't version shared libraries for AndroidRobert Bragg1-0/+15
Android's loader doesn't handle shared library versioning so this avoids adding a suffix to the filename or soname for Android hosts.
2018-01-30Use os.path: basename() and dirname() instead of split()Aleksey Filippov1-3/+3
According to Python documentation[1] dirname and basename are defined as follows: os.path.dirname() = os.path.split()[0] os.path.basename() = os.path.split()[1] For the purpose of better readability split() is replaced by appropriate function if only one part of returned tuple is used. [1]: https://docs.python.org/3/library/os.path.html#os.path.split
2018-01-30dump_conf_header should rewrite file only if modified (just like ↵Salamandar1-1/+3
do_conf_file) (#2952)
2018-01-09Merge pull request #2803 from dcbaker/wip/freebsd-fixesJussi Pakkanen1-0/+6
various BSD fixes
2018-01-07Merge pull request #2840 from alyst/fix_detect_locationJussi Pakkanen1-18/+29
Fix meson location detection from other meson tools
2018-01-06LLVM: use DragonFly BSD workaround on FreeBSD as wellDylan Baker1-0/+3
2018-01-06compilers: fix unittest "16 prebuilt shared" on dragonfly bsdDylan Baker1-0/+3
2018-01-04Bump minimum supported Python from 3.4 to 3.5.Jussi Pakkanen1-25/+0
2018-01-03normpath to bundled meson executableAlexey Stukalov1-1/+5
add comments clarifying when the 1st method of finding meson.py may fail
2018-01-03fix meson location detection if run by wraptoolAlexey Stukalov1-16/+23
teach detect_meson_py_location() that meson.py is not the only one meson executable (there's wraptool + legacy scripts) that could be installed to the PATH folder fixes #2810
2018-01-01Add missing for_linux( ) function.Benjamin Redelings1-0/+12
2017-12-21Dead code removal.Jussi Pakkanen1-9/+0
2017-12-17Also promote wrap files.Jussi Pakkanen1-6/+11
2017-12-17Print instructions on how to promote subsubprojects.Jussi Pakkanen1-0/+29
2017-12-14Print UTF-8 warning only when actually encountering non-ascii filenames.Jussi Pakkanen1-0/+29
2017-12-07haiku: do not add pthread argumentsDylan Baker1-0/+12
Haiku has pthreads, but they are part of the standard C library, and do not need either special compiler or linker flags.
2017-12-03Merge pull request #2638 from jibsen/use-value-regexJussi Pakkanen1-5/+4
Use regex to substitute template strings
2017-11-27configure_file: Compare difference in binary modeNirbheek Chauhan1-1/+1
Otherwise Python will try to use string decode on the configured file and fail if it contains characters that can't be mapped to the current encoding.
2017-11-27Fix running tests when there is a period in PATH.Jussi Pakkanen1-1/+7
2017-11-26Improve escaping in configuration filesJoergen Ibsen1-13/+22
Replace pairs of backslashes before '@' or '\@' with singles (allows escaping the escape character). Do not consume next '@' after '\@'.
2017-11-23Try harder to find meson.py. Closes #2672.Jussi Pakkanen1-1/+23
2017-11-22Use regex to substitute template stringsJoergen Ibsen1-5/+4
2017-11-22Merge pull request #2498 from mesonbuild/runpythonJussi Pakkanen1-0/+9
Add possibility to run Python scripts with current interpreter
2017-11-22Use re.sub instead of replace loopJoergen Ibsen1-6/+5
This also prohibits recursive substitution.
2017-11-21Review fixes.Jussi Pakkanen1-2/+2
2017-11-20Changed code to use detected executables rather than hardcoding sys.executable.Jussi Pakkanen1-0/+9
2017-11-11compilers: Improve manual library searchingNirbheek Chauhan1-0/+36
We can now specify the library type we want to search for, and whether we want to prefer static libraries over shared ones or the other way around. This functionality is not exposed to build files yet.
2017-10-01Use listify and extract_as_list everywhereNirbheek Chauhan1-26/+25
They now flatten by default and unhold objects if required Includes unit tests.
2017-10-01Always flatten in listify() since we always want thatNirbheek Chauhan1-16/+18
All our kwargs take lists that must be flattened Closes https://github.com/mesonbuild/meson/issues/2408
2017-09-19Merge pull request #2331 from mesonbuild/winencodeJussi Pakkanen1-0/+22
Do not use universal newlines on old Python versions.
2017-09-18Gnome, pkgconfig, Qt4, Qt5 and windows modules slightly refactored.Alexis Jeandet1-1/+3
Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
2017-09-18Introduced extract_as_list.Alexis Jeandet1-1/+8
Corrected code style and typo. Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
2017-09-18Introduction of listify method. Test on build.py module to see benefits.Alexis Jeandet1-0/+11
Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>
2017-09-18Do not use universal newlines on old Python versions.Jussi Pakkanen1-0/+22
2017-09-14Add is_haiku(), needed for run_tests.py.Jérôme Duval1-0/+3
2017-09-11interpreter: Always flatten when unholding arraysNirbheek Chauhan1-0/+1
Otherwise we might end up with wrapper holders in the Build object and pickling will then fail, defeating the purpose of the holder objects. Closes https://github.com/mesonbuild/meson/issues/2211
2017-09-04Allow version labels with trailing dotsMichal Koutný1-1/+1
Fixes #1586
2017-08-18Make all functionality invokable via the main Meson binary,Jussi Pakkanen1-9/+0
which can be a Windows .exe file.
2017-07-21configure_file: warn in case a variable to subsitute is not present in the ↵Christoph Reiter1-2/+7
passed configuration. Fixes #2090
2017-07-01Fix remaining Interpreter object leaks.Jussi Pakkanen1-0/+8
2017-07-01Make Interpreter object unpicklable as it was being pickled by accident in ↵Jussi Pakkanen1-0/+5
copies of kwargs.
2017-05-21Create helper function for a rmtree that works reliably on Windows.Jussi Pakkanen1-0/+17
2017-05-11Flatten should always return a listDylan Baker1-1/+1
Currently if flatten() is passed a non-list object, it returns that object. This is surprising behavior, and prone to causing serious and numerous problems, since many objects implement the iterable interface, and thus can be used in cases a list is expected, but with undesirable results.
2017-05-09Merge pull request #1751 from centricular/fix-cached-depsJussi Pakkanen1-1/+1
Fix caching of external dependencies of various types
2017-05-09Completely overhaul caching of external dependenciesNirbheek Chauhan1-1/+1
The old caching was a mess of spaghetti code layered over pasta code. The new code is well-commented, is clear about what it's trying to do, and uses a blacklist of keyword arguments instead of a whitelist while generating identifiers for dep caching which makes it much more robust for future changes. The only side-effect of forgetting about a new keyword argument would be that the dependency would not be cached unless the values of that keyword arguments were the same in the cached and new dependency. There are also more tests which identify scenarios that were broken earlier.
2017-05-08Implement difference method for OrderedSetDylan Baker1-0/+3
This implementation is obvious rather than efficient, but it's efficient enough for our uses I think. It uses `type(self)` to guarantee that it works even in subclasses or if the name of the class changes.
2017-05-08Fix OrderedSet `__repr__` protocol for non-string objectsDylan Baker1-1/+2
Prefer using `repr` on the keys to `str` since `repr` is guaranteed to be implemented, and will return something "good enough"
2017-04-28Don't use dict.keys() to check membershipDylan Baker1-1/+1
It's much faster to do 'if a in dict' instead of 'if a in dict.keys()', since the latter constructs an iterator and walks that iterator and then tests equality at each step, and the former does a single hash lookup.