Giter Site home page Giter Site logo

Add an alternative plugin discovery mechanism in a form of an env variable, listing entry points in `pkg_resources` format. about kaitaistructcompile.py HOT 9 OPEN

kaitaistructcompile avatar kaitaistructcompile commented on June 10, 2024
Add an alternative plugin discovery mechanism in a form of an env variable, listing entry points in `pkg_resources` format.

from kaitaistructcompile.py.

Comments (9)

abitrolly avatar abitrolly commented on June 10, 2024 1

Are de-facto standard.

IMHO is missing.

from kaitaistructcompile.py.

KOLANICH avatar KOLANICH commented on June 10, 2024

Hi.

You likely look for https://github.com/kaitaiStructCompile/kaitaiStructCompile.importer

I have splitted the stuff into multiple packages, for proper working you need most of them. Unfortunately the stuff has some problems with installation, since it tries to share the same dir in order not to junk site-packages, but pip has some problems with that. Try to install everything manually. Under manually I mean that you first build wheels, then istall them. Editable install won't work for this - yet another bug in pip.

BTW: do you know any good replacement for GitLab with Docker-based CI (the CI should load my images, and should not load own images first, like GitHub does, since loading each image takes long) and without shit like mandatory JS, reCAPTCHA and CloudFlare (sr.ht is not considered suitable because of ddvault's unpredictable behavior ).

from kaitaistructcompile.py.

abitrolly avatar abitrolly commented on June 10, 2024

I suspect these are bugs of setuptools and not pip. I never liked its entrypoints mechanism for the plugin system exactly for the reason described - that it doesn't allow to just drop the plugin in some dir and requires the dance with wheels, virtualenvs and pip install.

For fast CI I would just buy a VPS, or setup LXD build job on your own hardware.

from kaitaistructcompile.py.

KOLANICH avatar KOLANICH commented on June 10, 2024

I suspect these are bugs of setuptools and not pip.

No, the wheels look fine. I have encountered problems some times when I installed all the wheels in single pip invocation (including the cases when pip auto-fetches the stuff and auto-builds it). But when each wheel is installed separately and all the wheels are installed into the same location (i.e. sudo pip install), it usually works fine.

I never liked its entrypoints mechanism for the plugin system exactly for the reason described - that it doesn't allow to just drop the plugin in some dir

Probably I should add an alternative plugin discovery mechanism in a form of an env variable, listing entry points in pkg_resources format. That can allow prototyping a backend without installing it.

and requires the dance with wheels, virtualenvs and pip install.

virtualenvs is just a cargo cult. If you need the stuff on CI and the installation is run every time the CI runs, just feel free to install it in main system, not venv, the CI container will be cleaned after pipeline execution anyway :) If you use a Docker-based CI, feel free to install into the image on the stage of building of 6he image. If you want kaitaiStructCompile .py in your main system, again feel free to just install it. I see no reason not to just install it into main system.

from kaitaistructcompile.py.

abitrolly avatar abitrolly commented on June 10, 2024

My point is.

...
Simple is better than complex.
Complex is better than complicated.
...

The plugin system based on wheel + setuptools + pip install + pkg_resources + CI/venv is complicated. Especially compared to simple file download as with compiler itself.

from kaitaistructcompile.py.

KOLANICH avatar KOLANICH commented on June 10, 2024

As you wish. IMHO it is venvs that are ugly, complex, complicated and unneeded.

wheel + setuptools + pip install + pkg_resources

Are de-facto standard.

from kaitaistructcompile.py.

KOLANICH avatar KOLANICH commented on June 10, 2024

It is not "IMHO". They ARE de-facto standard.

from kaitaistructcompile.py.

abitrolly avatar abitrolly commented on June 10, 2024

It if was the standard, there would be at least draft PEP. Otherwise it is a just a bunch of crude hacks stacked on top of each other.

from kaitaistructcompile.py.

KOLANICH avatar KOLANICH commented on June 10, 2024
  1. de-facto standard doesn't require any blessed docukents. What determines de-facto standard is de-facto adoption.
  2. Actually there are some peps, which are not drafts.

https://www.python.org/dev/peps/pep-0632/
https://packaging.python.org/specifications/entry-points/
https://www.python.org/dev/peps/pep-0427/
https://www.python.org/dev/peps/pep-0365/

from kaitaistructcompile.py.

Related Issues (9)

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.