mirror of
https://pagure.io/fm-orchestrator.git
synced 2026-04-05 03:38:12 +08:00
Use distro.linux_distribution instead
platform.linux_distribution is removed since Python 3.8. Signed-off-by: Chenxiong Qi <cqi@redhat.com>
This commit is contained in:
@@ -42,6 +42,7 @@ RUN yum -y install \
|
||||
python-solv \
|
||||
python-sqlalchemy \
|
||||
python-tox \
|
||||
python2-distro \
|
||||
python2-libmodulemd2 \
|
||||
python2-pyyaml \
|
||||
python2-pungi \
|
||||
|
||||
@@ -9,6 +9,7 @@ RUN dnf -y install \
|
||||
git-core \
|
||||
createrepo_c \
|
||||
rsync \
|
||||
python3-distro \
|
||||
python3-fedmsg \
|
||||
python3-kobo-rpmlib \
|
||||
python3-rpm \
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
# SPDX-License-Identifier: MIT
|
||||
import calendar
|
||||
import distro
|
||||
import hashlib
|
||||
import logging
|
||||
import json
|
||||
@@ -293,12 +294,12 @@ class KojiContentGenerator(object):
|
||||
|
||||
def _get_buildroot(self):
|
||||
version = pkg_resources.get_distribution("module-build-service").version
|
||||
distro = platform.linux_distribution()
|
||||
distro_info = distro.linux_distribution()
|
||||
ret = {
|
||||
u"id": 1,
|
||||
u"host": {
|
||||
u"arch": text_type(platform.machine()),
|
||||
u"os": u"%s %s" % (distro[0], distro[1]),
|
||||
u"os": u"%s %s" % (distro_info[0], distro_info[1]),
|
||||
},
|
||||
u"content_generator": {
|
||||
u"name": u"module-build-service",
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
distro
|
||||
dogpile.cache
|
||||
enum34
|
||||
fedmsg
|
||||
Flask
|
||||
Flask-Migrate
|
||||
Flask-SQLAlchemy
|
||||
Flask-Script
|
||||
dogpile.cache
|
||||
fedmsg
|
||||
Flask-SQLAlchemy
|
||||
funcsigs # Python2 only
|
||||
futures # Python 2 only
|
||||
kobo>=0.5.0
|
||||
@@ -13,8 +14,8 @@ ldap3
|
||||
moksha.hub
|
||||
munch
|
||||
prometheus_client
|
||||
pyOpenSSL
|
||||
pygobject
|
||||
pyOpenSSL
|
||||
requests
|
||||
six
|
||||
sqlalchemy
|
||||
|
||||
@@ -77,7 +77,7 @@ class TestBuild:
|
||||
@patch("subprocess.Popen")
|
||||
@patch("module_build_service.builder.KojiContentGenerator.Modulemd")
|
||||
@patch("pkg_resources.get_distribution")
|
||||
@patch("platform.linux_distribution")
|
||||
@patch("distro.linux_distribution")
|
||||
@patch("platform.machine")
|
||||
@patch(
|
||||
"module_build_service.builder.KojiContentGenerator.KojiContentGenerator._koji_rpms_in_tag"
|
||||
@@ -142,7 +142,7 @@ class TestBuild:
|
||||
@patch("subprocess.Popen")
|
||||
@patch("module_build_service.builder.KojiContentGenerator.Modulemd")
|
||||
@patch("pkg_resources.get_distribution")
|
||||
@patch("platform.linux_distribution")
|
||||
@patch("distro.linux_distribution")
|
||||
@patch("platform.machine")
|
||||
@patch(
|
||||
"module_build_service.builder.KojiContentGenerator.KojiContentGenerator._koji_rpms_in_tag"
|
||||
|
||||
Reference in New Issue
Block a user