-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsetup_cython.py
More file actions
32 lines (26 loc) · 830 Bytes
/
setup_cython.py
File metadata and controls
32 lines (26 loc) · 830 Bytes
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
# PostForge - A PostScript Interpreter
# Copyright (c) 2025-2026 Scott Bowman
# SPDX-License-Identifier: AGPL-3.0-or-later
"""
Standalone Cython build script for PostForge performance-critical modules.
Usage:
python setup_cython.py build_ext --inplace
This compiles .pyx files into C extensions that are used as optional
accelerators. PostForge works without them — the pure Python fallback
is always available.
"""
from setuptools import setup, Extension
from Cython.Build import cythonize
extensions = [
Extension(
"postforge.operators._control_cy",
["postforge/operators/_control_cy.pyx"],
),
Extension(
"postforge.devices.common._image_conv_cy",
["postforge/devices/common/_image_conv_cy.pyx"],
),
]
setup(
ext_modules=cythonize(extensions, language_level=3),
)