File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed
Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change 44if command -v lsb_release > /dev/null 2>&1 ; then
55 case " $( lsb_release --id --short) " in
66 Ubuntu|Debian)
7- for package in python-virtualenv python -dev libxml2-dev libxslt1-dev python -libvirt genisoimage; do
7+ for package in python3-venv python3 -dev libxml2-dev libxslt1-dev python3 -libvirt genisoimage pkg-config libvirt-dev gcc ; do
88 if [ " $( dpkg --status -- $package 2> /dev/null| sed -n ' s/^Status: //p' ) " != " install ok installed" ]; then
99 # add a space after old values
1010 missing=" ${missing: +$missing } $package "
Original file line number Diff line number Diff line change 11import argparse
22import logging
3- import pkg_resources
43import sys
54
5+ from importlib import metadata as meta
6+
67from . import exc
78
89
@@ -32,7 +33,15 @@ def parse_args():
3233 metavar = 'COMMAND' ,
3334 help = 'description' ,
3435 )
35- for ep in pkg_resources .iter_entry_points ('downburst.cli' ):
36+ m = meta .entry_points ()
37+ if type (m ) is meta .EntryPoints :
38+ # python >=3.12 entry_points() returns metadata.EntryPoints
39+ eps = (ep for ep in m if ep .group == 'downburst.cli' )
40+ else :
41+ # python <=3.11 entry_points() returns metadata.SelectableGroups
42+
43+ eps = (ep for ep in m .get ('downburst.cli' ,[]))
44+ for ep in eps :
3645 fn = ep .load ()
3746 p = sub .add_parser (ep .name , help = fn .__doc__ )
3847 # ugly kludge but i really want to have a nice way to access
You can’t perform that action at this time.
0 commit comments