Tags: dangaogit/rules_python
Tags
fix(toolchains): use posix-compatible exec -a alternative (bazel-cont… …rib#3010) The `exec -a` command doesn't work in dash, the default shell for Ubuntu/debian. To work around, use `sh -c`, which is posix and dash compatible. This allows changing the argv0 while invoking a different command. Also adds a test to verify the the runtime_env toolchain works with bootstrap script. Fixes bazel-contrib#3009 (cherry picked from commit c4543cd)
fix: use platform_info.target_settings in toolchain aliases (bazel-co… …ntrib#3001) During the refactor we forgot one more place where the `flag_values` on the platform information was used. They were no longer populated and broke. The solution is to use `selects.config_setting_group` to maintain behaviour and in order to smoke test I have added a target to verify that the aliases work. Related to bazel-contrib#2875 Fixes bazel-contrib#2993 Co-authored-by: Richard Levasseur <[email protected]> (cherry picked from commit 107a878)
fix: support pre-release versions and add new toolchain versions (baz… …el-contrib#2969) Add latest toolchain builds and attempt adding a beta build. This shows/tests that we can handle pre-release versions just fine and we are able to test the toolchain matching. Whilst at it it implements the static advertising of the remaining interpreter information. Fixes bazel-contrib#2837 --------- Co-authored-by: Richard Levasseur <[email protected]>
fix(pypi): fix a typo in parse_simpleapi_html (bazel-contrib#2866) It seems that the integration tests that I thought were covering this had the same time. Added an assertion to the unit tests as well Fixes bazel-contrib#2863. (cherry picked from commit 9dfa3ab)
fix(pypi): handle more URL patterns for requirement sources (bazel-co… …ntrib#2843) Summary: - Better handle git references for sdists. - Better handle direct whl references. - Add an extra test that turned out to be not needed in the end, but I left it to increase the code coverage. Work towards bazel-contrib#2363 Fixes bazel-contrib#2828 (cherry picked from commit a79bbfa)
fix(pypi): handle more URL patterns for requirement sources (bazel-co… …ntrib#2843) Summary: - Better handle git references for sdists. - Better handle direct whl references. - Add an extra test that turned out to be not needed in the end, but I left it to increase the code coverage. Work towards bazel-contrib#2363 Fixes bazel-contrib#2828 (cherry picked from commit a79bbfa)
revert(pypi): use Python for marker eval and METADATA parsing (bazel-… …contrib#2834) Summary: - Revert to using Python for marker evaluation during parsing of requirements (partial revert of bazel-contrib#2692). - Use Python to parse whl METADATA. - Bugfix the new simpler algorithm and add a new unit test. Fixes bazel-contrib#2830 (cherry picked from commit 5b9d545)
fix: parsing metadata with inline licenses (bazel-contrib#2806) The wheel `METADATA` parsing implemented in 1.4 missed the fact that whitespace is significant and sometimes License is included inline in the `METADATA` file itself. This change ensures that we stop parsing the `METADATA` file only on first completely empty line. Fixes bazel-contrib#2796 --------- Co-authored-by: Ignas Anikevicius <[email protected]> (cherry picked from commit 1d69ad6)
fix: load target_platforms through the hub (bazel-contrib#2781) This PR moves the parsing of `Requires-Dist` to the loading phase within the `whl_library_targets_from_requires` macro. The original `whl_library_targets` macro has been left unchanged so that I don't have to reinvent the unit tests - it is well covered under tests. Before this PR we had to wire the `target_platforms` via the `experimental_target_platforms` attr in the `whl_library`, which means that whenever this would change (e.g. the minor Python version changes), the wheel would be re-extracted even though the final result may be the same. This refactor uncovered that the dependency graph creation was incorrect if we had multiple target Python versions due to various heuristics that this had. In hindsight I had them to make the generated `BUILD.bazel` files more readable when the unit test coverage was not great. Now this is unnecessary and since everything is happening in Starlark I thought that having a simpler algorithm that does the right thing always is the best way. This also cleans up the code by removing left over TODO notes or code that no longer make sense. Work towards bazel-contrib#260, bazel-contrib#2319 (cherry picked from commit a19e1e4)
PreviousNext