Open Globegitter opened 6 years ago
Which bazel version
are you using? This can happen when the WORKSPACE was not imported with the correct global name. What does your git_repository
rule look like in your WORKSPACE
file?
I am using 0.17 rc1. I'll take a look again in a few days.
Thanks! Figuring out how to reproduce the issue is probably the biggest issue. Make sure you are importing it as @com_bluecore_rules_pyz
.
I've run into this also, and I'm sure I'm importing as @com_bluecore_rules_pyz
.
I'm using bazel 0.16.1 on CentOS 7. I've tried going back to the initial change that added local wheel support and still run into the same issue, so it's not particularly clear how this is supposed to work. Is there a minimal example of a repo using local wheels available somewhere?
I see the same problem. I set up a repo for reproducing the problem in https://github.com/snifi/Failed-pyz_rules.
Due to my understanding in the generated file the issue is in line 25 + 26: the native.filegroup defined in line 30ff is not a PyZProvider according to definition anymore and thus according to https://github.com/TriggerMail/rules_pyz/blob/master/rules_python_zip/rules_python_zip.bzl Line 15 can't be a "deps" but must be a "wheels"
Updating this to: deps=[ ], wheels=[":pypi_markupsafe"], and moving the wheels folder to be subfolder of ./third_party/pypi/ finally solves the problems (see third commit https://github.com/snifi/Failed-pyz_rules/commit/9849f0663da531c7ddd9a52b7c2f04c97a69446f) Can you confirm this and maybe help me how to solve the problem (without manual steps being involved)?
@snifi did you test that fix with any actual pyz_*
targets that depend on the markupsafe
library? I did what you suggested and got myself to the point where my library builds, but then I get import errors when I actually run my test. Taking a look at the test_exe_exedir
, all third-party libraries that are local wheels are missing.
Does anyone have a working example with local wheels?
Hi just trying out these rules and running into an issue with local wheels. I am getting
This error makes sense as the local wheels are a
filegroup
but are added as a dependency topyz_library
- but not sure what the intendend behaviour is. I suppose there should be something extracting the wheels and adding apyz_library
for it no?