Bazel Tutorial: Python targets with py_library, py_test & py_binary (internal & external deps)

Поделиться
HTML-код
  • Опубликовано: 22 дек 2021
  • In this video we're going to be creating some python targets in Bazel. Bazel is a build tool that is very popular for use in monorepos. We're going to create a simple python library without any external dependencies. We'll write some tests & create targets using py_library and py_test. Then we're going to create a flask application & create a py_binary target. The flask application will have third party dependencies & dependencies in the monorepo.
    Bazel: bazel.build/
    Code: github.com/kriscfoster/multi-...
    rules_python: github.com/bazelbuild/rules_p...
  • НаукаНаука

Комментарии • 10

  • @JasonMobarak
    @JasonMobarak 8 месяцев назад

    Great job!

  • @KrisFoster1
    @KrisFoster1  2 года назад +3

    Part 3 is uploaded now. We use GitHub actions to build & test our monorepo in CI - ruclips.net/video/qiZXFdd8OPo/видео.html

  • @mejdej_pl
    @mejdej_pl 2 года назад +1

    @Kris Foster
    thanks for the video - it's great :), but I have 2 questions, maybe you will be able to help :) is it possible to build apps to binary target? Something like pyinstaller does with --one-file flag? And second, let's say I have few apps (projectA and projectB) and they have requirements.txt on its own - is it possible to have dependencies in multiple versions? Sth like projectA uses version 1 of dependecy and project B uses v.2? Will it work? Or I will need to upgrade projectB to v2? Does bazel support that?

  • @dawnrazor
    @dawnrazor 2 года назад +2

    Great video Kris, please can you turn up your mic though

  • @andrewjmcgehee
    @andrewjmcgehee 10 месяцев назад +1

    hey Kris, do you have any experience with external pip dependencies in bazel? specifically trying to create my own pip wheel repo that i can vendor to a project for multiple platforms like mac and linux. would love to pick your brain if you’ve ever done something similar.

  • @chikkusingh460
    @chikkusingh460 2 года назад +1

    @Kris Can you please create a video on bazel coverage. How bazel coverage can be run on New Code on daily basis ?

  • @hanggicui7974
    @hanggicui7974 2 года назад

    Bazel builds slow and tricky to debug. Especially in a large multi-language monorepo project.

  • @MATINSE-qr1cx
    @MATINSE-qr1cx Год назад

    Sound is low.

  • @xiaolong9446
    @xiaolong9446 Год назад +1

    BUILD.bazel doesn't work!!!!!!