mirror of
https://github.com/fergalmoran/picard.git
synced 2026-01-19 15:05:33 +00:00
Merge branch 'master' into picard-1369
This commit is contained in:
16
.travis.yml
16
.travis.yml
@@ -12,21 +12,23 @@ cache:
|
||||
env:
|
||||
global:
|
||||
- PIP_INSTALL="pip3 install"
|
||||
- DISCID="$PIP_INSTALL discid" MUTAGEN="$PIP_INSTALL mutagen>=1.37"
|
||||
- INSTALL_DEPS="$PIP_INSTALL -r requirements.txt"
|
||||
- NOSE="$PIP_INSTALL nose2"
|
||||
- COVERAGE="$PIP_INSTALL nose-cov"
|
||||
- CODACY="$PIP_INSTALL codacy-coverage"
|
||||
- LIBDISCID="libdiscid0 libdiscid0-dev"
|
||||
matrix:
|
||||
- PYQT="$PIP_INSTALL pyqt5==5.10"
|
||||
- PYQT="$PIP_INSTALL pyqt5==5.9"
|
||||
- PYQT="$PIP_INSTALL pyqt5==5.8"
|
||||
- PYQT="$PIP_INSTALL pyqt5==5.8" MUTAGEN="$PIP_INSTALL mutagen==1.37"
|
||||
- INSTALL_DEPS="$PIP_INSTALL pyqt5==5.11.3 mutagen discid"
|
||||
- INSTALL_DEPS="$PIP_INSTALL pyqt5==5.10 mutagen discid"
|
||||
- INSTALL_DEPS="$PIP_INSTALL pyqt5==5.9 mutagen discid"
|
||||
- INSTALL_DEPS="$PIP_INSTALL pyqt5==5.8 mutagen discid"
|
||||
- INSTALL_DEPS="$PIP_INSTALL pyqt5==5.8 mutagen==1.37 discid"
|
||||
matrix:
|
||||
include:
|
||||
- os: osx
|
||||
osx_image: xcode6.4
|
||||
language: generic
|
||||
env: INSTALL_DEPS="$PIP_INSTALL -r requirements-prod.txt"
|
||||
- python: "3.7"
|
||||
dist: xenial
|
||||
sudo: true
|
||||
@@ -40,9 +42,7 @@ before_install:
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then bash scripts/setup-osx.sh; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then export LD_LIBRARY_PATH=`pwd`:$LD_LIBRARY_PATH; fi
|
||||
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then source bin/activate; fi
|
||||
- "$PYQT"
|
||||
- "$MUTAGEN"
|
||||
- "$DISCID"
|
||||
- "$INSTALL_DEPS"
|
||||
- "$NOSE"
|
||||
- if [ ! -z "${CODACY_PROJECT_TOKEN}" ]; then $COVERAGE; fi
|
||||
script: nose2 -v --with-coverage --coverage picard --coverage-report xml
|
||||
|
||||
@@ -42,14 +42,14 @@ build_script:
|
||||
|
||||
copy /Y discid.dll %PYTHON%
|
||||
|
||||
pip install -r requirements.txt
|
||||
pip install -r requirements-build.txt
|
||||
|
||||
pip install -r requirements-prod.txt
|
||||
|
||||
copy /Y %PYTHON_SITE%\PyQt5\Qt\bin\ssleay32.dll .
|
||||
|
||||
copy /Y %PYTHON_SITE%\PyQt5\Qt\bin\libeay32.dll .
|
||||
|
||||
pip install pyinstaller>=3.4
|
||||
|
||||
python setup.py build
|
||||
|
||||
python setup.py build_ext -i
|
||||
|
||||
@@ -33,11 +33,12 @@ _MAX_TAIL_LEN = 10**6
|
||||
VERBOSITY_DEFAULT = logging.WARNING
|
||||
|
||||
|
||||
def debug_mode(enabled):
|
||||
if enabled:
|
||||
main_logger.setLevel(logging.DEBUG)
|
||||
else:
|
||||
main_logger.setLevel(VERBOSITY_DEFAULT)
|
||||
def set_level(level):
|
||||
main_logger.setLevel(level)
|
||||
|
||||
|
||||
def get_effective_level():
|
||||
return main_logger.getEffectiveLevel()
|
||||
|
||||
|
||||
_feat = namedtuple('_feat', ['name', 'prefix', 'fgcolor'])
|
||||
|
||||
@@ -150,11 +150,10 @@ class Tagger(QtWidgets.QApplication):
|
||||
self._no_restore = picard_args.no_restore
|
||||
self._no_plugins = picard_args.no_plugins
|
||||
|
||||
self.debug(
|
||||
picard_args.debug
|
||||
or "PICARD_DEBUG" in os.environ
|
||||
or config.setting['log_verbosity'] == logging.DEBUG
|
||||
)
|
||||
self.set_log_level(config.setting['log_verbosity'])
|
||||
|
||||
if picard_args.debug or "PICARD_DEBUG" in os.environ:
|
||||
self.set_log_level(logging.DEBUG)
|
||||
|
||||
# FIXME: Figure out what's wrong with QThreadPool.globalInstance().
|
||||
# It's a valid reference, but its start() method doesn't work.
|
||||
@@ -261,14 +260,9 @@ class Tagger(QtWidgets.QApplication):
|
||||
for f in self.exit_cleanup:
|
||||
f()
|
||||
|
||||
def debug(self, debug):
|
||||
self._debug = debug
|
||||
if debug:
|
||||
log.debug_mode(True)
|
||||
log.debug("Debug mode on")
|
||||
else:
|
||||
log.info("Debug mode off")
|
||||
log.debug_mode(False)
|
||||
def set_log_level(self, level):
|
||||
self._debug = level == logging.DEBUG
|
||||
log.set_level(level)
|
||||
|
||||
def move_files_to_album(self, files, albumid=None, album=None):
|
||||
"""Move `files` to tracks on album `albumid`."""
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
|
||||
|
||||
from functools import partial
|
||||
import logging
|
||||
import os
|
||||
|
||||
from PyQt5 import (
|
||||
@@ -138,7 +137,7 @@ class LogView(LogViewCommon):
|
||||
|
||||
def __init__(self, parent=None):
|
||||
super().__init__(log.main_tail, _("Log"), parent=parent)
|
||||
self.verbosity = config.setting['log_verbosity']
|
||||
self.verbosity = log.get_effective_level()
|
||||
|
||||
self._setup_formats()
|
||||
self.hl_text = ''
|
||||
@@ -147,9 +146,6 @@ class LogView(LogViewCommon):
|
||||
self.hbox = QtWidgets.QHBoxLayout()
|
||||
self.vbox.addLayout(self.hbox)
|
||||
|
||||
# Verbosity
|
||||
if QtCore.QObject.tagger._debug:
|
||||
self.verbosity = logging.DEBUG
|
||||
self.verbosity_menu_button = QtWidgets.QPushButton(_("Verbosity"))
|
||||
self.hbox.addWidget(self.verbosity_menu_button)
|
||||
|
||||
@@ -287,7 +283,7 @@ class LogView(LogViewCommon):
|
||||
def _verbosity_changed(self, level):
|
||||
if level != self.verbosity:
|
||||
config.setting['log_verbosity'] = level
|
||||
QtCore.QObject.tagger.debug(level == logging.DEBUG)
|
||||
QtCore.QObject.tagger.set_log_level(level)
|
||||
self.verbosity = level
|
||||
self.display(clear=True)
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
from collections import OrderedDict
|
||||
from platform import python_version
|
||||
|
||||
from mutagen import version_string as mutagen_version
|
||||
|
||||
@@ -34,6 +35,7 @@ from picard.util.astrcmp import astrcmp_implementation
|
||||
|
||||
_versions = OrderedDict([
|
||||
("version", PICARD_FANCY_VERSION_STR),
|
||||
("python-version", python_version()),
|
||||
("pyqt-version", pyqt_version),
|
||||
("qt-version", QT_VERSION_STR),
|
||||
("mutagen-version", mutagen_version),
|
||||
@@ -44,6 +46,7 @@ _versions = OrderedDict([
|
||||
|
||||
_names = {
|
||||
"version": "Picard",
|
||||
"python-version": "Python",
|
||||
"pyqt-version": "PyQt",
|
||||
"qt-version": "Qt",
|
||||
"mutagen-version": "Mutagen",
|
||||
|
||||
1
requirements-build.txt
Normal file
1
requirements-build.txt
Normal file
@@ -0,0 +1 @@
|
||||
PyInstaller==3.4
|
||||
3
requirements-prod.txt
Normal file
3
requirements-prod.txt
Normal file
@@ -0,0 +1,3 @@
|
||||
discid==1.1.1
|
||||
mutagen==1.41.1
|
||||
PyQt5==5.11.3
|
||||
@@ -9,7 +9,7 @@ rm -rf dist build locale
|
||||
python3 setup.py clean
|
||||
python3 setup.py build_ext
|
||||
python3 setup.py build_locales
|
||||
pip3 install pyinstaller
|
||||
pip3 install -r requirements-build.txt
|
||||
pyinstaller picard.spec
|
||||
|
||||
codesign=0
|
||||
|
||||
Reference in New Issue
Block a user