Simple Summary
Allow using . and .. to specify relative imports of interfaces.
Abstract
Following a long discussion on #1361. It came to light that frameworks and programmers need more felxibility in terms of importing interfaces.
Motivation
The motivation is critical for VIPs that add or change Vyper's functionality. It should clearly explain why the existing Vyper functionality is inadequate to address the problem that the VIP solves as well as how the VIP is in line with Vyper's goals and design philosophy.
Specification
.. will specify parent directory of the current .vy being parsed.
. will specify current directory of the .vy being parsed.
e.g.
from .token_interface import TokenInterface
Will create an interface names TokenInterface from a file currently located at the same directory as the .vy file that is currently being parsed.
Environment variable:
Vyper shold be allowed to change it's lookup directory from CWD to one set in VYPER_PATHS.
Backwards Compatibility
Is forward compatible.
Dependencies
None.
Copyright
Copyright and related rights waived via CC0
Simple Summary
Allow using
.and..to specify relative imports of interfaces.Abstract
Following a long discussion on #1361. It came to light that frameworks and programmers need more felxibility in terms of importing interfaces.
Motivation
The motivation is critical for VIPs that add or change Vyper's functionality. It should clearly explain why the existing Vyper functionality is inadequate to address the problem that the VIP solves as well as how the VIP is in line with Vyper's goals and design philosophy.
Specification
..will specify parent directory of the current.vybeing parsed..will specify current directory of the.vybeing parsed.e.g.
Will create an interface names
TokenInterfacefrom a file currently located at the same directory as the.vyfile that is currently being parsed.Environment variable:
Vyper shold be allowed to change it's lookup directory from CWD to one set in
VYPER_PATHS.Backwards Compatibility
Is forward compatible.
Dependencies
None.
Copyright
Copyright and related rights waived via CC0