Skip to content

Instantly share code, notes, and snippets.

@mpkocher
Created February 25, 2013 15:53
Show Gist options
  • Save mpkocher/5030760 to your computer and use it in GitHub Desktop.
Save mpkocher/5030760 to your computer and use it in GitHub Desktop.
Custom command in setup.py.
from setuptools import setup, Command
class GetVersion(Command):
"""This must be defined"""
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
"""Business end of the command"""
print '0.0.1'
kw = {'version': '0.11',
'author': 'MK',
'name':'ExampleProject',
'cmdclass':{'getVersion':GetVersion}
}
setup(**kw)
@mjhsieh
Copy link

mjhsieh commented Feb 25, 2013

So the problem is that this host does not have setuptools installed by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment