-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathsetup.py
executable file
·105 lines (90 loc) · 4.14 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#!/usr/bin/env python3
"""
Greynir: Natural language processing for Icelandic
Setup.py
Copyright © 2023 Miðeind ehf.
Original Author: Vilhjálmur Þorsteinsson
This software is licensed under the MIT License:
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software,
and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
This module sets up the Greynir package. It uses the cffi_modules
parameter, available in recent versions of setuptools, to
automatically compile the eparser.cpp module to eparser.*.so/.pyd
and build the required CFFI Python wrapper via eparser_build.py.
The same applies to bin.cpp -> bin.*.so and bin_build.py.
Note that installing under PyPy >= 3.9 is supported (and recommended
for best performance).
"""
from glob import glob
from os.path import basename, splitext
from setuptools import find_packages
from setuptools import setup # type: ignore
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setup(
name="reynir",
version="3.5.7",
license="MIT",
description="A natural language parser for Icelandic",
long_description=long_description,
long_description_content_type="text/markdown",
author="Miðeind ehf",
author_email="[email protected]",
url="https://github.com/mideind/GreynirEngine",
packages=find_packages("src"),
package_dir={"": "src"},
py_modules=[splitext(basename(path))[0] for path in glob("src/*.py")],
package_data={"reynir": ["py.typed"]},
include_package_data=True,
zip_safe=True,
classifiers=[
# complete classifier list: http://pypi.python.org/pypi?%3Aaction=list_classifiers
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Developers",
"Intended Audience :: Science/Research",
"License :: OSI Approved :: MIT License",
"Operating System :: Unix",
"Operating System :: POSIX",
"Operating System :: Microsoft :: Windows",
"Operating System :: MacOS",
"Natural Language :: Icelandic",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Utilities",
"Topic :: Text Processing :: Linguistic",
],
keywords=["nlp", "parser", "icelandic"],
# Note: cffi 1.15.1 is the version built into PyPy 3.9.
# Do not specify a higher version as that would prevent installation on PyPy 3.9,
# unless you know what you're doing.
setup_requires=["cffi>=1.15.1"],
install_requires=[
"cffi>=1.15.1",
"tokenizer>=3.4.5",
"islenska>=1.0.3",
"typing_extensions",
],
cffi_modules=["src/reynir/eparser_build.py:ffibuilder"],
)