We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b976f5c commit ecb4981Copy full SHA for ecb4981
1 file changed
setup.py
@@ -152,10 +152,24 @@ def run(self):
152
super().run()
153
154
155
+def exclude_cython_files():
156
+ """Generate package data exclusion mapping to avoid installing cython files."""
157
+ excluded = ["*.pxd", "*.pyx", "*.c"]
158
+ excludes = {}
159
+
160
+ for root, dirs, _files in os.walk('src'):
161
+ for d in dirs:
162
+ path = os.path.join(root, d).lstrip('src/')
163
+ module = path.replace(os.path.sep, '.')
164
+ excludes[module] = excluded
165
166
+ return excludes
167
168
169
setup(
170
ext_modules=extensions(),
171
cmdclass={
172
'build_ext': build_ext,
173
},
174
+ exclude_package_data=exclude_cython_files(),
175
)
0 commit comments