Skip to content

Can't get platform-specific packages to work #26

@jscheel

Description

@jscheel

I have added a python package that relies on platform-specific code (e.g. confluent_kakfa). When I build and run the image, I get the error:

Traceback (most recent call last):
  File "/foo/foo.runfiles/_main/foo/main.py", line 2, in <module>
    from confluent_kafka import Producer
  File "/foo/foo.runfiles/rules_python~0.31.0~pip~pip_311_confluent_kafka/site-packages/confluent_kafka/__init__.py", line 19, in <module>
    from .deserializing_consumer import DeserializingConsumer
  File "/foo/foo.runfiles/rules_python~0.31.0~pip~pip_311_confluent_kafka/site-packages/confluent_kafka/deserializing_consumer.py", line 19, in <module>
    from confluent_kafka.cimpl import Consumer as _ConsumerImpl
ModuleNotFoundError: No module named 'confluent_kafka.cimpl'

Which suggests that this package is set up for the wrong architecture in the image. This happens if I build with the platform set.

I'm assuming this happens because the pip dependencies are generated on the host machine, correct? Or is something else going on here?

Any ideas on how this could be fixed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions