Cygwin and path issues

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Berlin Brown

    Cygwin and path issues

    I am trying to run some basic unit tests, but I can't get the paths
    setup in python/cygwin to pick up my modules.

    This code works fine in linux and I installed python through cygwin
    not as part of the win32 install.


    DIR_PATH =
    os.path.abspath (os.path.dirnam e(os.path.realp ath(__file__)))
    PROJECT_HOME = os.path.join(DI R_PATH, '..', '..', '..')

    print("INFO: project_home=%s " % PROJECT_HOME)

    EXTRA_PATHS = [
    DIR_PATH,
    os.path.join(PR OJECT_HOME, 'projects', 'ghostnet'),
    os.path.join(PR OJECT_HOME, 'google_appengi ne'),
    os.path.join(PR OJECT_HOME, 'google_appengi ne', 'lib', 'webob'),
    os.path.join(PR OJECT_HOME, 'google_appengi ne', 'lib', 'yaml', 'lib')
    ]
    sys.path = EXTRA_PATHS + sys.path

    print sys.path

    ---------------

    in my ~/.bash_profile

    I also included the following.

    export PYTHONPATH=/cygdrive/c/projects/projects_ecl/botlist:/cygdrive/
    c/projects


    Basically, I tried to add the module directory locations in my code;
    also I tried to add the absolute path to my PYTHONPATH.

    None of these approaches work. I get the following error, which I
    dont get on the linux side:

    Traceback (most recent call last):
    File "run_all_tests. py", line 108, in <module>
    from django.conf import settings
    ImportError: No module named django.conf
Working...