Skip to content
This repository has been archived by the owner on Nov 10, 2024. It is now read-only.

Consider adding psutil as an optional dependency. [FEATURE] #251

Open
martincpt opened this issue Dec 12, 2023 · 4 comments
Open

Consider adding psutil as an optional dependency. [FEATURE] #251

martincpt opened this issue Dec 12, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@martincpt
Copy link

Is your feature request related to a problem? Please describe.
I have concerns about having psutil as a default dependency. As far as I know, this package requires GCC, leading to the necessity of using a heavier Docker image. Additionally, it introduces another package to carry along that may not be in use at all.

Describe the solution you'd like
Psutil could be added to the extras, for example fastapi-restful[timing].

Describe alternatives you've considered
The original repository did not use psutil as a dependency. Was that solution outdated?

@martincpt martincpt added the enhancement New feature or request label Dec 12, 2023
@martincpt martincpt changed the title Add psutil as optional dependency [FEATURE] Consider adding psutil as an optional dependency. [FEATURE] Dec 12, 2023
@yuval9313
Copy link
Owner

Yeah sure that sounds great, however I'm not sure how I wish to handle it with my "breaking updates" policy so it would take some time to implement

You're welcome to submit PR

@osmanaygun
Copy link

I just installed this package and ran into an issue with psutils, then found out that this was mentioned here. I am using python image python:3.11.7-slim-bullseye and when I try to build my app from dockerfile I get the error:

Failed building wheel for psutil
Could not build wheels for psutil, which is required to install pyproject.toml-based projects.

What was your solution @martincpt ?

@martincpt
Copy link
Author

@osmanaygun haven't had time to figure this out yet. I suppose there is a python image comes with pre-build gcc. Maybe try alpine or (non-slim) bullseye, see if that works.

Also, you didn't mention on what platform you trying to build, but there can be other issues if you are under mac like me.

@osmanaygun
Copy link

osmanaygun commented Jan 5, 2024

Thanks for the reply, adding the following lline on my Dockerfile solved it :

RUN apt-get update -y && apt-get install -y gcc

I am on macos m2 chip

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants