title: Automating post-install of Python dependency from Git using Poetry
body: <p>I'm using <a href="https://github.com/sdispater/poetry" rel="nofollow noreferrer">Poetry</a> for Python dependency management, along with <a href="https://github.com/P1sec/pycrate" rel="nofollow noreferrer">PyCrate</a> for ASN.1 encoding/decoding.</p>
  
  <p>PyCrate is a dependency pulled from GitHub, and once pulled from GitHub, is installed by running a setup file within the PyCrate directory.</p>
  
  <pre><code>python setup.py install
  </code></pre>
  
  <p>I would like to integrate the installation step into my <code>pyproject.toml</code>, if possible. My current <code>pyproject.toml</code> includes PyCrate as follows:</p>
  
  <pre><code>…
  [tool.poetry.dependencies]
  pycrate = {git = "https://github.com/P1sec/pycrate.git"}
  …
  </code></pre>
  
  <p>This will pull PyCrate from the GitHub repository, but into the <code>src</code> folder in the virtualenv created by Poetry.</p>
  
  <p>Is there any way to automatically run the setup script when performing a <code>poetry install</code>? I have looked into using <a href="https://poetry.eustace.io/docs/pyproject/#scripts" rel="nofollow noreferrer">Poetry scripts</a>, but haven't been able to get this up and running correctly as of yet.</p>
  
  <p>My current setup involves running a <code>poetry install</code>, then manually running the <code>setup.py install</code> for PyCrate, however I would like to have my <code>poetry install</code> to perform the full setup, if it can be done.</p>
  
  <p>Any help with this would be much appreciated.</p>