镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

Heads up: setuptools contain files with whitespaces in their names #617

Closed

Description

@abravalheri

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).

Activity

  1. hrfuller commented on Mar 13, 2022

    @hrfuller
    Contributor

    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

  2. mchristen-astranis commented on Jan 26, 2024

    @mchristen-astranis

    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.

    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

  3. abravalheri commented on Aug 27, 2024

    @abravalheri
    Author

    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 bazel itself (it is not really a bug in setuptools codebase).

  4. psalaberria002 commented on Sep 6, 2024

    @psalaberria002

    Is there any workaround we can apply to be able to upgrade setuptools?

  5. added a commit that references this issue on Oct 30, 2024
    f40038e
  6. added a commit that references this issue on May 30, 2025
    1dc3d29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions