View Full Version : calibre VMWare development environment


kovidgoyal
09-22-2007, 11:05 AM
This is for those of you are that are interested in contributing code/patches to libprs500 development. I've created a VMWare virtual machine with a fully setup libprs500 development environment, with Eclipse as the IDE. Instructions for getting it are at at

https://calibre.kovidgoyal.net/wiki/Development

Moderators: please make this a sticky. Thanks.

RoninTech
10-28-2008, 09:48 PM
Great idea! I tried to use this but have no idea on how to get the gentoo eth0 interface working. Without that I can't download the latest source from the repository. Any ideas anyone?

kovidgoyal
10-28-2008, 10:02 PM
dmesg | grep eth


see what number you NIC is being assigned. Say it is ethX. Then


ln -s /etc/init.d/net.lo /etc/init.d/net.ethX
/etc/init.d/net.ethX restart

RoninTech
10-28-2008, 10:29 PM
Managed to get it going with a "sudo dhclient eth2"

Now I'm having an issue updating the src:

Cheers,
Crazy

kovidgoyal
10-28-2008, 11:27 PM
no need to do --uninstall, just do sudo python setup.py develop

you're probably going to have to do


emerge python-lxml qt PyQt beautifulsoup


as well to update dependencies.

RoninTech
11-01-2008, 04:39 PM
I have the vm appliance working but I can't emerge those modules ("emerge: there are no ebuilds to satisfy "python-lxml"" etc.).

Also if I try to update to the latest source I get "ERROR: Working tree "/home/kovid/work/calibre/" has uncommitted changes.

Cheers,
Crazy

kovidgoyal
11-01-2008, 04:43 PM
oops should be just lxml

you can always delete the tree and check it out again

RoninTech
11-01-2008, 05:35 PM
OK,

Once you have your vm session running with a valid network connection (see above), the following commands worked for me:

1 - rm -Rf calibre
2 - bzr branch http://bzr.kovidgoyal.net/code/calibre/trunk calibre
3 - sudo emerge sync
4 - sudo emerge dev-python/lxml dev-python/PyQt dev-python/beautifulsoup

PyQT is taking a loooong time to emerge so I'll post back if I can now build after these finish

Cheers,
Crazy

kovidgoyal
11-01-2008, 05:56 PM
yeah qt+pyqt takes forever to compile. I really should upload an updated version, but i've got too much on my plate at the moment.

RoninTech
11-01-2008, 06:49 PM
shoot, thought it was done after a few hours but looks like I forgot qt. So at least one more step:

sudo emerge x11-libs/qt

Once I'm able to build the latest source, would it be possible for me to capture my updated appliance and give it to you so others don't have to spend hours getting this stuff again?

Cheers,
Crazy

kovidgoyal
11-01-2008, 06:55 PM
Sure just delete /usr/portage/* (to save disk space) and zip up the vmware files (I use 7-zip for best compression) and post it somewhere. I'll update the version on the website with it. ALso make sure you clean out /tmp and /var /tmp before zipping.

RoninTech
11-01-2008, 08:34 PM
I'm at a roadblock. When I try to build I get an error "Unknown Qt widget: QPlainTextEdit". So then I try to execute "sudo emerge x11-libs/qt". This runs for a while then for some reason the aterm disappears. After that, trying a build gives the same error and trying another emerge on qt runs for a while again then makes the aterm disappear. I think I'm doomed to never be able to build this thing under vm.

Cheers,
Crazy

kovidgoyal
11-01-2008, 08:38 PM
you can ssh into the vm if you're having trouble with aterm. What versions of qt and pyqt do you have installed?

emerge -s PyQt

emerge -s qt

RoninTech
11-01-2008, 08:57 PM
Here's what the emerge log says. It just seems to end while trying to emerge x11-libs/qt-4.4.2

kovidgoyal
11-01-2008, 09:00 PM
I'll upload a working build later tonight.

RoninTech
11-01-2008, 09:02 PM
dev-python/PyQt is 3.17.4
dev-python/PyQt4 is 4.4.3
x11-libs/qt is 4.4.2

kovidgoyal
11-01-2008, 10:29 PM
I've uploaded an updated build (the upload should complete in about half an hour)

bkilian
11-10-2008, 05:41 PM
I've uploaded an updated build (the upload should complete in about half an hour)Nice idea, is there any version available for folks that don't want to pay $180 for VMWare? Virtual PC is free.

pilotbob
11-10-2008, 05:50 PM
Nice idea, is there any version available for folks that don't want to pay $180 for VMWare? Virtual PC is free.

VMWare player is free too.

http://vmware.com/products/player/

BOb

ldolse
04-20-2009, 11:28 PM
Not having any luck getting this VM image up and running. Has anyone tried converting the OVF for use on OS X with vmware fusion?

kovidgoyal
04-22-2009, 04:11 AM
http://communities.vmware.com/message/947976

kovidgoyal
04-22-2009, 04:12 AM
OR http://www.infrageeks.com/groups/infrageeks/weblog/357ad/

ldolse
04-22-2009, 11:02 AM
Already been to those sites, but things have changed a bit since that stuff was posted. Unfortunately vmware has discontinued the java based ovftool.jar file that they mention on those sites. I couldn't get the latest binary tool running on OS X, and didn't have any luck trying to use the windows based ovftool.

Giving up on that route for now, will just build my own linux vm....

myle00
07-31-2009, 01:53 PM
I just tried running the image in VMware Workstation 6.5.2 on vista and I got this error failed to query source for information When I tried using the converter I get this error as soon as it reads the ovf file the ovf descriptor file could not be parsed

I couldn't find a solution on the other forms, at least not something that I understood. Any ideas?

Thanks,
M

kovidgoyal
07-31-2009, 02:10 PM
Unfortunately, that VM was contributed by someone else, I've never used it myself. So I can't really help. I'm in the process of switching over to KVM based VMs anyway. Once that's done, I'll see if I can create a new VMware VM for calibre development.

myle00
07-31-2009, 02:39 PM
Thanks, I guess I'll have to stick it out in windows or get to know Linux a little better.

I did have a slightly unrelated question. I know Java and am trying to learn python 3.0 now. As I understand it python is not backward compatible. So I'm wondering, it seems that calibre is written in 2.x, yet if I learn 3.0 will I not be able to apply it to calibre? Additionally, does it mean that calibre has to stick to 2.x else you'd have to rewrite everything? Finally, it seems pretty silly, setuptools for example, is still at 2.5 on windows, PyCrypto is on 2.6, imagine all the copies of python one must have to program in it... Is that how python is?

Thanks,
matt

kovidgoyal
07-31-2009, 02:49 PM
I think of python 3.0 as a new language. python 3.0 is not backward compatible. Still it's similar enough to 2.x that if you learn 3.0 you should be able to program on 2.x (the biggest change, at least for calibre style programming is the switch to making everything unicode).

As for calibre, I don't foresee migrating it to 3.0 for at least a couple of years more.

markbond1007
08-06-2009, 09:46 AM
I just tried running the image in VMware Workstation 6.5.2 on vista and I got this error failed to query source for information When I tried using the converter I get this error as soon as it reads the ovf file the ovf descriptor file could not be parsed

I couldn't find a solution on the other forms, at least not something that I understood. Any ideas?

Thanks,
M

Okay, I managed to convert the image file, rather than upload the new image file I'll post instructions on how to do it.

1) attached to this post should be a zip file contianing the OVF file, replace the one in the directory with the existing ovf and vdmk file with the ovf in the zip file

2) run the ovftool as follows:

ovftool --skipManifestGeneration Calibre-devel-F10-XFCE.ovf Calibre-devel-F10-XFCE.vmx

3) that should be it.

This needs to be run under linux or Windows (I ran under linux) you can then copy across to the Mac. When you open the VM in Fusion it will ask if you want to update it, you can safely say yes to this.

Regards

Mark

myle00
08-08-2009, 08:05 PM
Thanks, I just tried it and it worked. The zip and instructions should probably be added to the development page.
M.

kovidgoyal
08-09-2009, 11:18 AM
It's a Wiki, feel free to add it :)

kovidgoyal
12-30-2009, 12:43 PM
unsticking this thread as calibre now acts as its own virtual development environment.