Make syntax error call yyerror() rather than raising a Python exception
[piyacc.git] / setup.py
1 #!/usr/bin/env python3
2
3 import setuptools
4 import os.path
5
6 here = os.path.abspath(os.path.dirname(__file__))
7
8 with open(os.path.join(here, 'README.md'), encoding = 'utf-8') as fin:
9   long_description = fin.read()
10
11 setuptools.setup(
12   # This is the name of your project. The first time you publish this
13   # package, this name will be registered for you. It will determine how
14   # users can install this project, e.g.:
15   #
16   # $ pip install sampleproject
17   #
18   # And where it will live on PyPI: https://pypi.org/project/sampleproject/
19   #
20   # There are some restrictions on what makes a valid project name
21   # specification here:
22   # https://packaging.python.org/specifications/core-metadata/#name
23   name = 'piyacc', # required
24
25   # Versions should comply with PEP 440:
26   # https://www.python.org/dev/peps/pep-0440/
27   #
28   # For a discussion on single-sourcing the version across setup.py and the
29   # project code, see
30   # https://packaging.python.org/en/latest/single_source_version.html
31   version = '0.0.1', # required
32
33   # This is a one-line description or tagline of what your project does. This
34   # corresponds to the "Summary" metadata field:
35   # https://packaging.python.org/specifications/core-metadata/#summary
36   description='Parser generator with automatic tree generation', # optional
37
38   # This is an optional longer description of your project that represents
39   # the body of text which users will see when they visit PyPI.
40   #
41   # Often, this is the same as your README, so you can just read it in from
42   # that file directly (as we have already done above)
43   #
44   # This field corresponds to the "Description" metadata field:
45   # https://packaging.python.org/specifications/core-metadata/#description-optional
46   long_description = long_description, # optional
47
48   # Denotes that our long_description is in Markdown; valid values are
49   # text/plain, text/x-rst, and text/markdown
50   #
51   # Optional if long_description is written in reStructuredText (rst) but
52   # required for plain-text or Markdown; if unspecified, "applications should
53   # attempt to render [the long_description] as text/x-rst; charset=UTF-8 and
54   # fall back to text/plain if it is not valid rst" (see link below)
55   #
56   # This field corresponds to the "Description-Content-Type" metadata field:
57   # https://packaging.python.org/specifications/core-metadata/#description-content-type-optional
58   long_description_content_type = 'text/markdown', # optional (see note above)
59
60   # This should be a valid link to your project's main homepage.
61   #
62   # This field corresponds to the "Home-Page" metadata field:
63   # https://packaging.python.org/specifications/core-metadata/#home-page-optional
64   url = 'https://git.ndcode.org/public/piyacc.git', # optional
65
66   # This should be your name or the name of the organization which owns the
67   # project.
68   author = 'Nick Downing', # optional
69
70   # This should be a valid email address corresponding to the author listed
71   # above.
72   author_email = 'nick@ndcode.org', # optional
73
74   ## Classifiers help users find your project by categorizing it.
75   ##
76   ## For a list of valid classifiers, see https://pypi.org/classifiers/
77   #classifiers=[ # optional
78   #  # How mature is this project? Common values are
79   #  #   3 - Alpha
80   #  #   4 - Beta
81   #  #   5 - Production/Stable
82   #  'Development Status :: 3 - Alpha',
83
84   #  # Indicate who your project is intended for
85   #  'Intended Audience :: Developers',
86   #  'Topic :: Software Development :: Build Tools',
87
88   #  # Pick your license as you wish
89   #  'License :: OSI Approved :: MIT License',
90
91   #  # Specify the Python versions you support here. In particular, ensure
92   #  # that you indicate whether you support Python 2, Python 3 or both.
93   #  # These classifiers are *not* checked by 'pip install'. See instead
94   #  # 'python_requires' below.
95   #  'Programming Language :: Python :: 2',
96   #  'Programming Language :: Python :: 2.7',
97   #  'Programming Language :: Python :: 3',
98   #  'Programming Language :: Python :: 3.4',
99   #  'Programming Language :: Python :: 3.5',
100   #  'Programming Language :: Python :: 3.6',
101   #  'Programming Language :: Python :: 3.7',
102   #],
103
104   # This field adds keywords for your project which will appear on the
105   # project page. What does your project relate to?
106   #
107   # Note that this is a string of words separated by whitespace, not a list.
108   keywords = 'specification language abstract syntax tree xml', # optional
109
110   # You can just specify package directories manually here if your project is
111   # simple. Or you can use find_packages().
112   #
113   # Alternatively, if you just want to distribute a single Python file, use
114   # the `py_modules` argument instead as follows, which will expect a file
115   # called `my_module.py` to exist:
116   #
117   #   py_modules=["my_module"],
118   #
119   packages = setuptools.find_packages(
120     exclude = ['contrib', 'docs', 'tests']
121   ), # required
122
123   # Specify which Python versions you support. In contrast to the
124   # 'Programming Language' classifiers above, 'pip install' will check this
125   # and refuse to install the project if the version does not match. If you
126   # do not support Python 2, you can simplify this to '>=3.5' or similar, see
127   # https://packaging.python.org/guides/distributing-packages-using-setuptools/#python-requires
128   python_requires = '>=3.5',
129
130   ## This field lists other packages that your project depends on to run.
131   ## Any package you put here will be installed by pip when your project is
132   ## installed, so they must be valid existing projects.
133   ##
134   ## For an analysis of "install_requires" vs pip's requirements files see:
135   ## https://packaging.python.org/en/latest/requirements.html
136   #install_requires = ['peppercorn'], # optional
137
138   ## List additional groups of dependencies here (e.g. development
139   ## dependencies). Users will be able to install these using the "extras"
140   ## syntax, for example:
141   ##
142   ##   $ pip install sampleproject[dev]
143   ##
144   ## Similar to `install_requires` above, these must be valid existing
145   ## projects.
146   #extras_require = { # optional
147   #  'dev': ['check-manifest'],
148   #  'test': ['coverage'],
149   #},
150
151   ## If there are data files included in your packages that need to be
152   ## installed, specify them here.
153   ##
154   ## If using Python 2.6 or earlier, then these have to be included in
155   ## MANIFEST.in as well.
156   #package_data = { # optional
157   #  'sample': ['package_data.dat'],
158   #},
159
160   # Although 'package_data' is the preferred approach, in some case you may
161   # need to place data files outside of your packages. See:
162   # http://docs.python.org/3.4/distutils/setupscript.html#installing-additional-files
163   #
164   # In this case, 'data_file' will be installed into '<sys.prefix>/my_data'
165   data_files = [
166     (
167       'ndcode/piyacc/skel',
168       [
169         'ndcode/piyacc/skel/skel_bison.c',
170         'ndcode/piyacc/skel/skel_bison.h',
171         'ndcode/piyacc/skel/skel_py.py',
172         'ndcode/piyacc/skel/skel_py_element.py'
173       ]
174     )
175   ], # optional
176
177   # To provide executable scripts, use entry points in preference to the
178   # "scripts" keyword. Entry points provide cross-platform support and allow
179   # `pip` to create the appropriate form of executable for the target
180   # platform.
181   #
182   # For example, the following would provide a command called `sample` which
183   # executes the function `main` from this package when invoked:
184   entry_points = {  # Optional
185     'console_scripts': [
186       'piyacc=ndcode.piyacc.cli:main',
187     ],
188   },
189
190   ## List additional URLs that are relevant to your project as a dict.
191   ##
192   ## This field corresponds to the "Project-URL" metadata fields:
193   ## https://packaging.python.org/specifications/core-metadata/#project-url-multiple-use
194   ##
195   ## Examples listed include a pattern for specifying where the package tracks
196   ## issues, where the source is hosted, where to say thanks to the package
197   ## maintainers, and where to support the project financially. The key is
198   ## what's used to render the link text on PyPI.
199   #project_urls = { # optional
200   #  'Bug Reports': 'https://github.com/pypa/sampleproject/issues',
201   #  'Funding': 'https://donate.pypi.org',
202   #  'Say Thanks!': 'http://saythanks.io/to/example',
203   #  'Source': 'https://github.com/pypa/sampleproject/',
204   #},
205
206   # Nick
207   namespace_packages = ['ndcode']
208 )