nomyo/setup.py
alpha nerd 58815eec71
Some checks failed
Publish to PyPI / Build (docker-amd64, py3.10) (push) Failing after 28s
Publish to PyPI / Build (docker-arm64, py3.10) (push) Failing after 46s
Publish to PyPI / Build (docker-amd64, py3.11) (push) Failing after 30s
Publish to PyPI / Build (docker-arm64, py3.11) (push) Failing after 46s
Publish to PyPI / Build (docker-amd64, py3.12) (push) Failing after 28s
Publish to PyPI / Build (docker-arm64, py3.12) (push) Failing after 43s
Publish to PyPI / Publish to PyPI (push) Has been skipped
feat: new build process and workflows
ver: bump
2026-04-12 15:49:20 +02:00

31 lines
927 B
Python

from setuptools import setup
from setuptools.command.build_py import build_py as _build_py
from Cython.Build import cythonize
# Modules compiled to .so — exclude their .py source from the wheel
COMPILED_MODULES = {"nomyo", "SecureCompletionClient", "SecureMemory"}
class BuildPyNoPy(_build_py):
"""Skip copying .py source files for cythonized modules."""
def find_package_modules(self, package, package_dir):
modules = super().find_package_modules(package, package_dir)
return [
(pkg, mod, path)
for pkg, mod, path in modules
if not (pkg == "nomyo" and mod in COMPILED_MODULES)
]
setup(
ext_modules=cythonize(
[
"nomyo/nomyo.py",
"nomyo/SecureCompletionClient.py",
"nomyo/SecureMemory.py",
],
compiler_directives={"language_level": "3"},
),
cmdclass={"build_py": BuildPyNoPy},
)