How to install meson from github sources to a specific directory

2,863 views
Skip to first unread message

Wink Saville

unread,
Jul 16, 2016, 12:28:19 PM7/16/16
to The Meson Build System
I've been using release 0.28.0 and I tried to upgrade to 0.29.0 but was unable to install from the github source tree, see this post, so I stuck with 0.28.0. I decided it was time to try again and to get 0.32.0 working. So I'm at tip of tree as of this morning:

$ git log -1
commit 9e37c8a308db3300f9f5f91ea4da0ccd86f195b1
Author: Jussi Pakkanen <j...@gmail.com>
Date:   Sun Jul 3 18:31:46 2016 +0300

    Warn if PKG_CONFIG_PATH has changed because it may cause dependency detection to fail. Closes #626.



And I tried installing to /home/wink/optx as follows:

$ python3 setup.py install --prefix=/home/wink/optx
running install
Checking .pth file support in /home/wink/optx/lib/python3.5/site-packages/
/usr/bin/python3 -E -c pass
TEST FAILED: /home/wink/optx/lib/python3.5/site-packages/ does NOT support .pth files
error: bad install directory or PYTHONPATH

You are attempting to install a package to a directory that is not
on PYTHONPATH and which Python does not read ".pth" files from.  The
installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    /home/wink/optx/lib/python3.5/site-packages/

and your PYTHONPATH environment variable currently contains:

    ''

Here are some of your options for correcting the problem:

* You can choose a different installation directory, i.e., one that is
  on PYTHONPATH or supports .pth files

* You can add the installation directory to the PYTHONPATH environment
  variable.  (It must then also be on PYTHONPATH whenever you run
  Python and want to use the package(s) you are installing.)

* You can set up the installation directory to support ".pth" files by
  using one of the approaches described here:


Please make the appropriate changes for your system and try again.



That didn't work, as the first option, to use a existing directory, isn't what I want I tried the second option, adding /home/wink/optx as my PYTHONPATH.
That also didn't work:

$ python3 setup.py install --prefix=/home/wink/optx
running install
Checking .pth file support in /home/wink/optx/lib/python3.5/site-packages/
/usr/bin/python3 -E -c pass
TEST FAILED: /home/wink/optx/lib/python3.5/site-packages/ does NOT support .pth files
error: bad install directory or PYTHONPATH

You are attempting to install a package to a directory that is not
on PYTHONPATH and which Python does not read ".pth" files from.  The
installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:

    /home/wink/optx/lib/python3.5/site-packages/

and your PYTHONPATH environment variable currently contains:

    '/home/wink/optx'

Here are some of your options for correcting the problem:

* You can choose a different installation directory, i.e., one that is
  on PYTHONPATH or supports .pth files

* You can add the installation directory to the PYTHONPATH environment
  variable.  (It must then also be on PYTHONPATH whenever you run
  Python and want to use the package(s) you are installing.)

* You can set up the installation directory to support ".pth" files by
  using one of the approaches described here:


Please make the appropriate changes for your system and try again.

The last option, "setup the installation directory to support ".pth" files", I doesn't seem to directly allow me to specify an install directory. As a side note the link in the help test from "setup" was incorrect, it seems to be here, https://setuptools.readthedocs.io/en/latest/easy_install.html#custom-installation-locations.

I'm sure I can't be the only person who would like to use meson install in a particular directory. I assume meson developers need to test a "tip of tree" version while also being able to use a "release" version at other times.

Anyway, thanks in advance,

-- Wink

Jussi Pakkanen

unread,
Jul 17, 2016, 6:22:48 AM7/17/16
to Wink Saville, The Meson Build System
On Sat, Jul 16, 2016 at 7:28 PM, Wink Saville <wi...@saville.com> wrote:

> That didn't work, as the first option, to use a existing directory, isn't
> what I want I tried the second option, adding /home/wink/optx as my
> PYTHONPATH.
> That also didn't work:

> You are attempting to install a package to a directory that is not
> on PYTHONPATH and which Python does not read ".pth" files from. The
> installation directory you specified (via --install-dir, --prefix, or
> the distutils default setting) was:
>
> /home/wink/optx/lib/python3.5/site-packages/
>
> and your PYTHONPATH environment variable currently contains:
>
> '/home/wink/optx'

I have not tested Python local installs much but this seems to
indicate that your PYTHONPATH needs to
be/home/wink/optx/lib/python3.5/site-packages/ instead of
/home/wink/optx. Setuptools enforces a certain subdirectory structure
to files it installs.

If you just want to have Meson in a specific directory, do a git
checkout to that directory. Meson has been designed to run directly
from a git checkout.

Wink Saville

unread,
Jul 17, 2016, 1:50:01 PM7/17/16
to The Meson Build System, wi...@saville.com
I've done a little more investigation and now I'm more confused. When
I use "sudo pip3 install meson" the executable is installed as "meson.py"
not "meson" as I expected, see bold lines below:

$ sudo pip3 install -v meson
Collecting meson
  1 location(s) to search for versions of meson:
  Looking up "https://pypi.python.org/simple/meson/" in the cache
  Current age based on date: 333
  Freshness lifetime from max-age: 600
  Freshness lifetime from request max-age: 600
  The response is "fresh", returning cached response
  600 > 333
  Analyzing links from page https://pypi.python.org/simple/meson/
  Using version 0.32.0 (newest of versions: 0.29.0, 0.30.0, 0.31.0, 0.32.0)
  Current age based on date: 333
  Freshness lifetime from max-age: 31557600
  The response is "fresh", returning cached response
  31557600 > 333
  Using cached meson-0.32.0.tar.gz
  Running setup.py (path:/tmp/pip-build-zhelr_sc/meson/setup.py) egg_info for package meson
    Running command python setup.py egg_info
    running egg_info
    creating pip-egg-info/meson.egg-info
    writing top-level names to pip-egg-info/meson.egg-info/top_level.txt
    writing pip-egg-info/meson.egg-info/PKG-INFO
    writing dependency_links to pip-egg-info/meson.egg-info/dependency_links.txt
    writing manifest file 'pip-egg-info/meson.egg-info/SOURCES.txt'
    warning: manifest_maker: standard file '-c' not found

    reading manifest file 'pip-egg-info/meson.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no files found matching 'readme.txt'
    writing manifest file 'pip-egg-info/meson.egg-info/SOURCES.txt'
Installing collected packages: meson
  Running setup.py install for meson ...     Running command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-zhelr_sc/meson/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-8m8lktyg-record/install-record.txt --single-version-externally-managed --compile
    running install
    running build
    running build_py
    creating build
    creating build/lib
    creating build/lib/mesonbuild
    copying mesonbuild/optinterpreter.py -> build/lib/mesonbuild
    copying mesonbuild/mparser.py -> build/lib/mesonbuild
    copying mesonbuild/mlog.py -> build/lib/mesonbuild
    copying mesonbuild/mintro.py -> build/lib/mesonbuild
    copying mesonbuild/mesonmain.py -> build/lib/mesonbuild
    copying mesonbuild/mesonlib.py -> build/lib/mesonbuild
    copying mesonbuild/mconf.py -> build/lib/mesonbuild
    copying mesonbuild/interpreter.py -> build/lib/mesonbuild
    copying mesonbuild/environment.py -> build/lib/mesonbuild
    copying mesonbuild/dependencies.py -> build/lib/mesonbuild
    copying mesonbuild/coredata.py -> build/lib/mesonbuild
    copying mesonbuild/compilers.py -> build/lib/mesonbuild
    copying mesonbuild/build.py -> build/lib/mesonbuild
    copying mesonbuild/__init__.py -> build/lib/mesonbuild
    creating build/lib/mesonbuild/modules
    copying mesonbuild/modules/windows.py -> build/lib/mesonbuild/modules
    copying mesonbuild/modules/rpm.py -> build/lib/mesonbuild/modules
    copying mesonbuild/modules/qt5.py -> build/lib/mesonbuild/modules
    copying mesonbuild/modules/qt4.py -> build/lib/mesonbuild/modules
    copying mesonbuild/modules/pkgconfig.py -> build/lib/mesonbuild/modules
    copying mesonbuild/modules/modtest.py -> build/lib/mesonbuild/modules
    copying mesonbuild/modules/i18n.py -> build/lib/mesonbuild/modules
    copying mesonbuild/modules/gnome.py -> build/lib/mesonbuild/modules
    copying mesonbuild/modules/__init__.py -> build/lib/mesonbuild/modules
    creating build/lib/mesonbuild/scripts
    copying mesonbuild/scripts/vcstagger.py -> build/lib/mesonbuild/scripts
    copying mesonbuild/scripts/symbolextractor.py -> build/lib/mesonbuild/scripts
    copying mesonbuild/scripts/scanbuild.py -> build/lib/mesonbuild/scripts
    copying mesonbuild/scripts/regen_checker.py -> build/lib/mesonbuild/scripts
    copying mesonbuild/scripts/meson_test.py -> build/lib/mesonbuild/scripts
    copying mesonbuild/scripts/meson_install.py -> build/lib/mesonbuild/scripts
    copying mesonbuild/scripts/meson_exe.py -> build/lib/mesonbuild/scripts
    copying mesonbuild/scripts/meson_benchmark.py -> build/lib/mesonbuild/scripts
    copying mesonbuild/scripts/gtkdochelper.py -> build/lib/mesonbuild/scripts
    copying mesonbuild/scripts/gettext.py -> build/lib/mesonbuild/scripts
    copying mesonbuild/scripts/dirchanger.py -> build/lib/mesonbuild/scripts
    copying mesonbuild/scripts/depfixer.py -> build/lib/mesonbuild/scripts
    copying mesonbuild/scripts/delwithsuffix.py -> build/lib/mesonbuild/scripts
    copying mesonbuild/scripts/commandrunner.py -> build/lib/mesonbuild/scripts
    copying mesonbuild/scripts/__init__.py -> build/lib/mesonbuild/scripts
    creating build/lib/mesonbuild/backend
    copying mesonbuild/backend/xcodebackend.py -> build/lib/mesonbuild/backend
    copying mesonbuild/backend/vs2015backend.py -> build/lib/mesonbuild/backend
    copying mesonbuild/backend/vs2010backend.py -> build/lib/mesonbuild/backend
    copying mesonbuild/backend/ninjabackend.py -> build/lib/mesonbuild/backend
    copying mesonbuild/backend/backends.py -> build/lib/mesonbuild/backend
    copying mesonbuild/backend/__init__.py -> build/lib/mesonbuild/backend
    creating build/lib/mesonbuild/wrap
    copying mesonbuild/wrap/wraptool.py -> build/lib/mesonbuild/wrap
    copying mesonbuild/wrap/wrap.py -> build/lib/mesonbuild/wrap
    copying mesonbuild/wrap/__init__.py -> build/lib/mesonbuild/wrap
    running build_scripts
    creating build/scripts-3.5
    copying and adjusting meson.py -> build/scripts-3.5
    copying and adjusting mesonconf.py -> build/scripts-3.5
    copying and adjusting mesonintrospect.py -> build/scripts-3.5
    copying and adjusting wraptool.py -> build/scripts-3.5
    changing mode of build/scripts-3.5/meson.py from 644 to 755
    changing mode of build/scripts-3.5/mesonconf.py from 644 to 755
    changing mode of build/scripts-3.5/mesonintrospect.py from 644 to 755
    changing mode of build/scripts-3.5/wraptool.py from 644 to 755
    running install_lib
    creating /usr/lib/python3.5/site-packages/mesonbuild
    creating /usr/lib/python3.5/site-packages/mesonbuild/wrap
    copying build/lib/mesonbuild/wrap/__init__.py -> /usr/lib/python3.5/site-packages/mesonbuild/wrap
    copying build/lib/mesonbuild/wrap/wrap.py -> /usr/lib/python3.5/site-packages/mesonbuild/wrap
    copying build/lib/mesonbuild/wrap/wraptool.py -> /usr/lib/python3.5/site-packages/mesonbuild/wrap
    creating /usr/lib/python3.5/site-packages/mesonbuild/backend
    copying build/lib/mesonbuild/backend/__init__.py -> /usr/lib/python3.5/site-packages/mesonbuild/backend
    copying build/lib/mesonbuild/backend/backends.py -> /usr/lib/python3.5/site-packages/mesonbuild/backend
    copying build/lib/mesonbuild/backend/ninjabackend.py -> /usr/lib/python3.5/site-packages/mesonbuild/backend
    copying build/lib/mesonbuild/backend/vs2010backend.py -> /usr/lib/python3.5/site-packages/mesonbuild/backend
    copying build/lib/mesonbuild/backend/vs2015backend.py -> /usr/lib/python3.5/site-packages/mesonbuild/backend
    copying build/lib/mesonbuild/backend/xcodebackend.py -> /usr/lib/python3.5/site-packages/mesonbuild/backend
    creating /usr/lib/python3.5/site-packages/mesonbuild/scripts
    copying build/lib/mesonbuild/scripts/__init__.py -> /usr/lib/python3.5/site-packages/mesonbuild/scripts
    copying build/lib/mesonbuild/scripts/commandrunner.py -> /usr/lib/python3.5/site-packages/mesonbuild/scripts
    copying build/lib/mesonbuild/scripts/delwithsuffix.py -> /usr/lib/python3.5/site-packages/mesonbuild/scripts
    copying build/lib/mesonbuild/scripts/depfixer.py -> /usr/lib/python3.5/site-packages/mesonbuild/scripts
    copying build/lib/mesonbuild/scripts/dirchanger.py -> /usr/lib/python3.5/site-packages/mesonbuild/scripts
    copying build/lib/mesonbuild/scripts/gettext.py -> /usr/lib/python3.5/site-packages/mesonbuild/scripts
    copying build/lib/mesonbuild/scripts/gtkdochelper.py -> /usr/lib/python3.5/site-packages/mesonbuild/scripts
    copying build/lib/mesonbuild/scripts/meson_benchmark.py -> /usr/lib/python3.5/site-packages/mesonbuild/scripts
    copying build/lib/mesonbuild/scripts/meson_exe.py -> /usr/lib/python3.5/site-packages/mesonbuild/scripts
    copying build/lib/mesonbuild/scripts/meson_install.py -> /usr/lib/python3.5/site-packages/mesonbuild/scripts
    copying build/lib/mesonbuild/scripts/meson_test.py -> /usr/lib/python3.5/site-packages/mesonbuild/scripts
    copying build/lib/mesonbuild/scripts/regen_checker.py -> /usr/lib/python3.5/site-packages/mesonbuild/scripts
    copying build/lib/mesonbuild/scripts/scanbuild.py -> /usr/lib/python3.5/site-packages/mesonbuild/scripts
    copying build/lib/mesonbuild/scripts/symbolextractor.py -> /usr/lib/python3.5/site-packages/mesonbuild/scripts
    copying build/lib/mesonbuild/scripts/vcstagger.py -> /usr/lib/python3.5/site-packages/mesonbuild/scripts
    creating /usr/lib/python3.5/site-packages/mesonbuild/modules
    copying build/lib/mesonbuild/modules/__init__.py -> /usr/lib/python3.5/site-packages/mesonbuild/modules
    copying build/lib/mesonbuild/modules/gnome.py -> /usr/lib/python3.5/site-packages/mesonbuild/modules
    copying build/lib/mesonbuild/modules/i18n.py -> /usr/lib/python3.5/site-packages/mesonbuild/modules
    copying build/lib/mesonbuild/modules/modtest.py -> /usr/lib/python3.5/site-packages/mesonbuild/modules
    copying build/lib/mesonbuild/modules/pkgconfig.py -> /usr/lib/python3.5/site-packages/mesonbuild/modules
    copying build/lib/mesonbuild/modules/qt4.py -> /usr/lib/python3.5/site-packages/mesonbuild/modules
    copying build/lib/mesonbuild/modules/qt5.py -> /usr/lib/python3.5/site-packages/mesonbuild/modules
    copying build/lib/mesonbuild/modules/rpm.py -> /usr/lib/python3.5/site-packages/mesonbuild/modules
    copying build/lib/mesonbuild/modules/windows.py -> /usr/lib/python3.5/site-packages/mesonbuild/modules
    copying build/lib/mesonbuild/__init__.py -> /usr/lib/python3.5/site-packages/mesonbuild
    copying build/lib/mesonbuild/build.py -> /usr/lib/python3.5/site-packages/mesonbuild
    copying build/lib/mesonbuild/compilers.py -> /usr/lib/python3.5/site-packages/mesonbuild
    copying build/lib/mesonbuild/coredata.py -> /usr/lib/python3.5/site-packages/mesonbuild
    copying build/lib/mesonbuild/dependencies.py -> /usr/lib/python3.5/site-packages/mesonbuild
    copying build/lib/mesonbuild/environment.py -> /usr/lib/python3.5/site-packages/mesonbuild
    copying build/lib/mesonbuild/interpreter.py -> /usr/lib/python3.5/site-packages/mesonbuild
    copying build/lib/mesonbuild/mconf.py -> /usr/lib/python3.5/site-packages/mesonbuild
    copying build/lib/mesonbuild/mesonlib.py -> /usr/lib/python3.5/site-packages/mesonbuild
    copying build/lib/mesonbuild/mesonmain.py -> /usr/lib/python3.5/site-packages/mesonbuild
    copying build/lib/mesonbuild/mintro.py -> /usr/lib/python3.5/site-packages/mesonbuild
    copying build/lib/mesonbuild/mlog.py -> /usr/lib/python3.5/site-packages/mesonbuild
    copying build/lib/mesonbuild/mparser.py -> /usr/lib/python3.5/site-packages/mesonbuild
    copying build/lib/mesonbuild/optinterpreter.py -> /usr/lib/python3.5/site-packages/mesonbuild
    byte-compiling /usr/lib/python3.5/site-packages/mesonbuild/wrap/__init__.py to __init__.cpython-35.pyc
    byte-compiling /usr/lib/python3.5/site-packages/mesonbuild/wrap/wrap.py to wrap.cpython-35.pyc
    byte-compiling /usr/lib/python3.5/site-packages/mesonbuild/wrap/wraptool.py to wraptool.cpython-35.pyc
    byte-compiling /usr/lib/python3.5/site-packages/mesonbuild/backend/__init__.py to __init__.cpython-35.pyc
    byte-compiling /usr/lib/python3.5/site-packages/mesonbuild/backend/backends.py to backends.cpython-35.pyc
    byte-compiling /usr/lib/python3.5/site-packages/mesonbuild/backend/ninjabackend.py to ninjabackend.cpython-35.pyc
    byte-compiling /usr/lib/python3.5/site-packages/mesonbuild/backend/vs2010backend.py to vs2010backend.cpython-35.pyc
    byte-compiling /usr/lib/python3.5/site-packages/mesonbuild/backend/vs2015backend.py to vs2015backend.cpython-35.pyc
    byte-compiling /usr/lib/python3.5/site-packages/mesonbuild/backend/xcodebackend.py to xcodebackend.cpython-35.pyc
    byte-compiling /usr/lib/python3.5/site-packages/mesonbuild/scripts/__init__.py to __init__.cpython-35.pyc
    byte-compiling /usr/lib/python3.5/site-packages/mesonbuild/scripts/commandrunner.py to commandrunner.cpython-35.pyc
    byte-compiling /usr/lib/python3.5/site-packages/mesonbuild/scripts/delwithsuffix.py to delwithsuffix.cpython-35.pyc
    byte-compiling /usr/lib/python3.5/site-packages/mesonbuild/scripts/depfixer.py to depfixer.cpython-35.pyc
    byte-compiling /usr/lib/python3.5/site-packages/mesonbuild/scripts/dirchanger.py to dirchanger.cpython-35.pyc
    byte-compiling /usr/lib/python3.5/site-packages/mesonbuild/scripts/gettext.py to gettext.cpython-35.pyc
    byte-compiling /usr/lib/python3.5/site-packages/mesonbuild/scripts/gtkdochelper.py to gtkdochelper.cpython-35.pyc
    byte-compiling /usr/lib/python3.5/site-packages/mesonbuild/scripts/meson_benchmark.py to meson_benchmark.cpython-35.pyc
    byte-compiling /usr/lib/python3.5/site-packages/mesonbuild/scripts/meson_exe.py to meson_exe.cpython-35.pyc
    byte-compiling /usr/lib/python3.5/site-packages/mesonbuild/scripts/meson_install.py to meson_install.cpython-35.pyc
    byte-compiling /usr/lib/python3.5/site-packages/mesonbuild/scripts/meson_test.py to meson_test.cpython-35.pyc
    byte-compiling /usr/lib/python3.5/site-packages/mesonbuild/scripts/regen_checker.py to regen_checker.cpython-35.pyc
    byte-compiling /usr/lib/python3.5/site-packages/mesonbuild/scripts/scanbuild.py to scanbuild.cpython-35.pyc
    byte-compiling /usr/lib/python3.5/site-packages/mesonbuild/scripts/symbolextractor.py to symbolextractor.cpython-35.pyc
    byte-compiling /usr/lib/python3.5/site-packages/mesonbuild/scripts/vcstagger.py to vcstagger.cpython-35.pyc
    byte-compiling /usr/lib/python3.5/site-packages/mesonbuild/modules/__init__.py to __init__.cpython-35.pyc
    byte-compiling /usr/lib/python3.5/site-packages/mesonbuild/modules/gnome.py to gnome.cpython-35.pyc
    byte-compiling /usr/lib/python3.5/site-packages/mesonbuild/modules/i18n.py to i18n.cpython-35.pyc
    byte-compiling /usr/lib/python3.5/site-packages/mesonbuild/modules/modtest.py to modtest.cpython-35.pyc
    byte-compiling /usr/lib/python3.5/site-packages/mesonbuild/modules/pkgconfig.py to pkgconfig.cpython-35.pyc
    byte-compiling /usr/lib/python3.5/site-packages/mesonbuild/modules/qt4.py to qt4.cpython-35.pyc
    byte-compiling /usr/lib/python3.5/site-packages/mesonbuild/modules/qt5.py to qt5.cpython-35.pyc
    byte-compiling /usr/lib/python3.5/site-packages/mesonbuild/modules/rpm.py to rpm.cpython-35.pyc
    byte-compiling /usr/lib/python3.5/site-packages/mesonbuild/modules/windows.py to windows.cpython-35.pyc
    byte-compiling /usr/lib/python3.5/site-packages/mesonbuild/__init__.py to __init__.cpython-35.pyc
    byte-compiling /usr/lib/python3.5/site-packages/mesonbuild/build.py to build.cpython-35.pyc
    byte-compiling /usr/lib/python3.5/site-packages/mesonbuild/compilers.py to compilers.cpython-35.pyc
    byte-compiling /usr/lib/python3.5/site-packages/mesonbuild/coredata.py to coredata.cpython-35.pyc
    byte-compiling /usr/lib/python3.5/site-packages/mesonbuild/dependencies.py to dependencies.cpython-35.pyc
    byte-compiling /usr/lib/python3.5/site-packages/mesonbuild/environment.py to environment.cpython-35.pyc
    byte-compiling /usr/lib/python3.5/site-packages/mesonbuild/interpreter.py to interpreter.cpython-35.pyc
    byte-compiling /usr/lib/python3.5/site-packages/mesonbuild/mconf.py to mconf.cpython-35.pyc
    byte-compiling /usr/lib/python3.5/site-packages/mesonbuild/mesonlib.py to mesonlib.cpython-35.pyc
    byte-compiling /usr/lib/python3.5/site-packages/mesonbuild/mesonmain.py to mesonmain.cpython-35.pyc
    byte-compiling /usr/lib/python3.5/site-packages/mesonbuild/mintro.py to mintro.cpython-35.pyc
    byte-compiling /usr/lib/python3.5/site-packages/mesonbuild/mlog.py to mlog.cpython-35.pyc
    byte-compiling /usr/lib/python3.5/site-packages/mesonbuild/mparser.py to mparser.cpython-35.pyc
    byte-compiling /usr/lib/python3.5/site-packages/mesonbuild/optinterpreter.py to optinterpreter.cpython-35.pyc
    running install_data
    copying man/meson.1 -> /usr/share/man/man1
    copying man/mesonconf.1 -> /usr/share/man/man1
    copying man/mesonintrospect.1 -> /usr/share/man/man1
    copying man/wraptool.1 -> /usr/share/man/man1
    running install_egg_info
    running egg_info
    writing top-level names to meson.egg-info/top_level.txt
    writing dependency_links to meson.egg-info/dependency_links.txt
    writing meson.egg-info/PKG-INFO
    warning: manifest_maker: standard file '-c' not found

    reading manifest file 'meson.egg-info/SOURCES.txt'
    reading manifest template 'MANIFEST.in'
    warning: no files found matching 'readme.txt'
    writing manifest file 'meson.egg-info/SOURCES.txt'
    Copying meson.egg-info to /usr/lib/python3.5/site-packages/meson-0.32.0-py3.5.egg-info
    running install_scripts
    copying build/scripts-3.5/wraptool.py -> /usr/bin
    copying build/scripts-3.5/mesonintrospect.py -> /usr/bin
    copying build/scripts-3.5/mesonconf.py -> /usr/bin
    copying build/scripts-3.5/meson.py -> /usr/bin
    changing mode of /usr/bin/wraptool.py to 755
    changing mode of /usr/bin/mesonintrospect.py to 755
    changing mode of /usr/bin/mesonconf.py to 755
    changing mode of /usr/bin/meson.py to 755
    writing list of installed files to '/tmp/pip-8m8lktyg-record/install-record.txt'
done
  Removing source in /tmp/pip-build-zhelr_sc/meson
Successfully installed meson-0.32.0
Cleaning up...


And see my this ls command:

$ ls -al /usr/bin/meson*
-rwxr-xr-x 1 root root 682 Jul 17 10:40 /usr/bin/mesonconf.py
-rwxr-xr-x 1 root root 684 Jul 17 10:40 /usr/bin/mesonintrospect.py
-rwxr-xr-x 1 root root 826 Jul 17 10:40 /usr/bin/meson.py

Jussi Pakkanen

unread,
Jul 17, 2016, 3:20:54 PM7/17/16
to Wink Saville, The Meson Build System
On Sun, Jul 17, 2016 at 8:50 PM, Wink Saville <wi...@saville.com> wrote:

> I've done a little more investigation and now I'm more confused. When
> I use "sudo pip3 install meson" the executable is installed as "meson.py"
> not "meson" as I expected, see bold lines below:

This is noted in the readme.

The reason for this is long and sordid. On Windows you definitely want
to have the .py extension but on other platforms you don't. In
addition Python's installer tools will (randomly and without warning)
rename your script file to have the .py extension. Sometimes they take
it away. Seemingly at random. I have not managed to find a combination
that would work as expected on every platform, so sometimes the .py
extension is there. Sorry about that but it is unfortunately the least
bad of several awful possible outcomes.

Wink Saville

unread,
Jul 18, 2016, 12:32:56 AM7/18/16
to The Meson Build System, wi...@saville.com
That is gross and I did miss the sentence; "Depending on how you obtained Meson the command might also be called meson.py instead of plain meson."
I'd like to suggest you always install both then xxx.py and xxx then.

I'm going to do a little more exploring and see if I can get "pip3 install --target=/home/wink/optx meson", see here. From what that says its what I want but its not currently working for me.

Wink Saville

unread,
Jul 18, 2016, 2:47:01 AM7/18/16
to The Meson Build System, wi...@saville.com
I'm going to do a little more exploring and see if I can get "pip3 install --target=/home/wink/optx meson", see here. From what that says its what I want but its not currently working for me.

After doing some googling and experimenting I found that using pip3 with the --prefix option and then updating the PYTHONPATH worked for me:

$ pip3 install --prefix /home/wink/optx meson==0.32.0
Collecting meson
  Using cached meson-0.32.0.tar.gz
Installing collected packages: meson
  Running setup.py install for meson ... done
Successfully installed meson
$ export PYTHONPATH=/home/wink/optx/lib/python3.5/site-packages:$PYTHONPATH
$ which meson
/home/wink/optx/bin/meson
$ meson --version
0.32.0

Specifying the version (meson==0.32.0) is optional, but I find it desirable.
Reply all
Reply to author
Forward
0 new messages