Created
February 25, 2013 15:53
-
-
Save mpkocher/5030760 to your computer and use it in GitHub Desktop.
Custom command in setup.py.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | |
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
mhsieh@builder-ubuntu1004:~/depot/software/bioinformatics/lib/python/pbcore$ python setup.py --version
Traceback (most recent call last):
File "setup.py", line 1, in
from setuptools import setup, Extension, find_packages
ImportError: No module named setuptools