Repository: vyperlang/vyper

Issue:
`--standard-json` turns contracts absolute paths into wrong relative paths 
### Version Information

* vyper Version (output of `vyper --version`): 0.3.2 -  e480e918c27a465216524420388363bc8bf6a03c
* OS: osx/linux/win
* Python Version (output of `python --version`): 3.9.7

### What's your issue about?

Running the command below command results in an output result with the wrong contract path: from  `"/home/user/src/C.vy"` to `"home/user/src/C.vy"`

Command:
`vyper --standard-json file.json`

file.json:
```
{
    "language": "Vyper",
    "sources": {
      "/home/user/src/C.vy": {
        "content": "# @version ^0.3.2\n\ntestVar: uint256\n\ninterface VM:\n    def warp(time: uint256): view\n\nevent Ev:\n    value: uint256\n\nvm: VM\n\n@external\ndef __init__():\n    self.testVar = 1\n    self.vm = VM(0x7109709ECfa91a80626fF3989D68f67F5b1DD12D)\n\n@external\ndef setUp():\n    self.testVar = 2\n\n@external\ndef run() -> bool:\n\n    log Ev(block.timestamp)\n    self.vm.warp(100)\n    log Ev(block.timestamp)\n    \n    if self.testVar == 1:\n        return True\n    \n    return False\n\n@external\ndef testTrue():\n    assert(True)"
      }
    },
    "settings": {
      "outputSelection": {
        "*": {
          "": [
            "ast"
          ],
          "*": [
            "abi",
            "evm.bytecode",
            "evm.deployedBytecode",
            "evm.methodIdentifiers"
          ]
        }
      },
      "evmVersion": "berlin"
    }
}
```
output
```
{"compiler": "vyper-0.3.2+commit.e480e918.dirty", "contracts": {"home/user/src/C.vy": {"C": {"abi": [{"anonymous": false, "inputs": [{"indexed": false, "name": "value", "type": "uint256"}], "name": "Ev", "type": "event"}, {"inputs": [], "outputs": [], "stateMutability": "nonpayable", "type": "constructor"}, {"inputs": [], "name": "setUp", "outputs": [], "stateMutability": "nonpayable", "type": "function"}, {"inputs": [], "name": "run", "outputs": [{"name": "", "type": "bool"}], "stateMutability": "nonpayable", "type": "function"}, {"inputs": [], "name": "testTrue", "outputs": [], "stateMutability": "nonpayable", "type": "function"}], "evm": {"bytecode": {"object": "0x6001600055737109709ecfa91a80626ff3989d68f67f5b1dd12d60015561012356600436101561000d576100f7565b60046000601c37600051346100fd57630a9254e4811861002e576002600055005b63c040622681186100e3577fb30c6e011c2816674a43c08a53579e48c30e2158e65c09ae36edd17363863f984260c052602060c0a163e5d6bf0260c052606460e0526001543b156100fd5760006000602460dc6001545afa610095573d600060003e3d6000fd5b7fb30c6e011c2816674a43c08a53579e48c30e2158e65c09ae36edd17363863f984260c052602060c0a16001600054186100d757600160c052602060c06100e1565b600060c052602060c05bf35b634e4fb1fa81186100f5576100f3565b005b505b60006000fd5b600080fd5b61002161012303610021600039610021610123036000f3", "opcodes": "PUSH1 0x1 PUSH1 0x0 SSTORE PUSH20 0x719709ECFA91A80626FF3989D68F67F5B1DD12D PUSH1 0x1 SSTORE PUSH2 0x123 JUMP PUSH1 0x4 CALLDATASIZE LT ISZERO PUSH2 0x0D JUMPI PUSH2 0x0F7 JUMP JUMPDEST PUSH1 0x4 PUSH1 0x0 PUSH1 0x1C CALLDATACOPY PUSH1 0x0 MLOAD CALLVALUE PUSH2 0x0FD JUMPI PUSH4 0xA9254E4 DUP2 XOR PUSH2 0x02E JUMPI PUSH1 0x2 PUSH1 0x0 SSTORE STOP JUMPDEST PUSH4 0xC0406226 DUP2 XOR PUSH2 0x0E3 JUMPI PUSH32 0xB3C6E11C2816674A43C08A53579E48C3E2158E65C9AE36EDD17363863F98 TIMESTAMP PUSH1 0xC0 MSTORE PUSH1 0x20 PUSH1 0xC0 LOG1 PUSH4 0xE5D6BF2 PUSH1 0xC0 MSTORE PUSH1 0x64 PUSH1 0xE0 MSTORE PUSH1 0x1 SLOAD EXTCODESIZE ISZERO PUSH2 0x0FD JUMPI PUSH1 0x0 PUSH1 0x0 PUSH1 0x24 PUSH1 0xDC PUSH1 0x1 SLOAD GAS STATICCALL PUSH2 0x095 JUMPI RETURNDATASIZE PUSH1 0x0 PUSH1 0x0 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST PUSH32 0xB3C6E11C2816674A43C08A53579E48C3E2158E65C9AE36EDD17363863F98 TIMESTAMP PUSH1 0xC0 MSTORE PUSH1 0x20 PUSH1 0xC0 LOG1 PUSH1 0x1 PUSH1 0x0 SLOAD XOR PUSH2 0x0D7 JUMPI PUSH1 0x1 PUSH1 0xC0 MSTORE PUSH1 0x20 PUSH1 0xC0 PUSH2 0x0E1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0xC0 MSTORE PUSH1 0x20 PUSH1 0xC0 JUMPDEST RETURN JUMPDEST PUSH4 0x4E4FB1FA DUP2 XOR PUSH2 0x0F5 JUMPI PUSH2 0x0F3 JUMP JUMPDEST STOP JUMPDEST POP JUMPDEST PUSH1 0x0 PUSH1 0x0 REVERT JUMPDEST PUSH1 0x0 DUP1 REVERT JUMPDEST PUSH2 0x021 PUSH2 0x123 SUB PUSH2 0x021 PUSH1 0x0 CODECOPY PUSH2 0x021 PUSH2 0x123 SUB PUSH1 0x0 RETURN"}, "deployedBytecode": {"object": "0x600436101561000d576100f7565b60046000601c37600051346100fd57630a9254e4811861002e576002600055005b63c040622681186100e3577fb30c6e011c2816674a43c08a53579e48c30e2158e65c09ae36edd17363863f984260c052602060c0a163e5d6bf0260c052606460e0526001543b156100fd5760006000602460dc6001545afa610095573d600060003e3d6000fd5b7fb30c6e011c2816674a43c08a53579e48c30e2158e65c09ae36edd17363863f984260c052602060c0a16001600054186100d757600160c052602060c06100e1565b600060c052602060c05bf35b634e4fb1fa81186100f5576100f3565b005b505b60006000fd5b600080fd", "opcodes": "PUSH1 0x4 CALLDATASIZE LT ISZERO PUSH2 0x0D JUMPI PUSH2 0x0F7 JUMP JUMPDEST PUSH1 0x4 PUSH1 0x0 PUSH1 0x1C CALLDATACOPY PUSH1 0x0 MLOAD CALLVALUE PUSH2 0x0FD JUMPI PUSH4 0xA9254E4 DUP2 XOR PUSH2 0x02E JUMPI PUSH1 0x2 PUSH1 0x0 SSTORE STOP JUMPDEST PUSH4 0xC0406226 DUP2 XOR PUSH2 0x0E3 JUMPI PUSH32 0xB3C6E11C2816674A43C08A53579E48C3E2158E65C9AE36EDD17363863F98 TIMESTAMP PUSH1 0xC0 MSTORE PUSH1 0x20 PUSH1 0xC0 LOG1 PUSH4 0xE5D6BF2 PUSH1 0xC0 MSTORE PUSH1 0x64 PUSH1 0xE0 MSTORE PUSH1 0x1 SLOAD EXTCODESIZE ISZERO PUSH2 0x0FD JUMPI PUSH1 0x0 PUSH1 0x0 PUSH1 0x24 PUSH1 0xDC PUSH1 0x1 SLOAD GAS STATICCALL PUSH2 0x095 JUMPI RETURNDATASIZE PUSH1 0x0 PUSH1 0x0 RETURNDATACOPY RETURNDATASIZE PUSH1 0x0 REVERT JUMPDEST PUSH32 0xB3C6E11C2816674A43C08A53579E48C3E2158E65C9AE36EDD17363863F98 TIMESTAMP PUSH1 0xC0 MSTORE PUSH1 0x20 PUSH1 0xC0 LOG1 PUSH1 0x1 PUSH1 0x0 SLOAD XOR PUSH2 0x0D7 JUMPI PUSH1 0x1 PUSH1 0xC0 MSTORE PUSH1 0x20 PUSH1 0xC0 PUSH2 0x0E1 JUMP JUMPDEST PUSH1 0x0 PUSH1 0xC0 MSTORE PUSH1 0x20 PUSH1 0xC0 JUMPDEST RETURN JUMPDEST PUSH4 0x4E4FB1FA DUP2 XOR PUSH2 0x0F5 JUMPI PUSH2 0x0F3 JUMP JUMPDEST STOP JUMPDEST POP JUMPDEST PUSH1 0x0 PUSH1 0x0 REVERT JUMPDEST PUSH1 0x0 DUP1 REVERT", "sourceMap": "-1:-1:0:-;;;;;:::-;;:::-;:::-;;;;;;;;;:::-;243:33;;;;:::-;275:1;260:12;:16;243:33;:::-;288:170;;;;:::-;312:23;319:15;312:23;;;;;340:17;;;353:3;340:17;;;;;;;:::-;;;;;;;;;;:::-;;;;;;;;:::-;362:23;369:15;362:23;;;;;414:1;398:12;:17;395:41;;:::-;432:4;425:11;;;;;:::-;395:41::-;453:5;446:12;;;;288:170::-;;:::-;470:32;;;;:::-;;:::-;:::-;;:::-;-1:-1;:::-;;;;:::-;;;;"}, "methodIdentifiers": {"__init__()": "0x6e6eb99", "run()": "0xc0406226", "setUp()": "0xa9254e4", "testTrue()": "0x4e4fb1fa"}}}}}, "sources": {"home/user/src/C.vy": {"ast": {"ast_type": "Module", "body": [{"annotation": {"ast_type": "Name", "col_offset": 9, "end_col_offset": 16, "end_lineno": 3, "id": "uint256", "lineno": 3, "node_id": 4, "src": "28:7:0"}, "ast_type": "AnnAssign", "col_offset": 0, "end_col_offset": 16, "end_lineno": 3, "lineno": 3, "node_id": 1, "simple": 1, "src": "19:16:0", "target": {"ast_type": "Name", "col_offset": 0, "end_col_offset": 7, "end_lineno": 3, "id": "testVar", "lineno": 3, "node_id": 2, "src": "19:7:0"}, "value": null}, {"ast_type": "InterfaceDef", "body": [{"args": {"args": [{"annotation": {"ast_type": "Name", "col_offset": 19, "end_col_offset": 26, "end_lineno": 6, "id": "uint256", "lineno": 6, "node_id": 10, "src": "70:7:0"}, "arg": "time", "ast_type": "arg", "col_offset": 13, "end_col_offset": 26, "end_lineno": 6, "lineno": 6, "node_id": 9, "src": "64:13:0"}], "ast_type": "arguments", "col_offset": 13, "default": null, "defaults": [], "end_col_offset": 26, "end_lineno": 6, "lineno": 6, "node_id": 8, "src": "64:13:0"}, "ast_type": "FunctionDef", "body": [{"ast_type": "Expr", "col_offset": 29, "end_col_offset": 33, "end_lineno": 6, "lineno": 6, "node_id": 12, "src": "80:4:0", "value": {"ast_type": "Name", "col_offset": 29, "end_col_offset": 33, "end_lineno": 6, "id": "view", "lineno": 6, "node_id": 13, "src": "80:4:0"}}], "col_offset": 4, "decorator_list": [], "doc_string": null, "end_col_offset": 33, "end_lineno": 6, "lineno": 6, "name": "warp", "node_id": 7, "pos": null, "returns": null, "src": "55:29:0"}], "col_offset": 0, "end_col_offset": 33, "end_lineno": 6, "lineno": 5, "name": "VM", "node_id": 6, "src": "37:47:0"}, {"ast_type": "EventDef", "body": [{"annotation": {"ast_type": "Name", "col_offset": 11, "end_col_offset": 18, "end_lineno": 9, "id": "uint256", "lineno": 9, "node_id": 19, "src": "107:7:0"}, "ast_type": "AnnAssign", "col_offset": 4, "end_col_offset": 18, "end_lineno": 9, "lineno": 9, "node_id": 16, "simple": 1, "src": "100:14:0", "target": {"ast_type": "Name", "col_offset": 4, "end_col_offset": 9, "end_lineno": 9, "id": "value", "lineno": 9, "node_id": 17, "src": "100:5:0"}, "value": null}], "col_offset": 0, "end_col_offset": 18, "end_lineno": 9, "lineno": 8, "name": "Ev", "node_id": 15, "src": "86:28:0"}, {"annotation": {"ast_type": "Name", "col_offset": 4, "end_col_offset": 6, "end_lineno": 11, "id": "VM", "lineno": 11, "node_id": 24, "src": "120:2:0"}, "ast_type": "AnnAssign", "col_offset": 0, "end_col_offset": 6, "end_lineno": 11, "lineno": 11, "node_id": 21, "simple": 1, "src": "116:6:0", "target": {"ast_type": "Name", "col_offset": 0, "end_col_offset": 2, "end_lineno": 11, "id": "vm", "lineno": 11, "node_id": 22, "src": "116:2:0"}, "value": null}, {"args": {"args": [], "ast_type": "arguments", "col_offset": 0, "default": null, "defaults": [], "end_col_offset": 3, "end_lineno": 14, "lineno": 14, "node_id": 27, "src": "134:3:0"}, "ast_type": "FunctionDef", "body": [{"ast_type": "Assign", "col_offset": 4, "end_col_offset": 20, "end_lineno": 15, "lineno": 15, "node_id": 28, "src": "154:16:0", "target": {"ast_type": "Attribute", "attr": "testVar", "col_offset": 4, "end_col_offset": 16, "end_lineno": 15, "lineno": 15, "node_id": 29, "src": "154:12:0", "value": {"ast_type": "Name", "col_offset": 4, "end_col_offset": 8, "end_lineno": 15, "id": "self", "lineno": 15, "node_id": 30, "src": "154:4:0"}}, "value": {"ast_type": "Int", "col_offset": 19, "end_col_offset": 20, "end_lineno": 15, "lineno": 15, "node_id": 33, "src": "169:1:0", "value": 1}}, {"ast_type": "Assign", "col_offset": 4, "end_col_offset": 60, "end_lineno": 16, "lineno": 16, "node_id": 34, "src": "175:56:0", "target": {"ast_type": "Attribute", "attr": "vm", "col_offset": 4, "end_col_offset": 11, "end_lineno": 16, "lineno": 16, "node_id": 35, "src": "175:7:0", "value": {"ast_type": "Name", "col_offset": 4, "end_col_offset": 8, "end_lineno": 16, "id": "self", "lineno": 16, "node_id": 36, "src": "175:4:0"}}, "value": {"args": [{"ast_type": "Hex", "col_offset": 17, "end_col_offset": 59, "end_lineno": 16, "lineno": 16, "node_id": 42, "src": "188:42:0", "value": "0x7109709ECfa91a80626fF3989D68f67F5b1DD12D"}], "ast_type": "Call", "col_offset": 14, "end_col_offset": 60, "end_lineno": 16, "func": {"ast_type": "Name", "col_offset": 14, "end_col_offset": 16, "end_lineno": 16, "id": "VM", "lineno": 16, "node_id": 40, "src": "185:2:0"}, "keyword": null, "keywords": [], "lineno": 16, "node_id": 39, "src": "185:46:0"}}], "col_offset": 0, "decorator_list": [{"ast_type": "Name", "col_offset": 1, "end_col_offset": 9, "end_lineno": 13, "id": "external", "lineno": 13, "node_id": 43, "src": "125:8:0"}], "doc_string": null, "end_col_offset": 60, "end_lineno": 16, "lineno": 14, "name": "__init__", "node_id": 26, "pos": null, "returns": null, "src": "134:97:0"}, {"args": {"args": [], "ast_type": "arguments", "col_offset": 0, "default": null, "defaults": [], "end_col_offset": 3, "end_lineno": 19, "lineno": 19, "node_id": 46, "src": "243:3:0"}, "ast_type": "FunctionDef", "body": [{"ast_type": "Assign", "col_offset": 4, "end_col_offset": 20, "end_lineno": 20, "lineno": 20, "node_id": 47, "src": "260:16:0", "target": {"ast_type": "Attribute", "attr": "testVar", "col_offset": 4, "end_col_offset": 16, "end_lineno": 20, "lineno": 20, "node_id": 48, "src": "260:12:0", "value": {"ast_type": "Name", "col_offset": 4, "end_col_offset": 8, "end_lineno": 20, "id": "self", "lineno": 20, "node_id": 49, "src": "260:4:0"}}, "value": {"ast_type": "Int", "col_offset": 19, "end_col_offset": 20, "end_lineno": 20, "lineno": 20, "node_id": 52, "src": "275:1:0", "value": 2}}], "col_offset": 0, "decorator_list": [{"ast_type": "Name", "col_offset": 1, "end_col_offset": 9, "end_lineno": 18, "id": "external", "lineno": 18, "node_id": 53, "src": "234:8:0"}], "doc_string": null, "end_col_offset": 20, "end_lineno": 20, "lineno": 19, "name": "setUp", "node_id": 45, "pos": null, "returns": null, "src": "243:33:0"}, {"args": {"args": [], "ast_type": "arguments", "col_offset": 0, "default": null, "defaults": [], "end_col_offset": 3, "end_lineno": 23, "lineno": 23, "node_id": 56, "src": "288:3:0"}, "ast_type": "FunctionDef", "body": [{"ast_type": "Log", "col_offset": 4, "end_col_offset": 27, "end_lineno": 25, "lineno": 25, "node_id": 58, "src": "312:23:0", "value": {"args": [{"ast_type": "Attribute", "attr": "timestamp", "col_offset": 11, "end_col_offset": 26, "end_lineno": 25, "lineno": 25, "node_id": 62, "src": "319:15:0", "value": {"ast_type": "Name", "col_offset": 11, "end_col_offset": 16, "end_lineno": 25, "id": "block", "lineno": 25, "node_id": 63, "src": "319:5:0"}}], "ast_type": "Call", "col_offset": 10, "end_col_offset": 27, "end_lineno": 25, "func": {"ast_type": "Name", "col_offset": 10, "end_col_offset": 11, "end_lineno": 25, "id": "Ev", "lineno": 25, "node_id": 60, "src": "318:1:0"}, "keyword": null, "keywords": [], "lineno": 25, "node_id": 59, "src": "318:17:0"}}, {"ast_type": "Expr", "col_offset": 4, "end_col_offset": 21, "end_lineno": 26, "lineno": 26, "node_id": 66, "src": "340:17:0", "value": {"args": [{"ast_type": "Int", "col_offset": 17, "end_col_offset": 20, "end_lineno": 26, "lineno": 26, "node_id": 74, "src": "353:3:0", "value": 100}], "ast_type": "Call", "col_offset": 4, "end_col_offset": 21, "end_lineno": 26, "func": {"ast_type": "Attribute", "attr": "warp", "col_offset": 4, "end_col_offset": 16, "end_lineno": 26, "lineno": 26, "node_id": 68, "src": "340:12:0", "value": {"ast_type": "Attribute", "attr": "vm", "col_offset": 4, "end_col_offset": 11, "end_lineno": 26, "lineno": 26, "node_id": 69, "src": "340:7:0", "value": {"ast_type": "Name", "col_offset": 4, "end_col_offset": 8, "end_lineno": 26, "id": "self", "lineno": 26, "node_id": 70, "src": "340:4:0"}}}, "keyword": null, "keywords": [], "lineno": 26, "node_id": 67, "src": "340:17:0"}}, {"ast_type": "Log", "col_offset": 4, "end_col_offset": 27, "end_lineno": 27, "lineno": 27, "node_id": 76, "src": "362:23:0", "value": {"args": [{"ast_type": "Attribute", "attr": "timestamp", "col_offset": 11, "end_col_offset": 26, "end_lineno": 27, "lineno": 27, "node_id": 80, "src": "369:15:0", "value": {"ast_type": "Name", "col_offset": 11, "end_col_offset": 16, "end_lineno": 27, "id": "block", "lineno": 27, "node_id": 81, "src": "369:5:0"}}], "ast_type": "Call", "col_offset": 10, "end_col_offset": 27, "end_lineno": 27, "func": {"ast_type": "Name", "col_offset": 10, "end_col_offset": 11, "end_lineno": 27, "id": "Ev", "lineno": 27, "node_id": 78, "src": "368:1:0"}, "keyword": null, "keywords": [], "lineno": 27, "node_id": 77, "src": "368:17:0"}}, {"ast_type": "If", "body": [{"ast_type": "Return", "col_offset": 8, "end_col_offset": 19, "end_lineno": 30, "lineno": 30, "node_id": 92, "src": "425:11:0", "value": {"ast_type": "NameConstant", "col_offset": 15, "end_col_offset": 19, "end_lineno": 30, "lineno": 30, "node_id": 93, "src": "432:4:0", "value": true}}], "col_offset": 4, "end_col_offset": 19, "end_lineno": 30, "lineno": 29, "node_id": 84, "orelse": [], "src": "395:41:0", "test": {"ast_type": "Compare", "col_offset": 7, "end_col_offset": 24, "end_lineno": 29, "left": {"ast_type": "Attribute", "attr": "testVar", "col_offset": 7, "end_col_offset": 19, "end_lineno": 29, "lineno": 29, "node_id": 86, "src": "398:12:0", "value": {"ast_type": "Name", "col_offset": 7, "end_col_offset": 11, "end_lineno": 29, "id": "self", "lineno": 29, "node_id": 87, "src": "398:4:0"}}, "lineno": 29, "node_id": 85, "op": {"ast_type": "Eq", "col_offset": 7, "end_col_offset": 24, "end_lineno": 29, "lineno": 29, "node_id": 90, "src": "398:17:0"}, "right": {"ast_type": "Int", "col_offset": 23, "end_col_offset": 24, "end_lineno": 29, "lineno": 29, "node_id": 91, "src": "414:1:0", "value": 1}, "src": "398:17:0"}}, {"ast_type": "Return", "col_offset": 4, "end_col_offset": 16, "end_lineno": 32, "lineno": 32, "node_id": 94, "src": "446:12:0", "value": {"ast_type": "NameConstant", "col_offset": 11, "end_col_offset": 16, "end_lineno": 32, "lineno": 32, "node_id": 95, "src": "453:5:0", "value": false}}], "col_offset": 0, "decorator_list": [{"ast_type": "Name", "col_offset": 1, "end_col_offset": 9, "end_lineno": 22, "id": "external", "lineno": 22, "node_id": 96, "src": "279:8:0"}], "doc_string": null, "end_col_offset": 16, "end_lineno": 32, "lineno": 23, "name": "run", "node_id": 55, "pos": null, "returns": {"ast_type": "Name", "col_offset": 13, "end_col_offset": 17, "end_lineno": 23, "id": "bool", "lineno": 23, "node_id": 98, "src": "301:4:0"}, "src": "288:170:0"}, {"args": {"args": [], "ast_type": "arguments", "col_offset": 0, "default": null, "defaults": [], "end_col_offset": 3, "end_lineno": 35, "lineno": 35, "node_id": 101, "src": "470:3:0"}, "ast_type": "FunctionDef", "body": [{"ast_type": "Assert", "col_offset": 4, "end_col_offset": 16, "end_lineno": 36, "lineno": 36, "msg": null, "node_id": 102, "src": "490:12:0", "test": {"ast_type": "NameConstant", "col_offset": 11, "end_col_offset": 15, "end_lineno": 36, "lineno": 36, "node_id": 103, "src": "497:4:0", "value": true}}], "col_offset": 0, "decorator_list": [{"ast_type": "Name", "col_offset": 1, "end_col_offset": 9, "end_lineno": 34, "id": "external", "lineno": 34, "node_id": 104, "src": "461:8:0"}], "doc_string": null, "end_col_offset": 16, "end_lineno": 36, "lineno": 35, "name": "testTrue", "node_id": 100, "pos": null, "returns": null, "src": "470:32:0"}], "col_offset": 0, "doc_string": null, "end_col_offset": 16, "end_lineno": 36, "lineno": 1, "name": "home/user/src/C.vy", "node_id": 0, "src": "0:502:0"}, "id": 0}}}
```


Discussion:
Did a little investigation into how Brownie/Ape handle this via [VVM](https://github.com/vyperlang/vvm):

Working with the command line, it calls out to the binaries directly using a temporary copy of the file in a tmp path via:
```sh
$ /path/to/.vvm/vyper-0.3.1 /tmp/vyper-18ivvvsd.vy -f combined_json -p /path/to/projects/contracts-dir
```
Note that `-p /path/to/projects/contracts-dir` arg is given just in case there are local imports from that file.

This gives a result from the subprocess, which is parsed from a json string, that looks like this:
```py
>>> stdoutdata                                   
'{"/tmp/vyper-18ivvvsd.vy": {"bytecode": "0x60206...", ...}\n'
```

I think it then goes back and replaces the contract files again with their local counterparts in order to write to whatever cache file `ethers-rs` is using. Tbh it's a little messy.

Either way, I think the `-p` arg is missing when you call out via subprocess.

Resolving patch:
diff --git a/vyper/cli/vyper_json.py b/vyper/cli/vyper_json.py
--- a/vyper/cli/vyper_json.py
+++ b/vyper/cli/vyper_json.py
@@ -5,7 +5,7 @@
 import sys
 import warnings
 from pathlib import Path
-from typing import Callable, Dict, Tuple, Union
+from typing import Any, Callable, Dict, Hashable, List, Tuple, Union
 
 import vyper
 from vyper.cli.utils import extract_file_interface_imports, get_interface_file_path
@@ -136,12 +136,18 @@ def exc_handler_to_dict(file_path: Union[str, None], exception: Exception, compo
 
 
 def _standardize_path(path_str: str) -> str:
-    root_path = Path("/__vyper").resolve()
-    path = root_path.joinpath(path_str.lstrip("/")).resolve()
     try:
-        path = path.relative_to(root_path)
+        path = Path(path_str)
+
+        if path.is_absolute():
+            path = path.resolve()
+        else:
+            pwd = Path(".").resolve()
+            path = path.resolve().relative_to(pwd)
+
     except ValueError:
         raise JSONError(f"{path_str} - path exists outside base folder")
+
     return path.as_posix()
 
 
@@ -435,6 +441,21 @@ def format_to_output_dict(compiler_data: Dict) -> Dict:
     return output_dict
 
 
+# https://stackoverflow.com/a/49518779
+def _raise_on_duplicate_keys(ordered_pairs: List[Tuple[Hashable, Any]]) -> Dict:
+    """
+    Raise JSONError if a duplicate key exists in provided ordered list
+    of pairs, otherwise return a dict.
+    """
+    dict_out = {}
+    for key, val in ordered_pairs:
+        if key in dict_out:
+            raise JSONError(f"Duplicate key: {key}")
+        else:
+            dict_out[key] = val
+    return dict_out
+
+
 def compile_json(
     input_json: Union[Dict, str],
     exc_handler: Callable = exc_handler_raises,
@@ -444,7 +465,9 @@ def compile_json(
     try:
         if isinstance(input_json, str):
             try:
-                input_dict: Dict = json.loads(input_json)
+                input_dict: Dict = json.loads(
+                    input_json, object_pairs_hook=_raise_on_duplicate_keys
+                )
             except json.decoder.JSONDecodeError as exc:
                 new_exc = JSONError(str(exc), exc.lineno, exc.colno)
                 return exc_handler(json_path, new_exc, "json")


Test patch:
diff --git a/tests/cli/vyper_json/test_get_contracts.py b/tests/cli/vyper_json/test_get_contracts.py
--- a/tests/cli/vyper_json/test_get_contracts.py
+++ b/tests/cli/vyper_json/test_get_contracts.py
@@ -57,14 +57,15 @@ def test_contracts_bad_path():
 
 
 def test_contract_collision():
-    input_json = {"sources": {"foo.vy": {"content": FOO_CODE}, "/foo.vy": {"content": FOO_CODE}}}
+    # ./foo.vy and foo.vy will resolve to the same path
+    input_json = {"sources": {"./foo.vy": {"content": FOO_CODE}, "foo.vy": {"content": FOO_CODE}}}
     with pytest.raises(JSONError):
         get_input_dict_contracts(input_json)
 
 
 def test_contracts_return_value():
     input_json = {
-        "sources": {"/foo.vy": {"content": FOO_CODE}, "contracts/bar.vy": {"content": BAR_CODE}}
+        "sources": {"foo.vy": {"content": FOO_CODE}, "contracts/bar.vy": {"content": BAR_CODE}}
     }
     result = get_input_dict_contracts(input_json)
     assert result == {"foo.vy": FOO_CODE, "contracts/bar.vy": BAR_CODE}
diff --git a/tests/cli/vyper_json/test_interfaces.py b/tests/cli/vyper_json/test_interfaces.py
--- a/tests/cli/vyper_json/test_interfaces.py
+++ b/tests/cli/vyper_json/test_interfaces.py
@@ -41,7 +41,7 @@ def test_no_interfaces():
 
 
 def test_interface_collision():
-    input_json = {"interfaces": {"/bar.json": {"abi": BAR_ABI}, "bar.vy": {"content": BAR_CODE}}}
+    input_json = {"interfaces": {"bar.json": {"abi": BAR_ABI}, "bar.vy": {"content": BAR_CODE}}}
     with pytest.raises(JSONError):
         get_input_dict_interfaces(input_json)
 
@@ -71,8 +71,8 @@ def test_vy_no_content():
 def test_interfaces_output():
     input_json = {
         "interfaces": {
-            "/bar.json": {"abi": BAR_ABI},
-            "/interface.folder/bar2.vy": {"content": BAR_CODE},
+            "bar.json": {"abi": BAR_ABI},
+            "interface.folder/bar2.vy": {"content": BAR_CODE},
         }
     }
     result = get_input_dict_interfaces(input_json)
@@ -86,7 +86,7 @@ def test_interfaces_output():
 def test_manifest_output():
     input_json = {
         "interfaces": {
-            "/bar.json": {"contractTypes": {"Bar": {"abi": BAR_ABI}}},
+            "bar.json": {"contractTypes": {"Bar": {"abi": BAR_ABI}}},
         }
     }
     result = get_input_dict_interfaces(input_json)