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

Question: data attribute for macos_command_line_application or alternative #2446

Open
stepango opened this issue Apr 10, 2024 · 0 comments
Open

Comments

@stepango
Copy link

I want to run my python script(py_binary) from Swift and I ended up having the following setup, which compiles without an issue

swift_library(
    name = "Sources",
    srcs = ["main.swift"],
    visibility = ["//visibility:public"],
    data = ["//src/image_gen:main"], # py_binary
)

apple_bundle_version(
    name = "CommandLineSwiftVersion",
    build_version = "1.0",
)

macos_command_line_application(
    name = "CommandLineSwift",
    bundle_id = "com.example.command-line-swift",
    infoplists = [":Info.plist"],
    minimum_os_version = "13.6",
    version = ":CommandLineSwiftVersion",
    deps = [
        ":Sources",
    ],
)

According to docs, py_binary runfiles are supposed to end up in CommandLineSwift's bin folder(transitively trough swift_library), but Somehow py_binary runfiles never end up in there

However, the other way around - works. I can add CommandLineSwift to py_binary data attribute without any issues. Am I doing smth wrong here? Is there other way to do it?

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

No branches or pull requests

1 participant