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

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

Merged

Conversation

vegano1
Copy link
Contributor

@vegano1 vegano1 commented Apr 26, 2024

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

  • Add python-filetype to package/Config.in
  • Set the correct license type

Test Plan

  • Make sure we can import filetype and the system server runs on the build

Copy link
Member

@sfoster1 sfoster1 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whoops!

@vegano1
Copy link
Contributor Author

vegano1 commented Apr 26, 2024

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: [email protected]
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)

@vegano1 vegano1 merged commit d720245 into opentrons-develop Apr 26, 2024
2 of 3 checks passed
@vegano1 vegano1 deleted the RQA-2598-actually-install-python-filetype branch April 26, 2024 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants