Raspberry Pi and package for graphical LCDs – GfxLCD

It took some time but finally, we can exclude GfxLCD package from The Doton project. After this, we may focus on the next stage of Doton project.

But back to now:) We need to create a new package and publish it on the PyPi.
Installation:

pip install gfxlcd

GfxLCD on PyPi
Old code, before module extraction, is under tag before-split. This way old posts still have some sense:)

Planning

Task sound simple but we gonna complicate it a little bit. We will create the new package and copy required files there and after that, we will use our old friend Jenkins to make the code better.
Don’t worry I won’t describe all boring parts like creating, copying and so.
Of course, if I hit something strange you will know about it:)

Installing lib locally

There is a nice command to install package from the local environment via pip. This way we will check our new package in Doton project.

The command to do so is(in a project root, in my case the gfxlcd):

sudo pip3 install -e .

And the first problem:) I already had this in other RPi but I forgot what I have done to fix it 😀

(..)
ImportError: cannot import name 'IncompleteRead'

Seems we need to upgrade our old pip. But how?

sudo easy_install3 pip

And case solved.

Jenkins

We have our little docker with Jenkins and we will add this project to it.
I’m almost sure that I need to change short variable names and that Jenkins will complain about the way I used the relationship. When else? We will see.

Ah! I have some bad relationships with VM/containers and Jenkins… My current volume for a container is damaged and I lost data:) Setup from the beginning…
And so it began… it took some time but the code is readable 😛 just see the image:

Summary

This is a strange post, big in the amount of work but small in words.
From now, we can install this lib from PyPi repository via:

pip3 install gfxlcd

We made it, GfxLCD is born 🙂

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s