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