Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

assemble_pip won't work for local_repositories #287

Open
TheButlah opened this issue Mar 10, 2021 · 2 comments
Open

assemble_pip won't work for local_repositories #287

TheButlah opened this issue Mar 10, 2021 · 2 comments

Comments

@TheButlah
Copy link

My current project is looking to use bazel-distribution to publish pip packages with bazel. We have several projects, which live as local workspaces in our git monorepo. However if I attempt to build the assemple_pip rule, invoked for example as bazel build @subproject1//my/package:assemble, this fails saying that args.files is None and therefore not iterable. However, if I cd into the folder containing the local workspace, and build as bazel build //my/package:assemble, things work as expected.

Presumably this is because of this part of the code:

for i in ctx.attr.target[PyInfo].transitive_sources.to_list():
    if 'pypi' not in i.path and 'external' not in i.path:
        python_source_files.append(i)

I think the fact that the source files are being stripped out when external is part of the path may be the issue. Does anyone have ideas on how to solve this?

@alexjpwalker
Copy link
Member

@TheButlah Did you end up finding a suitable workaround for this issue?

@TheButlah
Copy link
Author

No

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants