def rule_runner() -> RuleRunner: rule_runner = RuleRunner( rules=[ *repl_rules(), *ipython_subsystem_rules(), *python_repl.rules(), *pex_from_targets.rules(), *local_dists.rules(), *target_types_rules(), QueryRule(Process, (PexProcess, )), ], target_types=[ PythonSourcesGeneratorTarget, ProtobufSourceTarget, PythonSourceTarget, PythonRequirementTarget, ], ) rule_runner.write_files({ "src/python/foo.proto": 'syntax = "proto3";message Foo {}', "src/python/lib.py": "from foo import Foo\nclass SomeClass:\n pass\n", "src/python/BUILD": ("protobuf_source(name='proto', source='foo.proto')\n" "python_sources(dependencies=[':proto'])"), }) return rule_runner
def rule_runner() -> RuleRunner: return RuleRunner( rules=[ *repl_rules(), *python_repl.rules(), *pex_from_targets.rules(), QueryRule(Process, (PexProcess, )), ], target_types=[PythonLibrary, ProtobufLibrary], )
def rules(cls): return ( *super().rules(), *repl_rules(), *python_repl.rules(), *pex.rules(), *archive.rules(), *external_tool.rules(), *python_sources.rules(), *pex_from_targets.rules(), *strip_source_roots.rules(), *ancestor_files.rules(), RootRule(PythonRepl), )
def rules(cls): return ( *super().rules(), *repl_rules(), *python_repl.rules(), *pex.rules(), *archive.rules(), *external_tool.rules(), *python_sources.rules(), *pex_from_targets.rules(), *stripped_source_files.rules(), *ancestor_files.rules(), QueryRule(Process, (PexProcess, OptionsBootstrapper)), )
def rules(cls): return ( *super().rules(), *repl_rules(), *python_repl.rules(), *pex.rules(), *download_pex_bin.rules(), *archive.rules(), *external_tool.rules(), *importable_python_sources.rules(), *pex_from_targets.rules(), *python_native_code.rules(), *strip_source_roots.rules(), *subprocess_environment.rules(), RootRule(PythonRepl), )
def rule_runner() -> RuleRunner: rule_runner = RuleRunner( rules=[ *repl_rules(), *ipython_subsystem_rules(), *python_repl.rules(), *pex_from_targets.rules(), *local_dists.rules(), QueryRule(Process, (PexProcess, )), ], target_types=[PythonLibrary, ProtobufLibrary], ) rule_runner.write_files({ "src/python/foo.proto": 'syntax = "proto3";message Foo {}', "src/python/lib.py": "from foo import Foo\nclass SomeClass:\n pass\n", "src/python/BUILD": ("protobuf_library(name='proto')\npython_library(dependencies=[':proto'])" ), }) return rule_runner
def rule_runner() -> RuleRunner: return RuleRunner( rules=(*repl_rules(), create_mock_repl_request, UnionRule(ReplImplementation, MockRepl)), )