aboutsummaryrefslogtreecommitdiff
path: root/setup.py
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2018-08-10 16:05:07 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2018-08-11 03:19:57 +0530
commit2ee28029f945d74d01e63d6efd8802c9df03b28f (patch)
tree8fb6554f12650e2a9043bf108a320ec7f6681ed2 /setup.py
parent9f5c84279e65b70865d873999205012f2a2b859e (diff)
downloadmeson-2ee28029f945d74d01e63d6efd8802c9df03b28f.zip
meson-2ee28029f945d74d01e63d6efd8802c9df03b28f.tar.gz
meson-2ee28029f945d74d01e63d6efd8802c9df03b28f.tar.bz2
Install meson.exe as the entrypoint on Windows
Thanks to Rafael Rivera for the suggestion Fixes https://github.com/mesonbuild/meson/issues/1877
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/setup.py b/setup.py
index 8c267a3..d8a614b 100644
--- a/setup.py
+++ b/setup.py
@@ -56,6 +56,13 @@ class install_scripts(orig):
self.copy_file(in_built, outfile)
self.outfiles.append(outfile)
+entries = {}
+if sys.platform == 'win32':
+ # This will create Scripts/meson.exe and Scripts/meson-script.py
+ # Can't use this on all platforms because distutils doesn't support
+ # entry_points in setup()
+ entries = {'console_scripts': ['meson=mesonbuild.mesonmain:main']}
+
setup(name='meson',
version=version,
description='A high performance build system',
@@ -73,6 +80,7 @@ setup(name='meson',
'mesonbuild.wrap'],
scripts=['meson.py'],
cmdclass={'install_scripts': install_scripts},
+ entry_points=entries,
data_files=[('share/man/man1', ['man/meson.1']),
('share/polkit-1/actions', ['data/com.mesonbuild.install.policy'])],
classifiers=['Development Status :: 5 - Production/Stable',