Opentrons / buildroot

The Opentrons fork of buildroot for building the OT2 system. Our default branch is opentrons-develop.
http://buildroot.org
Other
10 stars 7 forks source link

package/filetype: actually install python-filetype package #233

Closed vegano1 closed 5 months ago

vegano1 commented 5 months ago

Overview

I added the python-filetype package in this pull request Opentrons/buildroot#232 but forgot to source it in package/Config.in so we never actually built it and installed it on the target. I did not notice this because a day before the pull request went up I manually installed the python-filetype package via pip on the robot and forgot it was there after installing the image :). In any case, this pull request adds the package to the source and installs it properly.

Closes: RQA-2598

Change Log

Test Plan

vegano1 commented 5 months ago

After installing the image on the robot

Pip shows the package is installed to .../site-packages as expected and not .../user-packages

# pip show filetype
Name: filetype
Version: 1.2.0
Summary: Infer file type and MIME type of any file/buffer. No external dependencies.
Home-page: https://github.com/h2non/filetype.py
Author: Tomas Aparicio
Author-email: tomas@aparicio.me
License: MIT
Location: /usr/lib/python3.10/site-packages
Requires:
Required-by:

Python can import and use the package

# python3
Python 3.10.8 (main, Mar  1 2024, 21:40:33) [GCC 7.3.1 20180425 [linaro-7.3-2018.05 revision d29120a424ecfbc167ef90065c0eeb7 on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import filetype
>>> print(filetype)
<module 'filetype' from '/usr/lib/python3.10/site-packages/filetype/__init__.pyc'>

The system-server starts up


# systemctl status opentrons-system-server
opentrons-system-server.service - Opentrons System HTTP Server
     Loaded: loaded (/etc/systemd/system/opentrons-system-server.service; enabled; preset: enabled)
     Active: active (running) since Fri 2024-04-26 19:08:12 UTC; 7min ago
   Main PID: 199 (python)
     CGroup: /system.slice/opentrons-system-server.service
             └─199 python -m system_server

Apr 26 19:08:03 opentrons systemd[1]: Starting Opentrons System HTTP Server...
Apr 26 19:08:12 6fa2c7 opentrons-system-server[199]: Starting system server on 127.0.0.1:32950
Apr 26 19:08:12 6fa2c7 systemd[1]: Started Opentrons System HTTP Server.
Apr 26 19:08:12 6fa2c7 python[199]: INFO:     Started server process [199]
Apr 26 19:08:12 6fa2c7 python[199]: INFO:     Waiting for application startup.
Apr 26 19:08:12 6fa2c7 python[199]: INFO:     Application startup complete.
Apr 26 19:08:12 6fa2c7 python[199]: INFO:     Uvicorn running on http://127.0.0.1:32950 (Press CTRL+C to quit)