aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/minit.py
AgeCommit message (Collapse)AuthorFilesLines
2021-03-04mass rewrite of string formatting to use f-strings everywhereEli Schwartz1-2/+2
performed by running "pyupgrade --py36-plus" and committing the results
2021-01-23split mesonlib into a packageDylan Baker1-1/+1
Currently mesonlib does some import tricks to figure out whether it needs to use windows or posix specific functions. This is a little hacky, but works fine. However, the way the typing stubs are implemented for the msvcrt and fnctl modules will cause mypy to fail on the other platform, since the functions are not implemented. To aleviate this (and for slightly cleaner design), I've split mesonlib into a pacakge with three modules. A universal module contains all of the platform agnositc code, a win32 module contains window specific code, a posix module contains the posix specific code, and a platform module contains no-op implementations. Then the package's __init__ file imports all of the universal functions and all of the functions from the approriate platform module, or the no-op versions as fallbacks. This makes mypy happy, and avoids `if`ing all over the code to switch between the platform specific code.
2020-11-20use real pathlib moduleDylan Baker1-1/+1
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-10-04pathlib: Fix resolve() by overriding it in Python 3.5Daniel Mensinger1-1/+1
2020-09-08typing: fully annotate mcompile, minit, and msetupDaniel Mensinger1-4/+8
2020-09-04environment: use ExternalProgram to find ninjaPaolo Bonzini1-1/+1
This allows the NINJA environment variable to support all the Windows special cases, especially allowing an absolute path without extension. Based on a patch by Yonggang Luo. Fixes: #7659 Suggested-by: Nirbheek Chauhan <nirbheek@centricular.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-06-21update meson init info message. [skip ci]Michael Brockus1-2/+2
2020-06-09Made --help options sortedTheQwertiest1-1/+1
2020-03-19sample factory implementationMichael1-84/+7
2020-03-02fix typoMichael1-1/+1
2020-03-02add -C to meson initMichael1-0/+7
2020-02-24Update minit.pyMichael Brockus1-3/+2
2020-02-24fixed issue with auto-detection failingMichael Brockus1-1/+2
2020-02-24use python set to tuple for checking membersMichael Brockus1-2/+2
2020-02-19make use of default project constMichael1-1/+1
2020-02-19make use of enumsMichael1-22/+24
2020-02-19removed hardcoded values for more add less work in the long run.Michael1-24/+27
2020-02-19switch Python list for setMichael1-3/+3
2020-02-19remove uneeded '(' and ')'Michael1-1/+1
2020-02-19Update minit.pyMichael Brockus1-52/+58
2020-02-02update the init commandMichael1-56/+80
2019-11-07CI: add initial type annotation checkingMichael Hirsch, Ph.D1-1/+1
2019-11-02Minit templates modularizationMichael Hirsch, Ph.D1-330/+76
2019-04-25Don't use len() to test for container emptinessDylan Baker1-1/+1
I ran the numbers once before (it's in the meson history) but it's *much* faster to *not* use len for testing if a container is empty or not.
2018-10-04Use a single ArgumentParser for all subcommandsXavier Claessens1-4/+4
This has the adventage that "meson --help" shows a list of all commands, making them discoverable. This also reduce the manual parsing of arguments to the strict minimum needed for backward compatibility.
2018-08-09Call it gnu_symbol_visibility instead.Jussi Pakkanen1-2/+2
2018-08-09Updated sample projects to use visibility kwarg.Jussi Pakkanen1-14/+2
2018-04-17Use visual studio solution directoriesNiklas Claesson1-3/+5
This implements support for visual studio solution directories. Projects will by default be put into directories that map their sub-directory name in the source folder. No directories are created if `--layout=flat` is used. Fixes: #2524
2018-03-06Generate meson.build based on existing source files when meson init is run ↵Jukka Laurila1-7/+117
in a non-empty directory.
2018-03-06Fix the C and C++ project template options, they were reversed before.Jukka Laurila1-3/+3
2018-03-03Fix flake8 'variable assigned value but unused' reportsJon Turney1-2/+0
$ flake8 | grep -E 'F841' ./run_unittests.py:1987:13: F841 local variable 'objc' is assigned to but never used ./run_unittests.py:1988:13: F841 local variable 'objcpp' is assigned to but never used ./mesonbuild/minit.py:272:5: F841 local variable 'uppercase_token' is assigned to but never used ./mesonbuild/minit.py:307:5: F841 local variable 'uppercase_token' is assigned to but never used ./mesonbuild/modules/unstable_icestorm.py:36:9: F841 local variable 'result' is assigned to but never used ./mesonbuild/modules/unstable_icestorm.py:78:9: F841 local variable 'up_target' is assigned to but never used ./mesonbuild/modules/unstable_icestorm.py:81:9: F841 local variable 'time_target' is assigned to but never used ./msi/createmsi.py:226:17: F841 local variable 'file_source' is assigned to but never used
2018-03-03Fix various flake8 indentation reportsJon Turney1-3/+3
$ flake8 | grep -E '(E123|E127|E128)' ./run_unittests.py:1358:37: E127 continuation line over-indented for visual indent ./run_unittests.py:1360:37: E127 continuation line over-indented for visual indent ./mesonbuild/minit.py:311:66: E128 continuation line under-indented for visual indent ./mesonbuild/minit.py:312:66: E128 continuation line under-indented for visual indent ./mesonbuild/minit.py:313:66: E128 continuation line under-indented for visual indent ./mesonbuild/compilers/cpp.py:115:63: E127 continuation line over-indented for visual indent ./msi/createmsi.py:156:13: E123 closing bracket does not match indentation of opening bracket's line ./msi/createmsi.py:188:13: E123 closing bracket does not match indentation of opening bracket's line
2018-03-03Fix various flake8 whitespace reportsJon Turney1-8/+8
$ flake8 | grep -E '(E203|E221|E226|E303|W291|W293)' ./run_unittests.py:1503:5: E303 too many blank lines (2) ./mesonbuild/interpreter.py:2342:64: E226 missing whitespace around arithmetic operator ./mesonbuild/minit.py:110:17: E221 multiple spaces before operator ./mesonbuild/minit.py:131:1: W293 blank line contains whitespace ./mesonbuild/minit.py:135:19: E221 multiple spaces before operator ./mesonbuild/minit.py:155:1: W293 blank line contains whitespace ./mesonbuild/minit.py:181:1: W293 blank line contains whitespace ./mesonbuild/minit.py:183:1: W293 blank line contains whitespace ./mesonbuild/minit.py:294:47: W291 trailing whitespace ./mesonbuild/minit.py:331:47: W291 trailing whitespace ./mesonbuild/modules/unstable_icestorm.py:49:1: W293 blank line contains whitespace ./mesonbuild/modules/unstable_icestorm.py:76:31: E203 whitespace before ':' ./mesonbuild/modules/unstable_icestorm.py:82:22: E203 whitespace before ':'
2018-03-03Fix flake8 'imported but unused' reportsJon Turney1-2/+1
$ flake8 | grep F401 ./meson.py:17:1: F401 'mesonbuild.mesonlib' imported but unused ./meson.py:18:1: F401 'locale' imported but unused ./run_unittests.py:24:1: F401 'sys' imported but unused ./mesonbuild/minit.py:2:1: F401 'pyclbr.Function' imported but unused ./mesonbuild/minit.py:18:1: F401 'os' imported but unused ./mesonbuild/backend/vs2010backend.py:15:1: F401 'sys' imported but unused ./mesonbuild/backend/xcodebackend.py:19:1: F401 'sys' imported but unused ./mesonbuild/dependencies/ui.py:20:1: F401 'shutil' imported but unused ./mesonbuild/modules/python3.py:15:1: F401 'sys' imported but unused ./mesonbuild/modules/unstable_icestorm.py:15:1: F401 '..compilers' imported but unused ./mesonbuild/modules/unstable_icestorm.py:15:1: F401 '..mlog' imported but unused ./test cases/common/98 gen extra/srcgen3.py:3:1: F401 'os' imported but unused
2017-12-31Add unit test that checks that the sample projects compile.Jussi Pakkanen1-4/+4
2017-12-31Added C++ library sample.Jussi Pakkanen1-4/+143
2017-12-31Added C++ exe sample project.Jussi Pakkanen1-7/+52
2017-12-31Add a sample shared library project.Jussi Pakkanen1-4/+129
2017-12-31Added init command that creates a sample exe project.Jussi Pakkanen1-0/+64