Closed jruzicka-nic closed 4 years ago
@lilydjwg you seem to be the benevolent ruler of this project - please let me what you think.
If this goes well, I'd love to contribute more to nvchecker
over time as I always need such tool in my packaging adventures and your implementation is quite nice π
A rewrite is ongoing to address several issues e.g. #132. Alongside those changes, I'm planning to use Python's native namespace packages for plugins.
Please wait for a few days for a test version of 2.0 to come out. This will be a breaking-changes version and target Python 3.7+.
Awesome, I'm looking forward to test that hot new stuff α( α )α
The new version (at branch nvchecker2
) works now but only a small number of source modules are ported: https://github.com/lilydjwg/nvchecker/tree/nvchecker2/nvchecker_source. Two types of modules are supported, a simpler one for single-function cases and a class-based one for stuff like batch processing (see aur.py).
Documentation hasn't been updated yet.
I briefly looked at nvchecker2
- it looks nice, I see you're not afraid to use latest python features :) But there are no docs or examples of howto use custom source yet (it's mentioned as TODO item in NEW
file π) so I'm gonna wait for that before testing further.
Happy Hacking!
The documentation is done!
After inspecting
nvchecker
source code I found no way to include custom version handlers without core code modification as they seem to be hardcoded intohandlers_precedence
list and loading is always done fromnvchecker.source
package.Instead of forking/rewriting/reinventing the wheel, I'd prefer to extend
nvchecker
with a simple plugin system:~/.nvchecker/sources
?) OR custom directory specified with new CLI argument (--extra-sources my_nv_sources_dir
)nvchecker.source
That way, users can:
nvchecker
and its nice version handlers alongside custom handlers to get versions from all possible sources including those that aren't generic enough to have an upstream handlernvchecker
and optionally submit them easily for upstream inclusionI'm willing and able to implement this if upstream is interested - please do let me know and I'll start hacking. Otherwise I'll be forced to create a competing project :)