skip to navigation
skip to content

Not Logged In

setuppy 0.2

run setup.py commands (customizable) from python. Usefull for hooks, IDE plugins, etc

Latest Version: 0.0.7

Installing

sudo pip install macos # requires for execute "sudo python ... " in Mac OS
sudo pip install setup

Usage

from setuppy import check, install,name,version,upload
try:
    print name(),version() # or fullname()
    check() # return True if "python setup.py check" succesfull
    install() # python setup.py install
    upload() # python setup.py upload
except Exception, e:
    print str(e)

Add it to your vcs (git, svn, hg) hooks. (it makes nothing if setup.py not found)

pre-commit hook example:

python <<EOF
import setuppy
setuppy.check()
EOF

post-commit hook example:

python <<EOF
from setuppy import exists, install,fullname,upload
from macos import notify
try:
    if exists:
        install()
        notify(fullname(),"python setup.py install",app="Python")
        upload()
        notify(fullname(),"python setup.py register sdist upload",app="Python")
except Exception, e:
    notify(fullname(),str(e),app="Python")
EOF

You can specify python version and setup.py location:

setuppy.check(bin="/usr/local/bin/python2.6")
setuppy.check(bin="/usr/local/bin/python2.6",file="/path/to/setup.py")
setuppy.install(bin="/usr/local/bin/python2.6")
setuppy.install(bin="/usr/local/bin/python2.6",file="/path/to/setup.py")

tested on Mac OS

 
File Type Py Version Uploaded on Size
setuppy-0.2.tar.gz (md5) Source 2012-11-10 2KB
  • Downloads (All Versions):
  • 21 downloads in the last day
  • 139 downloads in the last week
  • 522 downloads in the last month