Quote:
Originally Posted by gabox01
Hello,
Quote from the docs:
"The next step is to set the environment variable CALIBRE_DEVELOP_FROM to the absolute path of the src directory. So, following the example above, it would be /home/kovid/work/calibre/src. How to set environment variables depends on your Linux distribution and what shell you are using."
What's the reason behind this? I don't want to run any pre-made binaries, I'd like to run the whole thing from source, including the GUI. Any way to achieve that?
|
The instructions explicitly state "You have two choices in setting up the development environment. You can install the calibre binary as normal and use that as a runtime environment to do your development."
You've chosen to look at the binary install development method, rather than setting up a Linux source build. If you didn't want to run someone else's premade binaries, then
obviously you need to build them yourself...
But, are you trying to develop the C extension code? If not, what is wrong with using the pre-made binaries together with your modified python code?
Quote:
"That’s it! You are now ready to start hacking on the calibre code. For example, open the file src\calibre\__init__.py in your favorite editor and add the line:
print ("Hello, world!")
near the top of the file. Now run the command calibredb. The very first line of output should be Hello, world!"
I don't understand this.Why should I run calibredb after making changes to the source? Run what command with calibredb?
Sorry if I look dumb, but I would expect source files, libraries, and a main method to run. Nothing else.
Thanks
|
What makes you think you're not running a main() method? That command runs:
Code:
from calibre.db.cli.main import main
sys.exit(main())
Which is definitely a main() method. It just happens to first execute calibre/__init__.py before doing anything else interesting.