aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules/python3.py
AgeCommit message (Collapse)AuthorFilesLines
2023-02-01treewide: add future annotations importEli Schwartz1-0/+1
2022-08-17modules: use module level information about new and deprecationDylan Baker1-4/+5
Instead of using FeatureNew/FeatureDeprecated in the module. The goal here is to be able to handle information about modules in a single place, instead of having to handle it separately. Each module simply defines some metadata, and then the interpreter handles the rest.
2022-03-24python 3 module: type-check all posargsEli Schwartz1-3/+4
Yes, it's deprecated, but we can still stop people doing the wrong thing with it if they are still using it.
2021-12-31add FeatureNew decorators for various modules that were lacking themEli Schwartz1-1/+2
Going back to 0.38, though some of them are far older. The original implementation of FeatureNew only added backdated feature checks that far, anyway.
2021-05-28modules: Add methods dict everywhereXavier Claessens1-0/+6
This fix calling random internal methods from meson.build as long as they were not prefixed by underscore.
2021-05-28modules: Stop using ModuleReturnValue where it's not neededXavier Claessens1-5/+3
It is only needed in functions that need to add targets to the interpreter.
2021-05-28modules: Remove snippet methodsXavier Claessens1-3/+2
The only advantage they have is they have the interpreter in arguments, but it's already available as self.interpreter. We should discourage usage of the interpreter API and rely on ModuleState object instead in the future. This also lift the restriction that a module method cannot add build targets, but that was not enforced for snippet methods anyway (and some modules were doing it) and it's really loose restriction as it should check for many other things if we wanted to make it consistent.
2021-03-19split program related classes and functions out of dependenciesDylan Baker1-3/+4
Dependencies is already a large and complicated package without adding programs to the list. This also allows us to untangle a bit of spaghetti that we have.
2021-03-04mass rewrite of string formatting to use f-strings everywhereEli Schwartz1-1/+1
performed by running "pyupgrade --py36-plus" and committing the results
2020-03-23Fix legacy env var support with crossJohn Ericson1-1/+1
Fix #3969
2019-01-02Remove cross_info; cross file is parsed up front and discardedJohn Ericson1-4/+5
2018-11-14modules/python3: allow specifying in the native fileDylan Baker1-1/+4
2018-10-07Print warning when using deprecated 'python3' moduleXavier Claessens1-1/+2
2018-07-02Remove permittedSnippetKwargs, snippets are not specialNirbheek Chauhan1-3/+2
All we needed to do was change _get_callee_args() to also support snippets.
2018-04-15Convert Gnome module to use find_program from interpreter.Jussi Pakkanen1-4/+4
2018-04-03Remove duplicated list of known kwargs for build targetsXavier Claessens1-5/+2
2018-03-03Fix flake8 'imported but unused' reportsJon Turney1-1/+0
$ 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-11-20Changed code to use detected executables rather than hardcoding sys.executable.Jussi Pakkanen1-1/+1
2017-09-21flake8: Clean up complained-about unused importsLuke Shumaker1-1/+2
This also adds a "# noqa: F401" comment on an unused "import lzma", which we are using it in a try/except block that is being used to check if the lzma module is importable; of course it is unused. v2: This turned out to be a little tricky. mesonbuild/modules/__init__.py had the "unused" import: from ..interpreterbase import permittedKwargs, noKwargs However, that meant that the various modules could do things like: from . import noKwargs # "." is "mesonbuild.modules" Which breaks when you remove __init__.py's "unused" import. I could have tagged that import with "# noqa: F401", but instead I chose to have each of the module import directly from "..interpreterbase" instead of ".".
2017-08-17python3: Add tests for platform-dependant paths and cover include pathGuillaume Poirier-Morency1-1/+1
2017-08-15python3: Fix 'sysconfig_path' for platform-dependant pathsGuillaume Poirier-Morency1-1/+1
Include 'platbase' for stripping the prefix for 'platlib' and 'platinclude'. This is necessary for installing platform-dependant Python modules such as GI overrides.
2017-06-26Converted some modules.Jussi Pakkanen1-4/+9
2017-03-30python3: Add sysconfig_path() methodPatrick Griffis1-0/+14
This returns the value of sysconfig paths, useful for installing modules for example.
2017-03-30python3: Add language_version() methodPatrick Griffis1-0/+8
2017-01-09Add .find_python() method. Supersedes #777.Jussi Pakkanen1-1/+7
2017-01-09There are two different kinds of extensions: modules that create newJussi Pakkanen1-5/+8
objects directly and snippets that just call into interpreter methods.
2017-01-09Created a Python 3 module for simpler building of Python extension modules.Jussi Pakkanen1-0/+40