12-14-2010, 03:07 AM | #1 |
Member
Posts: 19
Karma: 10
Join Date: Dec 2010
Location: CA
Device: nook
|
Problem with creating the development environment
Hi,
I am very new to Calibre having just acquired a nook. But I would like to play around with some of the code so I tried to a development install. Here were my steps: 1. I untared the file calibre-0.7.33.tar.gz in my home directory. 2. Changed directory to ~/calibre and read INSTALL. 3. Successfully executed sudo python setup.py develop 4. Set the environmental variables PWD=/home/rozen/calibre CALIBRE_DEVELOP_FROM=/home/rozen/calibre/src 5. Put a print statement in src/calibre/__init__.py and in /src/calibre/main.py 6. Executed calibre-debug -g 7. Got the following output rozen@atlas: ~/calibre > calibre-debug -g Hello from ~/calibre/__init.py__. main: args = ['calibre'] Starting up... Failed to load high performance sqlite C extension 'Connection' object has no attribute 'enable_load_extension' Started up in 0.774530887604 This was fine because I was hoping for that output of the two print statements as above. Unfortunately, the GUI appeared but the window was black. If I i clicked about in the middle of the black window I got dialog windows that looked right for various functions in the window. For instance I clicked in the library part of the window and was able to open the viewer for one of my converted news feeds. I am running Ubuntu 10.10 and Python 2.6.6. I have successfully done and used a straight install from source. I worry that my sequence above is erroneous or that I may have something left over from my prior installation. I don't see my error. I would certainly appreciate any suggestions for increasing the visibility of the GUI. Thanks in Advance, Don |
12-14-2010, 07:42 AM | #2 |
Sigil & calibre developer
Posts: 2,488
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
|
I would advise against developing directly from source. While it is possible you will need to have every dependency (there are a lot) installed.
My recommendation is to install calibre using the binary installer. Then use the CALIBRE_DEVELOP_FROM variable to point to a local copy of the calibre source tree. The basic steps would be: 1) Install binary (the one from calibre-ebook.com not the one in Ubuntu's repository). 2) Check out the source. Put it some place like ~/code/calibre. You would use bzr branch lp:calibre 3) Set your environment variable. It's a good idea to put it in your .bashrc or .bash_profile file so it is set every time you open a terminal. export CALIBRE_DEVELOP_FROM=/home/you/code/calibre 4) run calibre. |
Advert | |
|
12-14-2010, 10:48 AM | #3 |
creator of calibre
Posts: 43,778
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
As user_none said, detailed instructions are here:
http://calibre-ebook.com/user_manual/develop.html |
05-29-2011, 02:55 PM | #4 |
Member
Posts: 19
Karma: 10
Join Date: Dec 2010
Location: CA
Device: nook
|
I really feel that I am overlooking something that should be obvious but I don't see the output from any print statements.
I downloaded the source into /home/rozen/cal/calibre. The environmental variable is set: CALIBRE_DEVELOP_FROM=/home/rozen/cal/calibre I added print "Hello, Don" to /home/rozen/cal/calibre/src/calibre/__init__.py When I run "calibredb" or "calibre-debug -g", I do not see the print output. I also added the statement to __init__.py x = 1 / 0 and when I run calibre-debug -g I do not get an error message. I am sorry to bring up the same question a second time but I am flummoxed and need help with something that I should be seeing for myself. I am running Ubuntu 10.10 and calibre 0.8.2, my device is a nook. I am interested in writing a simple plugin as an introductory exercise and want to see some exploratory output from calibre itself. I am able to get print output from my plugin code. Thanks in Advance, |
05-29-2011, 02:58 PM | #5 |
creator of calibre
Posts: 43,778
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
CALIBRE_DEVELOP_FROM=/home/rozen/cal/calibre/src
|
Advert | |
|
05-29-2011, 02:59 PM | #6 |
Sigil & calibre developer
Posts: 2,488
Karma: 1063785
Join Date: Jan 2009
Location: Florida, USA
Device: Nook STR
|
|
05-29-2011, 11:38 PM | #7 |
Member
Posts: 19
Karma: 10
Join Date: Dec 2010
Location: CA
Device: nook
|
I really apologize for taking up your time on a Sunday of a Holiday weekend as a result of my inability to read carefully.
I am now up and going. Thank You So Much, Don |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
calibre VMWare development environment | kovidgoyal | Calibre | 30 | 12-30-2009 12:43 PM |
Stanza Link problem and solution (creating own epub files) | gescom | Apple Devices | 2 | 05-23-2009 04:53 PM |
Setting up Mac Calibre development environment? | pdurrant | Calibre | 2 | 01-06-2009 07:10 AM |
setup development environment | JeffElkins | Calibre | 21 | 10-22-2008 03:25 PM |
Setting up development environment | tompe | OpenInkpot | 9 | 08-27-2008 02:26 PM |