mirror of
https://github.com/beetbox/beets.git
synced 2026-02-24 08:12:54 +01:00
Remove packaging dependency
This commit is contained in:
parent
c3817a4c06
commit
506be02597
1 changed files with 6 additions and 2 deletions
|
|
@ -25,7 +25,6 @@ import enum
|
|||
import re
|
||||
import xml.parsers.expat
|
||||
from six.moves import zip
|
||||
from packaging import version
|
||||
|
||||
from beets import ui
|
||||
from beets.plugins import BeetsPlugin
|
||||
|
|
@ -68,6 +67,11 @@ def call(args, **kwargs):
|
|||
raise ReplayGainError(u"argument encoding failed")
|
||||
|
||||
|
||||
def after_version(version_a, version_b):
|
||||
return tuple(int(s) for s in version_a.split('.')) \
|
||||
>= tuple(int(s) for s in version_b.split('.'))
|
||||
|
||||
|
||||
def db_to_lufs(db):
|
||||
"""Convert db to LUFS.
|
||||
|
||||
|
|
@ -263,7 +267,7 @@ class Bs1770gainBackend(Backend):
|
|||
cmd = [self.command]
|
||||
cmd += ["--" + method]
|
||||
cmd += ['--xml', '-p']
|
||||
if version.parse(self.version) >= version.parse('0.6.0'):
|
||||
if after_version(self.version, '0.6.0'):
|
||||
cmd += ['--unit=ebu'] # set units to LU
|
||||
|
||||
# Workaround for Windows: the underlying tool fails on paths
|
||||
|
|
|
|||
Loading…
Reference in a new issue