Include a third party library using namespaces, dependencies I made a library to access to the Taleo data ( https://github.com/Polzme/Taleo ).
I tried to follow the best practice to do it.
It's using composer ( http://getcomposer.org/ ) to resolve dependencies to Monolog and Guzzle.

Now, the big question is, how to use my library 'Taleo' in a Drupal module ?

I tried with xautoload ( http://drupal.org/project/xautoload ) and composer_autoload ( http://drupal.org/project/composer_autoload ) without success.

I also tried to include the file 'vendor/autoload.php', but it doesn't works (and it works well in the demo.php file: https://github.com/Polzme/Taleo/blob/master/demo.php)

Before including each file manually, I would like to know if there is a working solution available for Drupal 7.

Thanks!
It is indeed possible with xautoload.

Here is some explanation what initially went wrong:
https://gist.github.com/4018045

As a general guide:

function hook_libraries_info() {
  return array(
    'Taleo' =&gt; array(
      'name' =&gt; 'Taleo PHP Library',
      'xautoload' =&gt; function($api) {
        // $api already knows the library path.
        // 'src' is relative to that.
        $api-&gt;namespaceRoot('Taleo', 'src');
      },
    ),
  );
}


The $api object is explained here:
http://drupalcode.org/project/xautoload.git/blob/refs/heads/7.x-2.x:/lib/InjectedAPI/hookXautoload.php