I'm new to python and was curious if python had something like an npm install
that would pip install the required packages for a script I have. I've looked into the setup.py
readme and it looks like its mostly geared to creating a tarball to send to pip, which isn't what I want.
I'd like to be able to check out the source code and then just run it. As it stands when I ask my coworkers to use the script they run into import failures and have to manually pip install things which is a poor experience.
My setup.py file is
#!/usr/bin/env python
from distutils.core import setup
setup(name='Add-Webhook',
version='1.0',
description='Adds webhooks to git repos',
author='devshorts',
packages=['requests'],
)
And when I run it it
$ python setup.py install
running install
running build
running build_py
error: package directory 'requests' does not exist
I have a small script that sits next to the setup.py that uses the requests
package and I'd like for it to be installed on 'install'
$ ls
total 40
-rw-r--r-- 1 akropp JOMAX\Domain Users 1039 Feb 24 09:51 README.md
-rwxr-xr-x 1 akropp JOMAX\Domain Users 4489 Feb 27 17:01 add-webhook.py
-rw-r--r-- 1 akropp JOMAX\Domain Users 391 Feb 23 14:24 github.iml
-rw-r--r-- 1 akropp JOMAX\Domain Users 213 Apr 8 15:06 setup.py