← Back to team overview

ubuntuone-users team mailing list archive

Re: OS X development environment

 

Hi Mike,

Thanks to you! My problems continue, now trying to import fseventsd
from ubuntu one:

MacBook-Air-de-Jose:~ jose$ 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:$PARTS/macfsevents:$PYTHONPATH
MacBook-Air-de-Jose:~ jose$ cd $PARTS/ubuntuone-client
MacBook-Air-de-Jose:ubuntuone-client jose$ ./run-mac-tests
Executing the tests...
Traceback (most recent call last):
  File "/Users/jose/Devel/ubuntuone-windows-installer/scripts/devsetup/bin/u1trial",
line 39, in <module>
    sys.exit(ubuntuone.devtools.runners.main())
  File "/Users/jose/Devel/ubuntuone-windows-installer/scripts/devsetup/parts/ubuntuone-dev-tools/ubuntuone/devtools/runners/__init__.py",
line 277, in main
    suite = test_runner.get_suite(options)
  File "/Users/jose/Devel/ubuntuone-windows-installer/scripts/devsetup/parts/ubuntuone-dev-tools/ubuntuone/devtools/runners/__init__.py",
line 173, in get_suite
    config['ignore-paths']))
  File "/Users/jose/Devel/ubuntuone-windows-installer/scripts/devsetup/parts/ubuntuone-dev-tools/ubuntuone/devtools/runners/__init__.py",
line 157, in _collect_tests
    module_suite = self._load_unittest(filepath)
  File "/Users/jose/Devel/ubuntuone-windows-installer/scripts/devsetup/parts/ubuntuone-dev-tools/ubuntuone/devtools/runners/__init__.py",
line 98, in _load_unittest
    module = __import__(modpath, None, None, [""])
  File "/Users/jose/Devel/ubuntuone-windows-installer/scripts/devsetup/parts/ubuntuone-client/tests/platform/__init__.py",
line 34, in <module>
    from tests.platform.ipc import test_perspective_broker
  File "/Users/jose/Devel/ubuntuone-windows-installer/scripts/devsetup/parts/ubuntuone-client/tests/platform/ipc/test_perspective_broker.py",
line 44, in <module>
    from contrib.testing.testcase import (
  File "/Users/jose/Devel/ubuntuone-windows-installer/scripts/devsetup/parts/ubuntuone-client/contrib/testing/testcase.py",
line 49, in <module>
    from ubuntuone.syncdaemon import (
  File "/Users/jose/Devel/ubuntuone-windows-installer/scripts/devsetup/parts/ubuntuone-client/ubuntuone/syncdaemon/event_queue.py",
line 41, in <module>
    from ubuntuone.platform.filesystem_notifications.monitor import (
  File "/Users/jose/Devel/ubuntuone-windows-installer/scripts/devsetup/parts/ubuntuone-client/ubuntuone/platform/filesystem_notifications/monitor/__init__.py",
line 57, in <module>
    from ubuntuone.platform.filesystem_notifications.monitor import darwin
  File "/Users/jose/Devel/ubuntuone-windows-installer/scripts/devsetup/parts/ubuntuone-client/ubuntuone/platform/filesystem_notifications/monitor/darwin/__init__.py",
line 31, in <module>
    from ubuntuone.platform.filesystem_notifications.monitor.darwin import (
  File "/Users/jose/Devel/ubuntuone-windows-installer/scripts/devsetup/parts/ubuntuone-client/ubuntuone/platform/filesystem_notifications/monitor/darwin/fsevents_daemon.py",
line 45, in <module>
    from ubuntuone import fseventsd
ImportError: cannot import name fseventsd

I have cloned the macfsevents from github, but I can not checkout
lp:ubuntuone-fsevents-daemon, that I think that is the problem.
Currently the ubuntuone-fsevents-daemon has no source code.

At least now I'm able to run the ubuntuone-control-panel test

2012/11/15 Michael McCracken <mike.mccracken@xxxxxxxxxxxxx>:
> 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
>


References