📅  最后修改于: 2022-03-11 14:45:57.733000             🧑  作者: Mango
packages = find_packages(exclude=('tests',))
def get_package_files_in_directory(directory):
paths = []
for (path, directories, filenames) in os.walk(directory):
for filename in filenames:
paths.append(os.path.join('..', path, filename))
return paths
setup(
packages=[],
ext_modules=cythonize(
[
Extension("main_folder.*", ["main_folder/*.py"])
],
build_dir="build",
compiler_directives=dict(
always_allow_keywords=True
)),
package_data={p: package_files + get_package_files_in_directory(os.path.join(here, p, 'resources')) for p in packages},
,....
,...
)