sometimes i think Python is checking my common sense.
-K
works: as
kahmed@jenkins-server-1:~/workspace/PR-TEST-RUNNER/nose/plugins$ sudo python setup.py install
running install
install_dir /usr/local/lib/python2.6/dist-packages/
Checking .pth file support in /usr/local/lib/python2.6/dist-packages/
/usr/bin/python -E -c pass
TEST PASSED: /usr/local/lib/python2.6/dist-packages/ appears to support .pth files
running bdist_egg
running egg_info
creating testtimer.egg-info
writing testtimer.egg-info/PKG-INFO
writing top-level names to testtimer.egg-info/top_level.txt
writing dependency_links to testtimer.egg-info/dependency_links.txt
writing manifest file 'testtimer.egg-info/SOURCES.txt'
reading manifest file 'testtimer.egg-info/SOURCES.txt'
writing manifest file 'testtimer.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-x86_64/egg
running install_lib
running build_py
creating build/lib.linux-x86_64-2.6
copying testtimer.py -> build/lib.linux-x86_64-2.6
creating build/bdist.linux-x86_64/egg
copying build/lib.linux-x86_64-2.6/testtimer.py -> build/bdist.linux-x86_64/egg
byte-compiling build/bdist.linux-x86_64/egg/testtimer.py to testtimer.pyc
creating build/bdist.linux-x86_64/egg/EGG-INFO
copying testtimer.egg-info/PKG-INFO -> build/bdist.linux-x86_64/egg/EGG-INFO
copying testtimer.egg-info/SOURCES.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying testtimer.egg-info/dependency_links.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
copying testtimer.egg-info/top_level.txt -> build/bdist.linux-x86_64/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist/testtimer-1.1-py2.6.egg' and adding 'build/bdist.linux-x86_64/egg' to it
removing 'build/bdist.linux-x86_64/egg' (and everything under it)
Processing testtimer-1.1-py2.6.egg
creating /usr/local/lib/python2.6/dist-packages/testtimer-1.1-py2.6.egg
Extracting testtimer-1.1-py2.6.egg to /usr/local/lib/python2.6/dist-packages
Removing testtimer 1.0 from easy-install.pth file
Adding testtimer 1.1 to easy-install.pth file
Installed /usr/local/lib/python2.6/dist-packages/testtimer-1.1-py2.6.egg
Processing dependencies for testtimer==1.1
Finished processing dependencies for testtimer==1.1
kahmed@jenkins-server-1:~/workspace/PR-TEST-RUNNER/nose/plugins$ python
Python 2.6.6 (r266:84292, Sep 15 2010, 16:22:56)
[GCC 4.4.5] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import testtimer
>>> dir(testtimer)
['Plugin', '__builtins__', '__doc__', '__file__', '__name__', '__package__', 'nose', 'operator', 'testtimer', 'time']
>>>
>>> exit()
kahmed@jenkins-server-1:~/workspace/PR-TEST-RUNNER/nose/plugins$ more setup.py
from setuptools import setup
setup(
name='testtimer',
version='1.1',
py_modules=['testtimer'],
)
kahmed@jenkins-server-1:~/workspace/PR-TEST-RUNNER/nose/plugins$ ls testtimer.py
testtimer.py
i would expect dir(testtimer) to return class and methods but no it returns built-in attributes, i wonder how i can return methods to make sure that testtimer is indeed the module i just registered.
On to making setup.py a bit more elaborate :)
Thanks,
-Kamal.