2016-01-17 01:50:29 +08:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
|
|
|
|
# Copyright 2016 The Meson development team
|
|
|
|
|
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
# you may not use this file except in compliance with the License.
|
|
|
|
# You may obtain a copy of the License at
|
|
|
|
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
# See the License for the specific language governing permissions and
|
|
|
|
# limitations under the License.
|
|
|
|
|
2016-03-28 18:00:08 +08:00
|
|
|
import sys
|
2017-01-08 19:02:53 +08:00
|
|
|
|
2019-07-06 06:13:47 +08:00
|
|
|
if sys.version_info < (3, 5, 2):
|
2019-06-24 00:40:35 +08:00
|
|
|
raise SystemExit('ERROR: Tried to install Meson with an unsupported Python version: \n{}'
|
2019-07-06 06:13:47 +08:00
|
|
|
'\nMeson requires Python 3.5.2 or greater'.format(sys.version))
|
2016-03-28 18:00:08 +08:00
|
|
|
|
2018-10-23 06:03:45 +08:00
|
|
|
from mesonbuild.coredata import version
|
2018-08-11 07:20:55 +08:00
|
|
|
from setuptools import setup
|
2016-10-01 11:28:40 +08:00
|
|
|
|
2018-08-11 07:20:55 +08:00
|
|
|
# On windows, will create Scripts/meson.exe and Scripts/meson-script.py
|
|
|
|
# Other platforms will create bin/meson
|
|
|
|
entries = {'console_scripts': ['meson=mesonbuild.mesonmain:main']}
|
2018-08-12 03:25:04 +08:00
|
|
|
packages = ['mesonbuild',
|
2019-01-23 00:47:51 +08:00
|
|
|
'mesonbuild.ast',
|
2018-08-12 03:25:04 +08:00
|
|
|
'mesonbuild.backend',
|
2019-02-22 04:30:42 +08:00
|
|
|
'mesonbuild.cmake',
|
2018-08-12 03:25:04 +08:00
|
|
|
'mesonbuild.compilers',
|
|
|
|
'mesonbuild.dependencies',
|
|
|
|
'mesonbuild.modules',
|
|
|
|
'mesonbuild.scripts',
|
|
|
|
'mesonbuild.wrap']
|
2019-06-28 19:13:57 +08:00
|
|
|
package_data = {
|
|
|
|
'mesonbuild.dependencies': ['data/CMakeLists.txt', 'data/CMakeListsLLVM.txt', 'data/CMakePathInfo.txt'],
|
|
|
|
'mesonbuild.cmake': ['data/run_ctgt.py'],
|
|
|
|
}
|
2018-08-12 03:25:04 +08:00
|
|
|
data_files = []
|
|
|
|
if sys.platform != 'win32':
|
|
|
|
# Only useful on UNIX-like systems
|
|
|
|
data_files = [('share/man/man1', ['man/meson.1']),
|
|
|
|
('share/polkit-1/actions', ['data/com.mesonbuild.install.policy'])]
|
2018-08-10 18:35:07 +08:00
|
|
|
|
2018-08-12 03:25:04 +08:00
|
|
|
if __name__ == '__main__':
|
|
|
|
setup(name='meson',
|
|
|
|
version=version,
|
|
|
|
packages=packages,
|
2018-11-23 04:30:12 +08:00
|
|
|
package_data=package_data,
|
2018-08-12 03:25:04 +08:00
|
|
|
entry_points=entries,
|
2019-06-24 00:40:35 +08:00
|
|
|
data_files=data_files,)
|