rm-hull / luma.examples

Companion repo for running examples against the luma.oled, luma.lcd, luma.led_matrix and luma.emulator display drivers.
MIT License
380 stars 147 forks source link

print library version info #68

Closed thijstriemstra closed 6 years ago

thijstriemstra commented 6 years ago

The example startup print now includes library version nrs, e.g.:

Version: luma.superhdscreenz 1.2.3 (luma.core 4.5.6)
Display: Awesome display
Interface: USB
Dimensions: 120 x 80
------------------------------------------------------------
thijstriemstra commented 6 years ago

PR's blocked by new releases for all libraries (so they expose a __version__ attribute) and https://github.com/rm-hull/luma.core/pull/111

rm-hull commented 6 years ago

Will cut new releases when am near a computer tomorrow (merged other PRs on my phone, just now)

thijstriemstra commented 6 years ago

don't forget to bump the version nrs in setup.py before merging this pr. Travis won't allow it anyway I suppose.

thijstriemstra commented 6 years ago

the luma.led_matrix part of the installation is failing: https://travis-ci.org/rm-hull/luma.examples/jobs/306512882

Looks like it's related to a new version of rpi-ws281x @rm-hull

Collecting ws2812 (from luma.led_matrix>=1.0.6->luma.examples==0.0.0)

  Downloading ws2812-1.0.0.tar.gz (58kB)

    100% |████████████████████████████████| 61kB 6.1MB/s 

Collecting rpi-ws281x (from luma.led_matrix>=1.0.6->luma.examples==0.0.0)

  Downloading rpi_ws281x-3.0.4.tar.gz (58kB)

    100% |████████████████████████████████| 61kB 6.1MB/s 

Update: that library should never attempt to install on Linux (non-ARM) so it looks like setuptools changes broke something?

Collecting setuptools

  Downloading setuptools-38.2.0-py2.py3-none-any.whl (489kB)

    100% |████████████████████████████████| 491kB 2.6MB/s 

Installing collected packages: setuptools

Successfully installed setuptools-38.2.0

Maybe related to this: https://github.com/pypa/setuptools/blob/master/CHANGES.rst#v3800

And this (looks like 38.2.0 is just broken, new version coming soon): https://github.com/pypa/setuptools/issues/1212

Opened https://github.com/pypa/setuptools/issues/1213

rm-hull commented 6 years ago
>       self._pygame.display.init()
E       error: No available video device

Arrrrrggh! FFS!

thijstriemstra commented 6 years ago

uh ohw..

But upside:

Version: luma.emulator 1.0.2 (luma.core 1.2.1)
Display: capture
Dimensions: 128 x 64
------------------------------------------------------------

It should mock that display.init() method or something.. or not use the real capture emulator at all.

Apparently running pygame on linux headless server requires something like:

import os
os.environ["SDL_VIDEODRIVER"] = "dummy"
thijstriemstra commented 6 years ago

wow it worked!

rm-hull commented 6 years ago

🎉 nice one!