tubular / rules_pygen

Rules for generating native Bazel Python libraries from requirements.txt
Apache License 2.0
15 stars 1 forks source link

Support for tar.gz #5

Open thundergolfer opened 5 years ago

thundergolfer commented 5 years ago

Description

I can see for this line in the source that you're aware of the problem of handling packages that provide only a .tar.gz.

I just ran into this problem as our requirements.txt file includes avro-python3, which does not provide a .whl.

For posterity, the full DEBUG error lok from rules_pygen was:

Processing wheelinfo for /var/folders/0b/p1vldpsd4f99nc50bv4t4csh0000gn/T/tmpf01qd6hu/avro_python3-1.9.0-py3-none-any.whl
DEBUG:rules_pygen.rules_generator:Wheel name is: avro-python3
DEBUG:rules_pygen.rules_generator:Will find additional wheels for other platforms using prefix: avro_python3-1.9.0
Traceback (most recent call last):
  File "/private/var/tmp/_bazel_jbelotti/a8a1f81a1422a72c79c6c81641a8c816/execroot/data_science/bazel-out/darwin-fastbuild/bin/external/rules_pygen/generator.runfiles/rules_pygen/src/rules_pygen/__main__.py", line 41, in <module>
    gen.run()
  File "/private/var/tmp/_bazel_jbelotti/a8a1f81a1422a72c79c6c81641a8c816/execroot/data_science/bazel-out/darwin-fastbuild/bin/external/rules_pygen/generator.runfiles/rules_pygen/src/rules_pygen/rules_generator.py", line 289, in run
    deps = self._parse_wheel_dependencies(wheel_links)
  File "/private/var/tmp/_bazel_jbelotti/a8a1f81a1422a72c79c6c81641a8c816/execroot/data_science/bazel-out/darwin-fastbuild/bin/external/rules_pygen/generator.runfiles/rules_pygen/src/rules_pygen/rules_generator.py", line 424, in _parse_wheel_dependencies
    raise PyBazelRuleGeneratorException("Dependency {} is missing wheels!".format(dependency))
rules_pygen.rules_generator.PyBazelRuleGeneratorException: Dependency avro_python3 is missing wheels!

Would you be interested in a PR, or are you already in-progress on this problem?

gabe0912 commented 4 years ago

I ran into this same issue while attempting to install googleapis_common_protos.

INFO:rules_pygen.rules_generator:
Processing wheelinfo for /var/folders/q6/8cgqlvf15gl30t65xpz65fyc0000gn/T/tmpxy_e9782/googleapis_common_protos-1.51.0-py3-none-any.whl
DEBUG:rules_pygen.rules_generator:Wheel name is: googleapis-common-protos
DEBUG:rules_pygen.rules_generator:Will find additional wheels for other platforms using prefix: googleapis_common_protos-1.51.0
ERROR:rules_pygen.rules_generator:Verification shows missing platform(s): {'linux', 'macos'}
Traceback (most recent call last):
  File "/private/var/tmp/_bazel_barcelos/d1e2fd2a53e2bfe5ba113293e2b1c05a/execroot/arize_ai/bazel-out/darwin-fastbuild/bin/external/rules_pygen/generator.runfiles/rules_pygen/src/rules_pygen/__main__.py", line 83, in <module>
    gen.run()
  File "/private/var/tmp/_bazel_barcelos/d1e2fd2a53e2bfe5ba113293e2b1c05a/execroot/arize_ai/bazel-out/darwin-fastbuild/bin/external/rules_pygen/generator.runfiles/rules_pygen/src/rules_pygen/rules_generator.py", line 314, in run
    deps = self._parse_wheel_dependencies(wheel_links)
  File "/private/var/tmp/_bazel_barcelos/d1e2fd2a53e2bfe5ba113293e2b1c05a/execroot/arize_ai/bazel-out/darwin-fastbuild/bin/external/rules_pygen/generator.runfiles/rules_pygen/src/rules_pygen/rules_generator.py", line 474, in _parse_wheel_dependencies
    "Dependency {} is missing wheels!".format(dependency)
rules_pygen.rules_generator.PyBazelRuleGeneratorException: Dependency googleapis_common_protos is missing wheels!

Is there any progress on this? Happy to contribute if work hasn't started on it.