Commit aee21e14 authored by Eckhart Arnold's avatar Eckhart Arnold

cython build for poetry (not tested)

parent 819e31ae
# build.py - support for building cython extensions with poetry
from setuptools import setup
try:
from Cython.Build import cythonize
except ImportError:
def cythonize(filename, **options):
return []
cythonize_modules = [
'DHParser/stringview.py',
'DHParser/toolkit.py',
'DHParser/preprocess.py',
'DHParser/error.py',
'DHParser/syntaxtree.py',
'DHParser/log.py',
'DHParser/parse.py',
'DHParser/trace.py',
'DHParser/transform.py',
'DHParser/compile.py',
'DHParser/ebnf.py',
]
def build(setup_kwargs):
setup(
name='Hello world app',
ext_modules=cythonize(cythonize_modules, nthreads=0, annotate=False),
zip_safe=False,
)
......@@ -42,17 +42,23 @@ packages = [
{ include = "documentation_src", format = "sdist" },
]
build = "build.py"
[tool.poetry.dependencies]
python = "^3.5"
regex = { version = "^2.5", optional = true }
cython = { version = "^0.29", optional = true }
[tool.poetry.dev-dependencies]
pytest = "^5.0"
[tool.poetry.scripts]
dhparser = 'DHParser.scripts.dhparser:main'
[build-system]
requires = ["poetry>=0.12", "Cython>=0.27.1", "setuptools", "wheel"]
build-backend = "poetry.masonry.api"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment