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

Use entry_points instead of scripts #1574

iamdefinitelyahuman opened this issue Aug 18, 2019 · 2 comments · Fixed by #1576


Copy link

@iamdefinitelyahuman iamdefinitelyahuman commented Aug 18, 2019

Simple Summary

Vyper's compiler scripts should be installed via entry_points and made available as vyper.cli


Using entry_points instead of scripts removes the need for if __name__ == "main": within Vyper's command-line scripts. Placing the functionality within a main() method simplifies writing unit tests. Migrating the scripts to vyper/cli allows them to be imported and accessed by other packages.

entry_points also provides better cross-platform compatibility, and it's use is recommended over scripts within the PyPA docs.


  • I need to write unit tests for #1570
  • 3rd party tooling written in python should be able to access the full range of the compiler's functionality without relying on a subprocess call to reach bin/vyper


  • modify
  • replace if __name__ == "main": with def main(): in all bin scripts
  • move the bin folder to vyper/cli, add .py suffix to files

Backwards Compatibility

Should not cause any issues as scripts will still be invoked via the same commands, and the bin folder was not previously available to import as a package.


Copyright and related rights waived via CC0


This comment has been minimized.

Copy link

@jacqueswww jacqueswww commented Aug 18, 2019

Yeah this doesn't really even need a VIP IMHO. #1337 also implements this if I recall correctly.
#1128 will be fixed with using entrypoints.


This comment has been minimized.

Copy link

@jacqueswww jacqueswww commented Aug 18, 2019

Removed VIP, and yes - just do it :)

@iamdefinitelyahuman iamdefinitelyahuman changed the title VIP: Use entry_points instead of scripts Use entry_points instead of scripts Aug 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.