install trunk : script openerp-client miss egg folder in path

Bug #872925 reported by xavinsky
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Odoo GTK Client (MOVED TO GITHUB)
Fix Committed
Medium
OpenERP sa GTK client R&D

Bug Description

Install on linux (debian with ou wothout virtualenv)
after the
python setup.py install
when I use openerp-client command :
<pathbin>/bin/openerp-client: 2: cd: can't cd to <pathlib>/lib/python2.7/site-packages/openerp-client

because the path miss the egg folder :
<pathlib>/lib/python2.7/site-packages/openerp_client-6.1dev-py2.7.egg/openerp-client

Related branches

Revision history for this message
xavinsky (xavinsky) wrote :
Revision history for this message
xavinsky (xavinsky) wrote :
Changed in openobject-client:
status: New → Fix Committed
xavinsky (xavinsky)
Changed in openobject-client:
status: Fix Committed → New
Revision history for this message
Amit Parik (amit-parik) wrote :

Hello Xavier,

I have checked this issue with python2.6 and 2.7 both but the source code build successfully and I am not able to get any problem.

I have seen this type of massage on terminal.

Using /usr/lib/python2.7/dist-packages
Searching for lxml==2.3
Best match: lxml 2.3
Adding lxml 2.3 to easy-install.pth file

Using /usr/lib/python2.7/dist-packages
Finished processing dependencies for openerp-client==6.1dev

So would you please provide the more information on this.

Thanks and waiting for your reply!

Changed in openobject-client:
status: New → Incomplete
Revision history for this message
xavinsky (xavinsky) wrote :

  If it's work for you,
I think it's a python implementation eggs dependent distribution problem...

My System : Debian wheezy amd64

uname -a
Linux <machine> 3.0.0-1-amd64 #1 SMP Sat Aug 27 16:21:11 UTC 2011 x86_64 GNU/Linux
python -V
Python 2.7.2+

Installation :

cd /home/xavinsky
mkdir trunktest
cd trunktest/
bzr branch lp:~openerp/openobject-client/trunk client
Branched 1983 revision(s).
cd client
sudo python setup.py install
.....
Finished processing dependencies for openerp-client==6.1dev

Creation d'un fichier de config client : openerp-client.config
[path]
pixmaps = /usr/local/lib/python2.7/dist-packages/openerp_client-6.1dev-py2.7.egg/share/pixmaps/openerp-client
share = /usr/local/lib/python2.7/dist-packages/openerp_client-6.1dev-py2.7.egg/share/openerp-client

openerp-client -c /home/xavinsky/trunktest/client/
/usr/local/bin/openerp-client: 2: cd: can't cd to /usr/local/lib/python2.7/dist-packages/openerp-client
/usr/bin/python: can't open file './openerp-client.py': [Errno 2] No such file or directory

I have the same probleme in a virtualenv.
I fix it with :
lp:~xavinsky/openobject-client/trunk-bug-872925-xavinsky

----------
more explain ;

the script mydistutils.py
create the script :
/usr/local/bin/openerp-client
cd /usr/local/lib/python2.7/dist-packages/openerp-client

with the path of the egg in
/usr/local/lib/python2.7/dist-packages/openerp-client
but in my distrib, it's create it in :0
/usr/local/lib/python2.7/dist-packages/openerp_client-6.1dev-py2.7.egg/openerp-client

I will try with on other platform ...

Amit Parik (amit-parik)
Changed in openobject-client:
assignee: nobody → OpenERP sa GTK client R&D (openerp-dev-gtk)
importance: Undecided → Low
status: Incomplete → Confirmed
importance: Low → Medium
Revision history for this message
Naresh(OpenERP) (nch-openerp) wrote :

hello xavinsky,

It seems that setuptools that has been used to build and install openerp in setup.py in the trunk version replacing the distutils package that was used previously. As setuptools do create an .egg folder intensionally. so may be we need to calculate the path accordindly(as you have in your merge proposal) but I dont think its a platform related bug. It should be reproduced on any platform . I reproduced it on Linux Naresh 2.6.38-12-generic #51-Ubuntu SMP Wed Sep 28 14:25:20 UTC 2011 i686 i686 i386 GNU/Linux both on python2.6 and python2.7.

So what I think is we will need this changes in the mydistutils.py .

What do you think ? or am I missing something ?

Regards,

Revision history for this message
xavinsky (xavinsky) wrote :

Hello Naresh.

    I planed work on openerp installers when I come back in France (14 novembre).
I will propose others fix that's work on more plateform.

  I installed some Virtual Machines (all SMP):
  debian squeeze
  debian wheezy
  ubuntu 11.10 Server
  ubuntu 11.10 Deskstop
  windows server 2008R2.
I will install soon another
  gentoo

  It's possible that I will build no SMP plateform and ubuntu 11.04 too... but I'm not yet sure.

  After, my plan is test and fix install in virtual env and standard install with python 2.6 and 2.7 for all of them.
Should be interresting to know what is the platform of Amit Parik, for add it to test.

  For know, if you want to change mydistutils.py
my advise for now is keep the new and old path in start script define
openerp_site_packages_v1 and openerp_site_packages_v2
ans use test in shell script for test where is the file...
and change start_script for add shel test
if [ -f testfile %s] openerp_site_packages_v1
 ...
if [ -f testfile %s] openerp_site_packages_v2
...

 Because if not test all options, change will break somes plateforms as the Amit one.

  other solution coold be use pkg_ressources, something like :
import pkg_resources
pkg_resources.run_script('openerpclient==6.1dev', 'openerp-client')
But I din't fix some python-coverage issue in virtualenv with this syntax...

  I will finish study buildbots and runbots openerp before propose my changes...
I think I will propose something near 15 November.

Revision history for this message
xavinsky (xavinsky) wrote :

Hello Naresh.

  I didn't finish all test,
but I push the bugfix with if [ -d] ...

  It's work with old an newer distutils configurations.

  I will propose a another fix later (more elegant),
after every test on all plateform.

A++ Xav.

Changed in openobject-client:
status: Confirmed → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.