Giter VIP home page Giter VIP logo

Comments (9)

RazCrimson avatar RazCrimson commented on June 2, 2024 1

Sure, I think that should be possible as long as we don't require the webserver plugin

from glances.

RazCrimson avatar RazCrimson commented on June 2, 2024

@barracuda156

I understand that you would like to avoid using Pydantic. But currently the Webserver dependency (fastapi) would require it.

Could you please list the platform which you use and currently don't have pydantic binaries?

Btw rust being required to build rust is totally normal in the compiler world? Even gcc and clang are Self-hosting compilers.

I don't really understand your security concern. But I get that it's going to be a pain to build when no binaries are available.

from glances.

barracuda156 avatar barracuda156 commented on June 2, 2024

@RazCrimson Thank you for responding! Rust does not build on older macOS (all powerpc, some older x86), I think it does not build for powerpc on OpenBSD as well (perhaps even on FreeBSD for ppc 32-bit). I am pretty sure there are other non-mainstream platforms where Rust does not build.

P. S. Both gcc and clang can be built with other C/C++ compilers, they do not require themselves to build.

from glances.

barracuda156 avatar barracuda156 commented on June 2, 2024

@RazCrimson It will be sufficient to add a configure option to disable Pydantic and whatever needs it. I.e. nothing will change by default, but at the same time we could unbreak the package for Rustless systems.

from glances.

barracuda156 avatar barracuda156 commented on June 2, 2024

@RazCrimson That would be awesome!

from glances.

nicolargo avatar nicolargo commented on June 2, 2024

The default "pip install glances" do not install the Webserver requirements.

Pydantic should be installed only if you use "pip install glances[web]" or "pip install glances[all]".

from glances.

nicolargo avatar nicolargo commented on June 2, 2024

So we have to move pydantic from requirements.txt to requirements-webui.txt ?

from glances.

RazCrimson avatar RazCrimson commented on June 2, 2024

Yea, but I think there was some pydantic import that was failing.

We'll probably have to fix that and check if everything works right.

from glances.

barracuda156 avatar barracuda156 commented on June 2, 2024

I tried to remove pydantic from requirements in the portfile, it installed, but does not run:

36-173% glances
Traceback (most recent call last):
  File "/opt/local/bin/glances", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/glances/__init__.py", line 184, in main
    start(config=core.get_config(), args=core.get_args())
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/glances/__init__.py", line 94, in start
    from glances.standalone import GlancesStandalone as GlancesMode
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/glances/standalone.py", line 20, in <module>
    from glances.outputs.glances_curses import GlancesCursesStandalone
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/glances/outputs/glances_curses.py", line 18, in <module>
    from glances.events_list import glances_events
  File "/opt/local/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/glances/events_list.py", line 14, in <module>
    from pydantic import RootModel
ModuleNotFoundError: No module named 'pydantic'

It looks like MacPorts does not specifically configure it in some way: https://github.com/macports/macports-ports/blob/master/sysutils/glances/Portfile
Requirement for pydantic was added in macports/macports-ports@fddf466

from glances.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.