buildout.cfg 997 Bytes
Newer Older
Julien Muchembled's avatar
Julien Muchembled committed
1 2 3 4 5 6 7 8 9 10
[buildout]
extends =
  ../python3/buildout.cfg
parts =
  meson

[meson]
recipe = slapos.recipe.cmmi
shared = true
url = https://github.com/mesonbuild/meson/releases/download/${:version}/meson-${:version}.tar.gz
11 12
version = 0.62.1
md5sum = 2f5301d0e7fd5544ab0004393ba44cbe
Julien Muchembled's avatar
Julien Muchembled committed
13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36
configure-command = true
make-binary = true
post-install =
  %(python)s -m venv %(location)s
  set %(location)s/bin/python3
  $1 setup.py install_data install_lib
  $1 <<EOF
  import os, pkg_resources, sys
  for name, ep in pkg_resources.get_entry_map(
      'meson==%(version)s', 'console_scripts').items():
    fd = os.open(%(location)r '/bin/' + name, os.O_WRONLY|os.O_CREAT|os.O_EXCL)
    os.write(fd, ("""#!$1
  import os, sys
  from %%s import %%s
  if __name__ == '__main__':
    sys.exit(%%s())
  """ %% (ep.module_name, ep.attrs[0], '.'.join(ep.attrs))).encode())
    os.close(fd)
  EOF
  %(location)s/bin/pip uninstall -y pip setuptools
python = ${python3:executable}

[meson:python3]
python = ${buildout:executable}