python setuptools cythonize except one file

Solutions on MaxInterview for python setuptools cythonize except one file by the best coders in the world

showing results for - "python setuptools cythonize except one file"
Joaquín
10 May 2019
1packages = find_packages(exclude=('tests',))
2
3def get_package_files_in_directory(directory):
4    paths = []
5    for (path, directories, filenames) in os.walk(directory):
6        for filename in filenames:
7            paths.append(os.path.join('..', path, filename))
8    return paths
9
10
11setup(
12    packages=[],
13
14    ext_modules=cythonize(
15        [
16           Extension("main_folder.*", ["main_folder/*.py"])
17
18        ],
19        build_dir="build",
20        compiler_directives=dict(
21        always_allow_keywords=True
22        )),
23package_data={p: package_files + get_package_files_in_directory(os.path.join(here, p, 'resources')) for p in packages},
24,....
25,...
26)
27