Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import os
- from setuptools import setup
- from Cython.Build import cythonize
- from Cython.Build.Cythonize import Options
- paths = [
- "/streaming_api",
- ]
- # Quick and dirty filter of files that fail to compile.
- blacklist = [
- "/streaming_api/BusinessLogic/Configs/environment.py",
- "/streaming_api/API/models/icon.py",
- ]
- Options.annotate = True
- all_python_files = []
- for path in paths:
- for root, dirs, files in os.walk(path):
- for file in files:
- if file.endswith(".py"):
- full_filename = os.path.join(root, file)
- if full_filename not in blacklist:
- all_python_files.append(full_filename)
- setup(
- ext_modules=cythonize(
- all_python_files,
- annotate=True,
- compiler_directives=dict(
- c_string_encoding="utf-8",
- language_level=3,
- ),
- nthreads=os.cpu_count() * 2,
- ),
- zip_safe=False,
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement