You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Heads up: setuptools contain files with whitespaces in their names #617
Hello, I would like to thank the authors, maintainers and all contributors for making such a cool project 😄
The reason why I was brought here is that recently we received a issue in the setuptools repository (pypa/setuptools#3072) that seems related to the fact that bazel does not support whitespaces in file names, and this might generate problems for people using rules_python.
As noted in of the issue's comment, even before the recent changes, setuptools already had files containing whitespaces.
My main objective here is just to give you guys a heads up, so you are aware about potential problems that might arise. (I understand that it might be a very complicated problem to solve and that it will take a long time...)
For the time being setuptools' lead developer have kindly provided a patch with a workaround, but it is difficult to guarantee that in the future other files containing whitespace in their names will not be added (specially via vendored dependencies).
Thanks for reaching out @abravalheri. In rules python we ignore files from installed packages that have spaces in them, which is what caused the runtime error with the Lorem file. We are aware of the issue but there ins't much we can do without upstream support for input files with spaces in bazel bazelbuild/bazel#4327
Thanks for reaching out @abravalheri. In rules python we ignore files from installed packages that have spaces in them, which is what caused the runtime error with the Lorem file. We are aware of the issue but there ins't much we can do without upstream support for input files with spaces in bazel bazelbuild/bazel#4327
@hrfuller out of curiosity, where does rules_python ignore files with spaces in them. I'm noticing an issue where there's a directory of an installed package with spaces in it and that is causing a failure.
As previously noted the workaround introduced by setuptools was not bulletproof and there was no guarantee that similar problems would not happen again due the limitation in bazel itself (it is not really a bug in setuptools codebase).
Activity
hrfuller commentedon Mar 13, 2022
Thanks for reaching out @abravalheri. In rules python we ignore files from installed packages that have spaces in them, which is what caused the runtime error with the Lorem file. We are aware of the issue but there ins't much we can do without upstream support for input files with spaces in bazel bazelbuild/bazel#4327
mchristen-astranis commentedon Jan 26, 2024
@hrfuller out of curiosity, where does rules_python ignore files with spaces in them. I'm noticing an issue where there's a directory of an installed package with spaces in it and that is causing a failure.
Actually, I found it here: https://github.com/bazelbuild/rules_python/blob/0aa5ea48cbecd8d73d62f77abac6b2f4aafbf64e/python/repositories.bzl#L209
Seems like we'd want to glob exclude directories as well
abravalheri commentedon Aug 27, 2024
Cross referencing pypa/setuptools#4605.
As previously noted the workaround introduced by setuptools was not bulletproof and there was no guarantee that similar problems would not happen again due the limitation in
bazelitself (it is not really a bug in setuptools codebase).psalaberria002 commentedon Sep 6, 2024
Is there any workaround we can apply to be able to upgrade setuptools?
fix: allow spaces in whl_librarys (#2334)
fix: allow spaces in whl_librarys (bazel-contrib#2334)
build(deps): bump pytest-mock from 3.15.1 to 3.17.0 in /dev (bazel-co…