Skip to content

Instantly share code, notes, and snippets.

@statik
Last active December 19, 2019 02:02
Show Gist options
  • Save statik/f997e391910ffeb2fda3815c31269eef to your computer and use it in GitHub Desktop.
Save statik/f997e391910ffeb2fda3815c31269eef to your computer and use it in GitHub Desktop.
list of bazel python rules alternative implementations

Collection of Bazel open source python rules / forks from BazelCon 2019 python BOF

  • Supports shipping python in the package
  • Linking pip deps with cc_library
  • Build all pip deps from source with the bazel cc toolchains
  • building python from source
  • support python2/3 on each binary, library, test
  • someone company use it in prod
  • has python version support
  • fixes namespace problems
  • fetches pip packages incrementally
  • does not use system pip
  • works with all kinds of packages (i.e. packages with namespaces)
  • things we found important:
  • python3 support
  • fast (not rebuilding world when requirements.txt changes, looking at you rules_python)
  • no external depedencies (it's really frustrating to rebuild wheeltool.par for example with rules_python)
  • working with native py_library
  • allowing for Linux variants / platlib (to build Docker images locally on MacOS)
  • uses poetry for version resolution
  • incremental fetching
  • does not use system pip binary

apt-itude/rules_pip

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment