Skip to content

Commit

Permalink
Updated package metadata, build settings, CI + more
Browse files Browse the repository at this point in the history
  • Loading branch information
sveinbjornt committed Aug 26, 2024
1 parent 6649e34 commit fe002e8
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: tests

on:
push:
branches: [ master ]
branches: [ "*" ]
pull_request:
branches: [ master ]
branches: [ "*" ]

jobs:
build:
Expand Down
2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**,
Expand Down
5 changes: 3 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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",
Expand All @@ -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"],
Expand Down
9 changes: 6 additions & 3 deletions src/reynir/eparser_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)

Expand Down

0 comments on commit fe002e8

Please sign in to comment.