Skip to content
This repository was archived by the owner on Jan 8, 2024. It is now read-only.
This repository was archived by the owner on Jan 8, 2024. It is now read-only.

cython modules import fails when running par file #119

@paulspixels

Description

@paulspixels

I suppose this is may be covered by the stated limitation that C extensions don't work...it would be great if someone could explain if that precludes using cython with subpar? What limits it from importing cython ".so" modules?

The issue I'm having is that when I try to package up a working version of a cython example, python is unable to import the compiled .so file when the .par file runs, even though it is included in the .par file and the non-.par'd version works fine. As an example, pyx_library can come from gRPC (https://github.com/grpc/grpc/blob/master/bazel/cython_library.bzl) and the BUILD file would look like this:

cc_library(
  name = "rectangle_lib",
  srcs = ["Rectangle.cpp"],
  hdrs = ["Rectangle.h"],
  deps = [
      "@com_google_absl//absl/strings",
  ],
)

pyx_library(
  name = "pyrectangle_lib",
  srcs = [
    "pyrectangle.pxd",
    "pyrectangle.pyx",
  ],
  deps = [
    ":rectangle_lib",
  ],
)

par_binary(
  name = "pyrectangle_bin",
  srcs = ["pyrectangle_bin.py"],
  deps = [
    ":pyrectangle_lib",
  ],
)

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