sixfab / sixfab-power-python-api

Python API for Sixfab Power Management and UPS HAT v2
http://power.sixfab.com
9 stars 10 forks source link

v2 breaking v1 installs? #30

Closed mrpher closed 3 years ago

mrpher commented 3 years ago

I'm trying to re-install a v1 project (on a v1 hat) using sixfab-power-python-api but it fails when in the past it worked perfectly. Isn't the sixfab_power_python_api-0.2.2-py3-none-any.whl part of the new v2 release? Not sure where to turn to fix.

[Build]   [powermanager] Collecting sixfab-power-python-api
[Build]   [powermanager]   Downloading sixfab_power_python_api-0.2.2-py3-none-any.whl (13 kB)
[Build]   [powermanager] Collecting daiquiri
[Build]   [powermanager]   Downloading daiquiri-3.0.1-py3-none-any.whl (18 kB)
[Build]   [powermanager] Collecting crc16==0.1.1
[Build]   [powermanager]   Downloading crc16-0.1.1.zip (20 kB)
[Build]   [powermanager] Collecting smbus2==0.3.0
[Build]   [powermanager]   Downloading smbus2-0.3.0.tar.gz (10 kB)
[Build]   [powermanager] Collecting vcgencmd==0.1.1
[Build]   [powermanager]   Downloading vcgencmd-0.1.1-py3-none-any.whl (7.2 kB)
[Build]   [powermanager] Collecting python-json-logger
[Build]   [powermanager]   Downloading python_json_logger-2.0.2-py3-none-any.whl (7.4 kB)
[Build]   [powermanager] Using legacy 'setup.py install' for crc16, since package 'wheel' is not installed.
[Build]   [powermanager] Using legacy 'setup.py install' for smbus2, since package 'wheel' is not installed.
[Build]   [powermanager] Installing collected packages: vcgencmd, smbus2, python-json-logger, crc16, sixfab-power-python-api, daiquiri
[Build]   [powermanager]     Running setup.py install for smbus2: started
[Build]   [powermanager]     Running setup.py install for smbus2: finished with status 'done'
[Build]   [powermanager]     Running setup.py install for crc16: started
[Build]   [powermanager]     Running setup.py install for crc16: finished with status 'error'
[Build]   [powermanager]     ERROR: Command errored out with exit status 1:
[Build]        command: /usr/local/bin/python3.9 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-3r1bwn0d/crc16_f740fd737d994239a7326312a6414874/setup.py'"'"'; __file__='"'"'/tmp/pip-install-3r1bwn0d/crc16_f740fd737d994239a7326312a6414874/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-nmbs4e2g/install-record.txt --single-version-externally-managed --compile --install-headers /usr/local/include/python3.9/crc16
[Build]            cwd: /tmp/pip-install-3r1bwn0d/crc16_f740fd737d994239a7326312a6414874/

Setup: requirements.txt

sixfab-power-python-api
daiquiri

Dockerfile.template

FROM balenalib/%%BALENA_MACHINE_NAME%%-python:latest

WORKDIR /usr/src/app

COPY . .

RUN pip install -r requirements.txt

ENV UDEV=1

CMD ["/bin/sh","./start.sh"]

main.py

from power_api import SixfabPower
# from datadog import initialize, statsd
import daiquiri
import time
import logging
import sys
import datetime

## SETUP SIXFAB
sixfab = SixfabPower()
mrpher commented 3 years ago

Sorry, was an issue with my base image.