Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Freeze all python dependencies in requirements.txt #1320

Closed
rdmark opened this issue Nov 9, 2023 · 5 comments
Closed

Freeze all python dependencies in requirements.txt #1320

rdmark opened this issue Nov 9, 2023 · 5 comments
Assignees
Labels
python Pull requests that update Python code

Comments

@rdmark
Copy link
Member

rdmark commented Nov 9, 2023

With the debacle with Flask dependencies, we've learned the hard way that implicit python library dependencies aren't reliable. I propose that we pip freeze the complete dependency map in requirements.txt for each Python client (presently 22 libraries for the Web UI, for instance.)

@rdmark
Copy link
Member Author

rdmark commented Nov 9, 2023

On Ubuntu aarch64 this is what I get. They seem accurate and complete.

Web UI

$ python3 -m pip freeze -l
Babel==2.13.1
bjoern==3.2.2
blinker==1.6.3
charset-normalizer==2.1.1
click==8.1.7
Flask==3.0.0
flask-babel==4.0.0
itsdangerous==2.1.2
Jinja2==3.1.2
MarkupSafe==2.1.3
protobuf==3.20.2
pytz==2023.3.post1
requests==2.31.0
simplepam==0.1.5
ua-parser==0.16.1
vcgencmd==0.1.1
Werkzeug==3.0.1

OLED

dmark@macuntu:~/piscsi/python/oled$ pip freeze -l
Adafruit-Blinka==8.24.0
adafruit-circuitpython-busdevice==5.2.6
adafruit-circuitpython-framebuf==1.6.4
adafruit-circuitpython-requests==2.0.2
adafruit-circuitpython-ssd1306==2.12.11
adafruit-circuitpython-typing==1.9.5
Adafruit-PlatformDetect==3.53.0
Adafruit-PureIO==1.1.11
Pillow==10.0.1
protobuf==3.20.2
pyftdi==0.55.0
pyserial==3.5
pyusb==1.2.1
typing_extensions==4.8.0
Unidecode==1.3.6

... the Control Board dependencies I cannot extract on this system. pip chokes when trying to build RPi.GPIO C glue code (missing sys/epoll.h etc.). It has to be done on an RPi I think.

@rdmark
Copy link
Member Author

rdmark commented Nov 9, 2023

This takes care of Web UI and OLED requirements.txt #1322

@rdmark
Copy link
Member Author

rdmark commented Nov 9, 2023

Done for Web UI, OLED, and common. Control Board is less critical and can be followed up post release. I'll keep this ticket open for now.

@rdmark rdmark self-assigned this Nov 9, 2023
@uweseimet uweseimet added the python Pull requests that update Python code label Nov 15, 2023
@rdmark
Copy link
Member Author

rdmark commented Dec 11, 2023

I was tinkering with the control board dependencies and noticed that the RPi.GPIO library no longer is available from the pypi repository via pip on RPi OS. A quick googling suggests that it is distributed as an apt package on RPi OS these days (and allegedly installed by default) — the package named: python3-rpi.gpio

I think it should be safe to remove RPi.GPIO from requirements.txt

@rdmark
Copy link
Member Author

rdmark commented Dec 14, 2023

This should do it for the control board dependencies. #1398

@rdmark rdmark closed this as completed Dec 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
python Pull requests that update Python code
Projects
None yet
Development

No branches or pull requests

2 participants