mirror of
https://github.com/openSUSE/osc.git
synced 2025-01-27 15:06:15 +01:00
Use distro module to detect distro on all python versions
Also, add a related Recommends to to the spec file
This commit is contained in:
parent
987db92f3b
commit
6d01df35e6
@ -65,6 +65,9 @@ Requires: %{use_python_pkg}-urllib3
|
|||||||
# needed for showing download progressbars
|
# needed for showing download progressbars
|
||||||
Recommends: %{use_python_pkg}-progressbar
|
Recommends: %{use_python_pkg}-progressbar
|
||||||
|
|
||||||
|
# needed for setting the default editor by distro
|
||||||
|
Recommends: %{use_python_pkg}-distro
|
||||||
|
|
||||||
# needed for storing credentials in kwallet/gnome-keyring
|
# needed for storing credentials in kwallet/gnome-keyring
|
||||||
Recommends: %{use_python_pkg}-keyring
|
Recommends: %{use_python_pkg}-keyring
|
||||||
Recommends: %{use_python_pkg}-keyring-keyutils
|
Recommends: %{use_python_pkg}-keyring-keyutils
|
||||||
|
@ -4203,10 +4203,7 @@ def read_meta_from_spec(specfile, *args):
|
|||||||
def _get_linux_distro():
|
def _get_linux_distro():
|
||||||
if distro is not None:
|
if distro is not None:
|
||||||
return distro.id()
|
return distro.id()
|
||||||
elif sys.version_info >= (3, 8):
|
|
||||||
return None
|
return None
|
||||||
# compatibility for Python 2.6 to 3.7
|
|
||||||
return platform.linux_distribution()[0]
|
|
||||||
|
|
||||||
|
|
||||||
def get_default_editor():
|
def get_default_editor():
|
||||||
|
Loading…
Reference in New Issue
Block a user