--- /dev/null
+diff --git a/setup.py b/setup.py
+index d14f27b..40bffcc 100755
+--- a/setup.py
++++ b/setup.py
+@@ -1,6 +1,7 @@
+ #!/usr/bin/env python
+ import os
+ import re
++from io import open # for python 2 compat (missing 'encoding' kw)
+
+ from setuptools import setup
+
--- /dev/null
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=6
+PYTHON_COMPAT=( python2_7 python3_{4,5} )
+
+inherit distutils-r1
+
+MY_PN="Flask-Sphinx-Themes"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="Sphinx Themes for Flask related projects and Flask itself"
+HOMEPAGE="https://github.com/pallets/flask-sphinx-themes https://pypi.python.org/pypi/Flask-Sphinx-Themes"
+SRC_URI="mirror://pypi/${MY_PN:0:1}/${MY_PN}/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND="dev-python/sphinx[${PYTHON_USEDEP}]"
+DEPEND="${RDEPEND}
+ dev-python/setuptools[${PYTHON_USEDEP}]"
+
+PATCHES=( "${FILESDIR}/${P}-python2-encoding-kw.patch" )
+
+S="${WORKDIR}/${MY_P}"
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="project">
+ <email>python@gentoo.org</email>
+ <name>Python</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="pypi">Flask-Sphinx-Themes</remote-id>
+ </upstream>
+</pkgmetadata>