I have looked through the setup.py documentation and am still experiencing some difficulties with what, in my opinion, should be fairly simple.
I broke it down into a simple example project that I am trying to run, my layout of the project directory is as follows:
myproject setup.py src\ main.py extern\ __init__.py mytest.py
MyProject / setup.py:
#!/usr/bin/env python from distutils.core import setup setup(name = "myproject", package_dir = {'':"src"}, packages = ["extern"], scripts = ["src/main.py"], )
MyProject / SRC / main.py:
#! /usr/bin/env python import extern.mytest as mytest mytest.print_test()
MyProject / src / exebp / mytest.py:
#!/usr/bin/env python def print_test(): print "YAY"
myproject / src / extern / _init_.py is empty.
I run setup.py like:
setup.py install
setup.py will complete without errors and move main.py to ~ / local / bin, however when I start, I get the following error:
ImportError: No module named extern.mytest
Any idea what I'm doing wrong? Thanks!
source share