ApeWorX / ape-vyper

Vyper compiler plugin for the Ape Framework, using VVM
https://www.apeworx.io/
Apache License 2.0
26 stars 9 forks source link

fix: allow source install of vyper #30

Closed antazoey closed 2 years ago

antazoey commented 2 years ago

What I did

Fix bug preventing local install of vyper package from working.

How I did it

Two things had to be done:

  1. Checks to make sure we don't attempt to download the package if we detect we are using the version we have in our site-packages. (detected using the pragma spec).
  2. Specify the path to the binary. This is needed so we can still use the vvm method.

How to verify it

Two cases needed for testing (that I have tried myself too):

Case 1:

  1. Install vyper from source (either a local clone or via git)
  2. Compile a contract using the next bumped version. Right now, the latest tag on vyper is 0.3.1, so set your pragma to 0.3.2. It should work now!

Case 2 (regression test):

  1. Make sure you do not have vyper installed locally.
  2. Specify a pragma from a released tag, such as 0.3.1.
  3. Notice you can compile

Checklist