Skip to content

Commit

Permalink
Merge pull request #1 from exaile/master
Browse files Browse the repository at this point in the history
bring over lots of Py3 changes from master
  • Loading branch information
dwbapst committed Feb 3, 2020
2 parents 2b2eed1 + e2f4c84 commit 95f04fd
Show file tree
Hide file tree
Showing 191 changed files with 1,560 additions and 1,676 deletions.
11 changes: 5 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@ services:
language: python

env:
- IMGTAG=debian9
- IMGTAG=debian10
- IMGTAG=fedora31
- IMGTAG=ubuntu18.04
- IMGTAG=ubuntu19.10
- IMGTAG=debian10-python3
- IMGTAG=fedora31-python3
- IMGTAG=ubuntu18.04-python3
- IMGTAG=ubuntu19.10-python3

before_install:
- docker pull exaile/exaile-testimg:${IMGTAG}
Expand All @@ -29,7 +28,7 @@ jobs:
- stage: deploy
language: python
python:
- "2.7"
- "3.6"
virtualenv:
system_site_packages: true
if: tag IS present
Expand Down
48 changes: 28 additions & 20 deletions DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,25 @@ Core dependencies

Essential:

* python (== 2.7.x)
* bsddb (distributed with stdlib) or bsddb3
* gtk+ >= 3.10
* gstreamer >= 1.4
* gstreamer-plugins-base >= 1.6
* gstreamer-plugins-good >= 1.4
* mutagen (>= 1.10)
* dbus-python
* pygobject (>= 3.13.2)
* python-cairo
* GI typelib files for GTK+, GStreamer (including gstreamer-plugins-base) and cairo (python-gi-cairo on Ubuntu)
* python3 >= 3.6
* python3-bsddb3
* gtk+ >= 3.22
* gstreamer (>= 1.14)
* gstreamer-plugins-base (>= 1.14)
* gstreamer-plugins-good (>= 1.14)
* python3-mutagen (>= 1.38)
* python3-dbus
* GI typelib files for GTK+, GStreamer (including gstreamer-plugins-base) and cairo and their python bindings
* Packages on Debian and Ubuntu:
* python3-gi >= 3.22
* python3-gi-cairo
* gir1.2-gtk-3.0
* gir1.2-gstreamer-1.0
* gir1.2-gst-plugins-base-1.0
* Packages on Fedora:
* python3-cairo
* python3-gobject >= 3.22
* python3-gstreamer1

Optional dependencies
---------------------
Expand All @@ -40,33 +48,33 @@ Device detection:

* udisks2

CD info:
CD info: (TODO: This is currently broken on python3, see #608 and #652)

* cddb (python2), from http://cddb-py.sourceforge.net/

DAAP plugins (daapserver and daapclient):

* spydaap (python2), e.g. from https://github.com/exaile/spydaap or https://pypi.org/project/spydaap/
* spydaap (python3), e.g. from https://github.com/exaile/spydaap or https://pypi.org/project/spydaap/

Last.FM integration:

* pylast (python2)
* pylast (python3)

Lyrics from lyricsmania.com (lyricsmania):

* lxml (python2)
* lxml (python3)

Lyrics from lyrics.wikia.com (lyricwiki):

* Beautifulsoup4 (python2)
* Beautifulsoup4 (python3)

Musicbrainz covers:

* musicbrainzngs (python2)
* musicbrainzngs (python3)

Podcast plugin:

* feedparser (python2)
* feedparser (python3)

Wikipedia info:

Expand Down Expand Up @@ -98,6 +106,6 @@ BPM Counter plugin:

Test dependencies:

* mox3 (python2)
* pytest (python2)
* mox3 (python3)
* pytest (python3)

14 changes: 7 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PYTHON2_CMD ?= python2
PYTEST ?= py.test
PYTHON3_CMD ?= python3
PYTEST ?= py.test-3
BLACK ?= black

PREFIX = /usr/local
Expand Down Expand Up @@ -47,8 +47,8 @@ builddir:
mkdir -p build

compile:
$(PYTHON2_CMD) -m compileall -q xl xlgui
-$(PYTHON2_CMD) -O -m compileall -q xl xlgui
$(PYTHON3_CMD) -m compileall -q xl xlgui
$(PYTHON3_CMD) -O -m compileall -q xl xlgui
$(MAKE) -C plugins compile

make-install-dirs:
Expand Down Expand Up @@ -160,7 +160,7 @@ install-target: make-install-dirs
-install -m 644 build/exaile.fish-completion $(DESTDIR)$(FISHCOMPDIR)/exaile.fish
install -m 644 data/config/settings.ini $(EXAILECONFDIR)
tools/generate-launcher "$(DESTDIR)" "$(PREFIX)" "$(EPREFIX)" "$(LIBINSTALLDIR)" \
"$(PYTHON2_CMD)" && \
"$(PYTHON3_CMD)" && \
chmod 755 $(EXAILEBINDIR)/exaile
sed "s|\@bindir\@|$(EPREFIX)/bin|" data/org.exaile.Exaile.service.in > \
$(DESTDIR)$(DATADIR)/dbus-1/services/org.exaile.Exaile.service && \
Expand Down Expand Up @@ -201,8 +201,8 @@ manpage: builddir
| gzip -9 > build/exaile.1.gz

completion: builddir
$(PYTHON2_CMD) tools/generate-completion.py bash > build/exaile.bash-completion
$(PYTHON2_CMD) tools/generate-completion.py fish > build/exaile.fish-completion
$(PYTHON3_CMD) tools/generate-completion.py bash > build/exaile.bash-completion
$(PYTHON3_CMD) tools/generate-completion.py fish > build/exaile.fish-completion

clean:
-find . -name "*.~[0-9]~" -exec rm -f {} \;
Expand Down
2 changes: 1 addition & 1 deletion doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

# You can set these variables from the command line.
SPHINXOPTS ?=
SPHINXBUILD = python2 -msphinx
SPHINXBUILD = python3 -msphinx
SPHINXPROJ = Exaile
SOURCEDIR = .
BUILDDIR ?= _build
Expand Down
24 changes: 12 additions & 12 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@
os.environ['EXAILE_BUILDING_DOCS'] = 'TRUE'

EXAILE_AUTHORS = [
u'Adam Olsen <arolsen@gmail.com>',
u'Johannes Sasongko <sasongko@gmail.com>',
u'Aren Olsen <reacocard@gmail.com>',
u'Mathias Brodala <info@noctus.net>',
u'Dustin Spicuzza <dustin@virtualroadside.com>',
u'Christian Stadelmann',
'Adam Olsen <arolsen@gmail.com>',
'Johannes Sasongko <sasongko@gmail.com>',
'Aren Olsen <reacocard@gmail.com>',
'Mathias Brodala <info@noctus.net>',
'Dustin Spicuzza <dustin@virtualroadside.com>',
'Christian Stadelmann',
]

#
Expand Down Expand Up @@ -76,9 +76,9 @@
master_doc = 'index'

# General information about the project.
project = u'Exaile'
copyright = u'2009-2018 Exaile Development Team'
author = u''.join(EXAILE_AUTHORS)
project = 'Exaile'
copyright = '2009-2018 Exaile Development Team'
author = ''.join(EXAILE_AUTHORS)

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down Expand Up @@ -178,7 +178,7 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'Exaile.tex', u'Exaile Documentation',
(master_doc, 'Exaile.tex', 'Exaile Documentation',
author.replace('<', '\\textless{}').replace('>', '\\textgreater{}'),
'manual'),
]
Expand All @@ -189,7 +189,7 @@
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'exaile', u'Exaile Documentation',
(master_doc, 'exaile', 'Exaile Documentation',
[author], 1)
]

Expand All @@ -200,7 +200,7 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'Exaile', u'Exaile Documentation',
(master_doc, 'Exaile', 'Exaile Documentation',
author, 'Exaile', 'One line description of project.',
'Miscellaneous'),
]
Expand Down
9 changes: 4 additions & 5 deletions doc/dev/debugging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ On Windows:
Viewing stack traces when Exaile hangs
--------------------------------------

If you have the `faulthandler <https://github.com/haypo/faulthandler>`_ module
installed, on Linux/OSX if you send SIGUSR2 to Exaile it will dump stacktraces
On Linux/OSX if you send SIGUSR2 to Exaile it will dump stacktraces
of all current Python threads to stderr.

GStreamer Debugging Techniques
Expand Down Expand Up @@ -112,7 +111,7 @@ GDB can be used to diagnose segfaults and other issues. To run GDB:

.. code-block:: sh
gdb --args python2 exaile.py --startgui <other arguments here>
gdb --args python3 exaile.py --startgui <other arguments here>
Refer to the `Python Documentation <https://wiki.python.org/moin/DebuggingWithGdb>`_,
but especially useful here are:
Expand Down Expand Up @@ -143,7 +142,7 @@ and sometimes on older versions. See
Eliminating Gtk-WARNING
~~~~~~~~~~~~~~~~~~~~~~~

1. run gdb with ``G_DEBUG=fatal-warnings gdb --args python2 exaile --startgui``
1. run gdb with ``G_DEBUG=fatal-warnings gdb --args python3 exaile --startgui``
2. run exaile from gdb with ``run``
3. do whatever causes `Gtk-WARNING`. This will lead to a crash in exaile.
4. debug this crash with gdb
Expand Down Expand Up @@ -173,7 +172,7 @@ Debugging segfaults (segmentation violations)
1. Open a terminal.
2. Use the ``cd`` command to change to the directory where you put Exaile source
code or to its installation directory.
3. Run ``gdb /usr/bin/python2``
3. Run ``gdb /usr/bin/python3``
4. In gdb, run ``set logging on exaile-segfault.txt`` to enable logging to that file.
5. In gdb, run ``run ./exaile.py --startgui``. You might append other arguments if you need them.
6. Use Exaile as you did before and try to reproduce the problem. At some point, exaile might freeze. This is when gdb catched the segmentation fault.
Expand Down
22 changes: 11 additions & 11 deletions doc/dev/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ dependencies:
.. code-block:: sh
sudo apt-get install \
python-mutagen \
python-gi \
python-gi-cairo \
python-dbus \
python3-mutagen \
python3-gi \
python3-gi-cairo \
python3-dbus \
gir1.2-gtk-3.0 \
gir1.2-gstreamer-1.0 \
gir1.2-gst-plugins-base-1.0 \
Expand All @@ -59,10 +59,10 @@ awhile):
.. code-block:: sh
pacman -S \
mingw-w64-i686-python2-gobject \
mingw-w64-i686-python2-cairo \
mingw-w64-i686-python2-pip \
mingw-w64-i686-python2-bsddb3 \
mingw-w64-i686-python3-gobject \
mingw-w64-i686-python3-cairo \
mingw-w64-i686-python3-pip \
mingw-w64-i686-python3-bsddb3 \
mingw-w64-i686-gtk3 \
mingw-w64-i686-gdk-pixbuf2 \
mingw-w64-i686-gstreamer \
Expand All @@ -76,14 +76,14 @@ Once that is complete, you'll want to install mutagen:

.. code-block:: sh
python -m pip install mutagen
python3 -m pip install mutagen
And then you should be able to launch Exaile from the msys2 console:

.. code-block:: sh
cd exaile
python exaile_win.py
python3 exaile_win.py
OSX
~~~
Expand Down Expand Up @@ -113,7 +113,7 @@ Useful documentation
Exaile is built upon Python, PyGObject, Gtk+, and GStreamer. Here is a bunch of
documentation that you will find useful when working with these frameworks:

* `Python 2 <https://docs.python.org/2.7/>`_
* `Python 3 <https://docs.python.org/3/>`_
* `PyGObject <https://pygobject.readthedocs.io>`_
* `Python GI API Reference <https://lazka.github.io/pgi-docs>`_
* `Python GTK+3 Tutorial <https://python-gtk-3-tutorial.readthedocs.io>`_
Expand Down
Loading

0 comments on commit 95f04fd

Please sign in to comment.