Initial Debian/Ubuntu package of Booktype 1.6.0

68 views
Skip to first unread message

Daniel James

unread,
Apr 22, 2013, 7:56:08 AM4/22/13
to bookty...@googlegroups.com
Hi all,

Here is my initial attempt at a Debian/Ubuntu package of Booktype 1.6.0,
using the gen-snapshot.sh script in the git repository to create an
unsigned, non-official test package:

http://apt.sourcefabric.org/misc/booktype_1.6.0~20130422_all.deb

checksums:

http://apt.sourcefabric.org/misc/booktype_1.6.0~20130422_amd64.changes

It requires Debian wheezy or Ubuntu Precise (or later) due to the
dependency on the python-unidecode package. Works for me on Precise as
far as running createbooki to create the instance, that's as far as I've
got this morning.

One oddity is that the Debian packaging scripts insist on installing the
createbooki script to /usr/bin/ but importing booki does not work from
there (see attached screenshot).

It does run from the install directory of /usr/share/booktype/scripts/
so is this script hard-coded to assume a relative path to the lib/booki
files?

Cheers!

Daniel
Screenshot-precise-server-test.png

Daniel James

unread,
Apr 23, 2013, 5:04:43 AM4/23/13
to Mikayel Karapetyan, all.fab, bookty...@googlegroups.com
Hi Mikayel,

> i.e. do we have a wiki page on how to launch Booktype after it has been
> installed from Debian package?

Not yet, for now the procedure is the same as when installing from git:

http://sourcefabric.booktype.pro/booktype-16-for-authors-and-publishers/installation-on-gnulinux/

except that you cd to /usr/share/booktype/ instead of /usr/local/src/
before running the createbooki script.

The script also exists in /usr/bin/createbooki but does not function
from that path yet. When we have that working we can make a proper
public release with install documentation.

Cheers!

Daniel

Aco Erkalovic

unread,
Apr 24, 2013, 11:10:15 AM4/24/13
to bookty...@googlegroups.com
Greetings Daniel James!

On Mon, Apr 22, 2013 at 1:56 PM, Daniel James
<daniel...@sourcefabric.org> wrote:
> It does run from the install directory of /usr/share/booktype/scripts/
> so is this script hard-coded to assume a relative path to the lib/booki
> files?

Witty comments in source code are the only hard-coded thing. It looks
in the python path. I did put a part where it checks if the source is
result of git checkout to add extra directory to the path. One of the
Finnish guys deleted this extra check and let directory be inserted
all the time. It should not create problems for this and it does work
for me when i start it from some other directory. Anyhoo, will install
"Debian wheezy or Ubuntu Precise " inside of my virtual machine to
check what is going on.

Aco

--
Aleksandar Erkalović
Booktype Developer
aleksandar...@sourcefabric.org

www.sourcefabric.org

mobile: +385-(0)91-6425220
twitter: @aerkalov | skype: aerkalov

Daniel James

unread,
Apr 24, 2013, 11:59:43 AM4/24/13
to bookty...@googlegroups.com, Aco Erkalovic
Hi Aco,

> It looks
> in the python path.

On this Precise system, echo $PYTHONPATH returns nothing (I think that's
the default).

I see the first line of createbooki is:

#!/usr/bin/env python

In my path I have /usr/bin/python like so:

echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/games

ls -l /usr/bin/python
lrwxrwxrwx 1 root root 9 Apr 17 2012 /usr/bin/python -> python2.7

So is the issue that the booki code is not being installed where the
Debian/Ubuntu default version of Python can find it? It finds django OK,
but django has been installed from the Debian/Ubuntu package.

> will install
> "Debian wheezy or Ubuntu Precise " inside of my virtual machine to
> check what is going on.

Thanks, that would be very helpful.

Cheers!

Daniel

Aco Erkalovic

unread,
Apr 24, 2013, 12:56:46 PM4/24/13
to Daniel James, bookty...@googlegroups.com
On Wed, Apr 24, 2013 at 5:59 PM, Daniel James
<daniel...@sourcefabric.org> wrote:
> So is the issue that the booki code is not being installed where the
> Debian/Ubuntu default version of Python can find it? It finds django OK,
> but django has been installed from the Debian/Ubuntu package.

Exactly. It installed it in /usr/share/pyshared/ directory which is
not in the python path. I don't know the process for creating debian
packages for python libraries, but I have a feeling you might be
missing some post hook which links is to
/usr/lib/python2.7/dist-packages/ directory.
Reply all
Reply to author
Forward
0 new messages