← Back to team overview

ubuntuone-users team mailing list archive

Re: OS X development environment

 

Hi José, thank you for your patience working through this - you've found an assumption in our dev setup instructions, where we have assumed you will run the tests first, before trying to run the tools.

The script ubuntuone-client/run-mac-tests has the following two lines:
cp windows/clientdefs.py ubuntuone/clientdefs.py
cp windows/logging.conf data/logging.conf

On linux, those files are generated by the Makefile, but on mac and windows, we don't use the makefile, so we have copied dummy files. This is a known bug, but we haven't had time to clean up these details.

-mike


On Nov 14, 2012, at 4:03 PM, José Expósito wrote:

> Hi Mike, thank you very much for your help
> 
> With your tips now u1sdtool founds the Ubuntu One modules but I have
> problems with clientdefsn. This are my environment variables:
> 
> $ export PATH=/Users/jose/Devel/ubuntuone-windows-installer/scripts/devsetup/bin:$PATH
> ; \
>  export PARTS=/Users/jose/Devel/ubuntuone-windows-installer/scripts/devsetup/parts
> ; \
>  export PYTHONPATH=`brew
> --prefix`/lib/python2.7/site-packages:$PARTS/ubuntuone-client:$PARTS/ubuntu-sso-client:$PYTHONPATH
> 
> And when I run u1sdtool I have this error:
> 
>  $ python $PARTS/ubuntuone-client/bin/u1sdtool
>    Traceback (most recent call last):
>     File "/Users/jose/Devel/ubuntuone-windows-installer/scripts/devsetup/parts/ubuntuone-client/bin/u1sdtool",
> line 59, in <module>
>       from ubuntuone.platform.tools import (
>     File "/Users/jose/Devel/ubuntuone-windows-installer/scripts/devsetup/parts/ubuntuone-client/ubuntuone/platform/__init__.py",
> line 50, in <module>
>       from ubuntuone.platform import credentials
>     File "/Users/jose/Devel/ubuntuone-windows-installer/scripts/devsetup/parts/ubuntuone-client/ubuntuone/platform/credentials/__init__.py",
> line 51, in <module>
>       from ubuntuone import clientdefs
>    ImportError: cannot import name clientdefs
> 
> The file clientdefs.py.in exists... Could be a similar problem to this bug?
> https://bugs.launchpad.net/ubuntuone-client/+bug/399357
> 
> 2012/11/14 Michael McCracken <mike.mccracken@xxxxxxxxxxxxx>:
>> Hi José, this is a PYTHONPATH problem.
>> /usr/local/bin/python won't work because it is missing all the dependencies. The python in devsetup/bin/ has *most* of the dependencies, but we did not have it automatically add the paths to the source directories in parts/ themselves - so that python does not have ubuntuone-client/ in its PYTHONPATH.
>> 
>> One solution is to run u1sdtool like this:
>> 
>> PYTHONPATH=$PYTHONPATH:$PARTS/ubuntuone-client python $PARTS/bin/u1sdtool
>> 
>> or whatever equivalent you like (e.g., exporting that PYTHONPATH and then just running the command.
>> 
>> Note that I've just typed 'python' - there is a file devsetup/env-mac that we usually source, that puts devsetup/bin at the front of $PATH. You want that python, not /usr/local/bin/python.
>> 
>> -mike
> 
> _______________________________________________
> Mailing list: https://launchpad.net/~ubuntuone-users
> Post to     : ubuntuone-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~ubuntuone-users
> More help   : https://help.launchpad.net/ListHelp



Follow ups

References