From 2ee28029f945d74d01e63d6efd8802c9df03b28f Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Fri, 10 Aug 2018 16:05:07 +0530 Subject: Install meson.exe as the entrypoint on Windows Thanks to Rafael Rivera for the suggestion Fixes https://github.com/mesonbuild/meson/issues/1877 --- setup.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'setup.py') diff --git a/setup.py b/setup.py index 8c267a32f..d8a614b2c 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', -- cgit v1.2.3