MiniZinc grammar for tree-sitter
at develop 2.2 kB view raw
1#!/usr/bin/env python3 2 3# This Source Code Form is subject to the terms of the Mozilla Public 4# License, v. 2.0. If a copy of the MPL was not distributed with this 5# file, You can obtain one at http://mozilla.org/MPL/2.0/. 6 7from pathlib import Path 8from platform import system 9from setuptools import Extension, find_packages, setup 10 11compile_args = [] 12if system() != "Windows": 13 compile_args.extend(["-std=c99", "-Wno-unused-variable"]) 14 15setup( 16 name="tree-sitter-minizinc", 17 use_scm_version=True, 18 setup_requires=["setuptools_scm"], 19 python_requires=">=3.6", 20 author="Jip J. Dekker", 21 author_email="jip.dekker@monash.edu", 22 description="", 23 long_description=Path("README.md").read_text(encoding="UTF-8"), 24 long_description_content_type="text/markdown", 25 url="https://www.minizinc.org/", 26 project_urls={ 27 "Bug Tracker": "https://github.com/Dekker1/tree-sitter-minizinc/issues", 28 "Source": "https://github.com/Dekker1/tree-sitter-minizinc", 29 }, 30 packages=find_packages(where="bindings/python"), 31 package_dir={"": "bindings/python"}, 32 ext_modules=[ 33 Extension( 34 "tree_sitter_minizinc.binding", 35 ["src/parser.c"], 36 include_dirs=["src"], 37 extra_compile_args=compile_args, 38 ) 39 ], 40 classifiers=[ 41 "Development Status :: 4 - Beta", 42 "Programming Language :: Python :: 3", 43 "Programming Language :: Python :: 3.6", 44 "Programming Language :: Python :: 3.7", 45 "Programming Language :: Python :: 3.8", 46 "Programming Language :: Python :: 3.9", 47 "Programming Language :: Python :: Implementation :: CPython", 48 "Programming Language :: Python :: Implementation :: PyPy", 49 "License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)", 50 "Operating System :: OS Independent", 51 "Topic :: Scientific/Engineering :: Artificial Intelligence", 52 "Topic :: Scientific/Engineering :: Mathematics", 53 ], 54 install_requires=["tree-sitter>= 0.19"], 55 entry_points=""" 56 [pygments.lexers] 57 minizinclexer = tree_sitter_minizinc:MiniZincLexer 58 """, 59 package_data={"": ["queries/*.scm"]}, 60)