verilog: add sv_maps iterators
[ghdl-vlg.git] / setup-standalone.in
blob1cbd6a86f2a6d274f8d38ffa09dfb9039bfeddbc
1 # == -*- python -*- ===========================================================
2 #               ____ _   _ ____  _
3 #  _ __  _   _ / ___| | | |  _ \| |
4 # | '_ \| | | | |  _| |_| | | | | |
5 # | |_) | |_| | |_| |  _  | |_| | |___
6 # | .__/ \__, |\____|_| |_|____/|_____|
7 # |_|    |___/
8 # =============================================================================
9 #  Authors:
10 #    Tristan Gingold
11 #    Patrick Lehmann
12 #    Unai Martinez-Corral
14 # Package installer:  Python binding for GHDL and high-level APIs.
16 # License:
17 # ============================================================================
18 #  Copyright (C) 2019-2021 Tristan Gingold
20 #  This program is free software: you can redistribute it and/or modify
21 #  it under the terms of the GNU General Public License as published by
22 #  the Free Software Foundation, either version 2 of the License, or
23 #  (at your option) any later version.
25 #  This program is distributed in the hope that it will be useful,
26 #  but WITHOUT ANY WARRANTY; without even the implied warranty of
27 #  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
28 #  GNU General Public License for more details.
30 #  You should have received a copy of the GNU General Public License
31 #  along with this program.  If not, see <gnu.org/licenses>.
33 # SPDX-License-Identifier: GPL-2.0-or-later
34 # ============================================================================
36 from setuptools import setup, find_namespace_packages, Distribution
38 from pathlib             import Path
39 from pyTooling.Packaging import loadRequirementsFile
40 import glob
42 requirementsFile = Path("dist-wheel/pyGHDL/requirements.txt")
43 install_requires=list(set(loadRequirementsFile(requirementsFile)))
45 #@__init__.py variables
47 # Extend the Distribution class to force platform specific wheel
48 class BinaryDistribution (Distribution):
49     def has_ext_modules(self):
50         return True
52 # Package data files
53 dist_dir="dist-wheel/pyGHDL"
54 package_data=[]
55 package_data.extend(glob.glob(dist_dir+"/lib/ghdl/**/*.vhdl", recursive=True))
56 package_data.extend(glob.glob(dist_dir+"/lib/ghdl/**/*.cf", recursive=True))
57 package_data.extend(glob.glob(dist_dir+"/lib/lib*" + soext))
58 package_data.extend(glob.glob(dist_dir+"/bin/lib*" + soext))
59 package_data=[x[len(dist_dir)+1:] for x in package_data]
61 setup(
62     name="pyGHDL",
63     version=__version__,
64     author=__author__,
65     author_email=__email__,
66     license="GPL-2.0-or-later",
67     description="Python binding for GHDL and high-level APIs (incl. LSP).",
68     long_description=open("dist-wheel/pyGHDL/README.md","r").read(),
69     long_description_content_type="text/markdown",
70     url="https://github.com/ghdl/ghdl",
71     project_urls={"Documentation": "https://ghdl.github.io/ghdl",
72                   "Source Code": "https://github.com/ghdl/ghdl",
73                   "Issue Tracker": "https://github.com/ghdl/ghdl/issues"},
74     packages=find_namespace_packages("dist-wheel"),
75     package_dir={"": "dist-wheel"},
76     classifiers=[
77         "Programming Language :: Python :: 3 :: Only",
78         "Development Status :: Beta",
79         "License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)",
80         "Operating System :: MacOS",
81         "Operating System :: Microsoft :: Windows :: Windows 10",
82         "Operating System :: POSIX :: Linux",
83         "Intended Audience :: Developers",
84         "Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)",
85         "Topic :: Software Development :: Code Generators",
86         "Topic :: Software Development :: Compilers",
87         "Topic :: Software Development :: Testing",
88         "Topic :: Utilities",
89     ],
90     keywords=__keywords__,
91     entry_points={
92         'console_scripts': [
93             "ghdl-ls=pyGHDL.cli.lsp:main",
94             "ghdl-dom=pyGHDL.cli.dom:main"
95             ]
96     },
97     python_requires=">=3.8",
98     install_requires=install_requires,
99     package_data={'pyGHDL': package_data},
100     include_package_data=True,
101     distclass = BinaryDistribution,
102     )