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

Changing a dependency in pyproject.toml and poetry.lock does not get updated in bazel #2

Open
ruidc opened this issue Aug 3, 2021 · 0 comments

Comments

@ruidc
Copy link

ruidc commented Aug 3, 2021

in my pyproject.toml

...
[tool.poetry.dependencies]
python = "3.7.6"
click = "7.1.1"
...

and my BUILD:

load("@rules_python//python:defs.bzl", "py_test")
load("@solution_pip//:requirements.bzl", "requirement")

py_test(
    name = "test_example",
    srcs = ["test_example.py"],
    deps = [
        requirement("click"),
    ],
)

and my test_example.py:

import sys
import unittest
import click

class TestExample(unittest.TestCase):
    def test_version(self):
        assert (platform.python_version() == "3.7.6")
        print(os.getcwd())
        print(sys.executable)
        print(click.__version__)
        assert ('poetry' in sys.executable)
        assert (click.__version__ == "7.1.1")
        # self.assertEqual(True, False)


if __name__ == '__main__':
    unittest.main()

running bazel test //packages/example/test:test_example
works fine, updating click to 7.1.2 via poetry update sets the lockfile and toml correctly, but in the temp directory created by bazel, it doesn't update where I would have expected it to do so.

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