title: How setup.py install npm module?
body: <p>I implemented a python web client that I would like to test.</p>
  
  <p>The server is hosted in npm registry. The server gets ran locally with node before running my functional tests.</p>
  
  <p>How can I install properly the npm module from my setup.py script?</p>
  
  <p>Here is my current solution inspired from this <a href="https://stackoverflow.com/questions/27950551/how-to-execute-a-safe-bash-shell-command-within-setup-py/27953695#27953695">post</a>:</p>
  
  <pre><code>class CustomInstallCommand(install):
      def run(self):
          arguments = [
              'npm',
              'install',
              '--prefix',
              'test/functional',
              'promisify'
          ]
          subprocess.call(arguments, shell=True)
          install.run(self)
  
  setup(
      cmdclass={'install': CustomInstallCommand},
  </code></pre>