Browse Source
Merge pull request #23 from pinotree/drop-python2
Drop support for Python 2
pull/21/head
George Vlahavas
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with
12 additions and
23 deletions
-
README.md
-
man/xdgmenumaker.t2t
-
src/xdgmenumaker
-
tests/Makefile
|
|
@ -23,10 +23,9 @@ xdgmenumaker currently supports generating menus for: |
|
|
|
* windowmaker |
|
|
|
|
|
|
|
**xdgmenumaker** requires: |
|
|
|
* Python 2.7 or 3.x |
|
|
|
* Python 3.x |
|
|
|
* pyxdg |
|
|
|
* pygtk (for Python 2) |
|
|
|
* pygobject and gobject-instrospection (for Python 3) |
|
|
|
* pygobject and gobject-instrospection |
|
|
|
* Pillow (optional) |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -40,9 +40,8 @@ according to the running user locale settings. |
|
|
|
- windowmaker |
|
|
|
|
|
|
|
|
|
|
|
**xdgmenumaker** requires //Python 2.7// or //3.x//, //pygtk// |
|
|
|
(for Python 2.7) or //pygobject// and //gobject-instrospection// |
|
|
|
(for Python 3.x), as well as //pyxdg//. //Pillow// is an optional |
|
|
|
**xdgmenumaker** requires //Python 3.x//, //pygobject// and |
|
|
|
//gobject-instrospection//, as well as //pyxdg//. //Pillow// is an optional |
|
|
|
dependency (used by the **--max-icon-size** option). |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -1,4 +1,4 @@ |
|
|
|
#!/usr/bin/env python |
|
|
|
#!/usr/bin/env python3 |
|
|
|
# coding: utf-8 |
|
|
|
# vim:et:sta:sts=4:sw=4:ts=8:tw=79: |
|
|
|
|
|
|
@ -13,18 +13,9 @@ import xdg.Exceptions as exc |
|
|
|
import xdg.BaseDirectory as bd |
|
|
|
from operator import attrgetter |
|
|
|
|
|
|
|
# ConfigParser in Python2 has been renamed to configparser (all lower case) |
|
|
|
# in Python3. So, it's a good way to find out which Python version is being |
|
|
|
# used. |
|
|
|
python3 = False |
|
|
|
try: |
|
|
|
import ConfigParser as cp |
|
|
|
except ImportError: |
|
|
|
import configparser as cp |
|
|
|
python3 = True |
|
|
|
|
|
|
|
# Under Python3, load the gtk compatibility layer |
|
|
|
if python3: |
|
|
|
# Load the gtk compatibility layer |
|
|
|
from gi import pygtkcompat |
|
|
|
pygtkcompat.enable() |
|
|
|
pygtkcompat.enable_gtk(version='3.0') |
|
|
|
|
|
@ -1,5 +1,5 @@ |
|
|
|
MM ?= ../src/xdgmenumaker |
|
|
|
PYTHON ?= python |
|
|
|
PYTHON ?= python3 |
|
|
|
|
|
|
|
test: clean generate |
|
|
|
@for i in `ls menus_correct/`; do \
|
|
|
|