From fe002e86f4878af7336bce454414698755a2ef99 Mon Sep 17 00:00:00 2001 From: Sveinbjorn Thordarson Date: Mon, 26 Aug 2024 22:10:35 +0000 Subject: [PATCH] Updated package metadata, build settings, CI + more --- .github/workflows/python-package.yml | 4 ++-- MANIFEST.in | 2 ++ README.md | 2 +- setup.py | 5 +++-- src/reynir/eparser_build.py | 9 ++++++--- 5 files changed, 14 insertions(+), 8 deletions(-) diff --git a/.github/workflows/python-package.yml b/.github/workflows/python-package.yml index 3d3b73ee..eb2a12e0 100644 --- a/.github/workflows/python-package.yml +++ b/.github/workflows/python-package.yml @@ -2,9 +2,9 @@ name: tests on: push: - branches: [ master ] + branches: [ "*" ] pull_request: - branches: [ master ] + branches: [ "*" ] jobs: build: diff --git a/MANIFEST.in b/MANIFEST.in index bda21150..55b35f2a 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -9,5 +9,7 @@ exclude src/reynir/_eparser.cpp include src/reynir/config/*.conf exclude src/reynir/resources/*.csv exclude src/reynir/resources/*.txt +exclude src/reynir/resources/.DS_Store exclude src/reynir/*.o exclude src/reynir/*.so +exclude src/reynir/.DS_Store diff --git a/README.md b/README.md index d2c02b63..2466488d 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ ## Overview -Greynir is a Python 3 (>= 3.9) package, +Greynir is a Python 3 (>=3.9) package, published by [MiĆ°eind ehf.](https://mideind.is), for **working with Icelandic natural language text**. Greynir can parse text into **sentence trees**, find **lemmas**, diff --git a/setup.py b/setup.py index ac7e36c4..f0306d42 100755 --- a/setup.py +++ b/setup.py @@ -41,7 +41,7 @@ """ from glob import glob -from os.path import basename, join, splitext +from os.path import basename, splitext from setuptools import find_packages, setup @@ -82,6 +82,7 @@ "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", @@ -96,7 +97,7 @@ install_requires=[ "cffi>=1.15.1", "tokenizer>=3.4.5", - "islenska>=1.0.2", + "islenska>=1.0.3", "typing_extensions", ], cffi_modules=["src/reynir/eparser_build.py:ffibuilder"], diff --git a/src/reynir/eparser_build.py b/src/reynir/eparser_build.py index ff952123..1a8c7c37 100644 --- a/src/reynir/eparser_build.py +++ b/src/reynir/eparser_build.py @@ -45,6 +45,7 @@ WINDOWS = platform.system() == "Windows" MACOS = platform.system() == "Darwin" +IMPLEMENTATION = platform.python_implementation() # What follows is the actual Python-wrapped C interface to eparser.*.so @@ -128,13 +129,15 @@ extra_compile_args = ["/Zc:offsetof-"] elif MACOS: os.environ["CFLAGS"] = "-stdlib=libc++" # Fixes PyPy build on macOS 10.15.6+ - extra_compile_args = ["-mmacosx-version-min=10.7", "-stdlib=libc++"] + os.environ["MACOSX_DEPLOYMENT_TARGET"] = "10.9" + extra_compile_args = ["-mmacosx-version-min=10.9", "-stdlib=libc++"] else: extra_compile_args = ["-std=c++11"] # On some systems, the linker needs to be told to use the C++ compiler -# due to changes in the default behaviour of distutils -os.environ["LDCXXSHARED"] = "c++ -shared" +# under PyPy due to changes in the default behaviour of distutils. +if IMPLEMENTATION == "PyPy": + os.environ["LDCXXSHARED"] = "c++ -shared" ffibuilder.cdef(declarations + callbacks)