Dylan Baker
40e3577a65
split program related classes and functions out of dependencies
...
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-19 08:47:10 -04:00
Eli Schwartz
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
John Ericson
3a4388e51d
Fix legacy env var support with cross
...
Fix #3969
2020-03-23 17:51:36 +02:00
John Ericson
2b22576fb6
Remove cross_info; cross file is parsed up front and discarded
2019-01-02 16:22:47 -05:00
Dylan Baker
091452f8cd
modules/python3: allow specifying in the native file
2018-11-14 15:57:37 -08:00
Xavier Claessens
047db1c64c
Print warning when using deprecated 'python3' module
2018-10-07 19:22:43 +03: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
Jussi Pakkanen
bdb57cf62a
Convert Gnome module to use find_program from interpreter.
2018-04-15 13:32:38 +05:30
Xavier Claessens
cf0e997167
Remove duplicated list of known kwargs for build targets
2018-04-03 15:20:19 -04:00
Jon Turney
cd5dba5358
Fix flake8 'imported but unused' reports
...
$ 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
2018-03-03 21:06:45 +00:00
Jussi Pakkanen
9d67e5030b
Changed code to use detected executables rather than hardcoding sys.executable.
2017-11-20 23:08:17 +02:00
Luke Shumaker
4dbbb4884c
flake8: Clean up complained-about unused imports
...
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-09-21 13:41:03 -04:00
Guillaume Poirier-Morency
2653000ac7
python3: Add tests for platform-dependant paths and cover include path
2017-08-17 09:42:33 -04:00
Guillaume Poirier-Morency
92e2e1e2d8
python3: Fix 'sysconfig_path' for platform-dependant paths
...
Include 'platbase' for stripping the prefix for 'platlib' and 'platinclude'.
This is necessary for installing platform-dependant Python modules such as GI overrides.
2017-08-15 16:39:38 -04:00
Jussi Pakkanen
80d665e8de
Converted some modules.
2017-06-26 21:10:27 +03:00
Patrick Griffis
a9c30ce8b5
python3: Add sysconfig_path() method
...
This returns the value of sysconfig paths, useful for
installing modules for example.
2017-03-30 09:13:01 -04:00
Patrick Griffis
b6e06dd80b
python3: Add language_version() method
2017-03-30 09:13:01 -04:00
Jussi Pakkanen
6ac9a8e738
Add .find_python() method. Supersedes #777 .
2017-01-09 21:23:18 +02:00
Jussi Pakkanen
fbabe8ad85
There are two different kinds of extensions: modules that create new
...
objects directly and snippets that just call into interpreter methods.
2017-01-09 21:11:48 +02:00
Jussi Pakkanen
24221d71cc
Created a Python 3 module for simpler building of Python extension modules.
2017-01-09 21:07:23 +02:00