ie.
/third_party/bar/BUILD - an imported library, wrapped in py_library
/third_party/foo/BUILD - an imported library, wrapped in py_library, depends on bar
I now have to fix up all references to bar inside of foo. ie. "import bar" becomes "import third_party.bar". If there aren't good unit tests in the library, this becomes a fairly error prone process.
Is this possible in the current system?
Thanks!
--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/dcf39bcd-77c3-4072-973e-e55fff629f26%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On Wednesday, December 2, 2015 at 1:48:21 PM UTC-8, Damien Martin-guillerez wrote:
> Do you mean to add third_party to the PYTHONPATH?
>
Yes, that's possible. Having it happen from the rule (similar to the includes in cc_library) would be nicer, as then I don't have to have some outside setup step. It looks like there is already a fair bit of infrastructure in python binaries around the runfiles -- that's what led me to think there might be some way to do this.
import os
import sys
sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'py')
del os
del sys#!/usr/bin/env python
import third_party
import thing.inside.third.party--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/e0efcfac-9a29-4c30-bd6c-4174db37bbbf%40googlegroups.com.