mirror of
https://github.com/mbusb/multibootusb
synced 2024-11-01 15:40:16 +00:00
Merge pull request #115 from alindt/dev
Use host pyudev library instead of bundled on Linux
This commit is contained in:
commit
fa5bac15fd
@ -65,7 +65,7 @@ class pkg():
|
|||||||
print("Ensure thta you have python-stdeb package installed!")
|
print("Ensure thta you have python-stdeb package installed!")
|
||||||
stdcfg = """[DEFAULT]
|
stdcfg = """[DEFAULT]
|
||||||
Package: multibootusb
|
Package: multibootusb
|
||||||
Depends3: python3-pyqt5, parted, util-linux, mtools, python3-dbus, p7zip-full, python3-six
|
Depends3: python3-pyqt5, parted, util-linux, mtools, python3-dbus, python3-pyudev, p7zip-full, python3-six
|
||||||
Build-Depends: python3-all
|
Build-Depends: python3-all
|
||||||
Section: system
|
Section: system
|
||||||
XS-Python-Version: = 3.5
|
XS-Python-Version: = 3.5
|
||||||
@ -88,9 +88,9 @@ class pkg():
|
|||||||
result = True
|
result = True
|
||||||
elif self.pkg_name == 'rpm' or self.pkg_name == 'suse' or self.pkg_name == 'mageia':
|
elif self.pkg_name == 'rpm' or self.pkg_name == 'suse' or self.pkg_name == 'mageia':
|
||||||
if self.pkg_name == 'suse' or self.pkg_name == 'mageia':
|
if self.pkg_name == 'suse' or self.pkg_name == 'mageia':
|
||||||
require = "python3-qt5, parted, util-linux, mtools, python3-dbus, p7zip, p7zip-plugins, python3-six"
|
require = "python3-qt5, parted, util-linux, mtools, python3-dbus, python3-pyudev, p7zip, p7zip-plugins, python3-six"
|
||||||
else:
|
else:
|
||||||
require = "PyQt5, parted, util-linux, mtools, python3-dbus, p7zip, p7zip-plugins, python3-six"
|
require = "PyQt5, parted, util-linux, mtools, python3-dbus, python3-pyudev, p7zip, p7zip-plugins, python3-six"
|
||||||
setup_cfg = ("[bdist_rpm]\n"
|
setup_cfg = ("[bdist_rpm]\n"
|
||||||
"Group = Applications/System\n"
|
"Group = Applications/System\n"
|
||||||
"Vendor = Sundar <feedback.multibootusb@gmail.com>\n"
|
"Vendor = Sundar <feedback.multibootusb@gmail.com>\n"
|
||||||
|
@ -92,10 +92,9 @@ def list(partition=1, fixed=None):
|
|||||||
"""
|
"""
|
||||||
devices = []
|
devices = []
|
||||||
if platform.system() == "Linux":
|
if platform.system() == "Linux":
|
||||||
from . import pyudev
|
import pyudev
|
||||||
import dbus
|
import dbus
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
# pyudev is good enough to detect USB devices on modern Linux machines.
|
# pyudev is good enough to detect USB devices on modern Linux machines.
|
||||||
gen.log("Using pyudev for detecting USB drives...")
|
gen.log("Using pyudev for detecting USB drives...")
|
||||||
@ -189,7 +188,7 @@ def details_udev(usb_disk_part):
|
|||||||
Get details of USB partition using udev
|
Get details of USB partition using udev
|
||||||
"""
|
"""
|
||||||
if platform.system() == "Linux":
|
if platform.system() == "Linux":
|
||||||
from . import pyudev
|
import pyudev
|
||||||
"""
|
"""
|
||||||
Try with PyUdev to get the details of USB disks.
|
Try with PyUdev to get the details of USB disks.
|
||||||
This is the easiest and reliable method to find USB details.
|
This is the easiest and reliable method to find USB details.
|
||||||
|
Loading…
Reference in New Issue
Block a user