vaticle / bazel-distribution

Bazel rules for assembling and deploying software distributions (see @vaticle for usage example)
https://bazel.build
Apache License 2.0
155 stars 53 forks source link

add entry_point & setuptools-git, disable "create_init_files" #371

Open lyao-77 opened 1 year ago

lyao-77 commented 1 year ago

What is the goal of this PR?

This PR is to:

vaticle-bot commented 1 year ago

PR Review Checklist

Do not edit the content of this comment. The PR reviewer should simply update this comment by ticking each review item below, as they get completed.


Trivial Change

Code

Architecture

lyao-77 commented 1 year ago

Hi @dmitrii-ubskii @alexjpwalker Can you take a look at this PR? Thanks!

flyingsilverfin commented 1 year ago

Do you mind showing some examples of how/why these changes are to be used please?

lyao-77 commented 1 year ago

Hi @flyingsilverfin , I think the entry_point field is only a filed for setuptools. We would like to add it because when we assemble our package using setuptools directly, we use this field.

Regarding the other change, the use case is that we used this rule to assemble one of our internal python library, and then use it in another project. We met some issues during import and realized that when bazel load it's dependency, it will generate a __init__.py for each module with the following content:

"# path manipulation added by bazelbuild/rules_python to support namespace pkgs. path = import('pkgutil').extend_path(path, name) "

However, since we hardcoded an empty __init__.py in current implementation during packaging, it will interrupt how bazel works and the import won't work

alexjpwalker commented 1 year ago

Hi, thanks for the contribution! By way of update (and managing expectations), unfortunately we don't currently have the resources to test this code in detail and I don't have an ETA on that. Please continue to depend on your fork of bazel-distribution for the time being, apologies for the inconvenience.

mgosk commented 3 months ago

+1 for merging this PR into master branch. I am already using this change from PR branch.