Commit Graph

9 Commits

Author SHA1 Message Date
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