summaryrefslogtreecommitdiff
path: root/dev-python/iniparse
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /dev-python/iniparse
reinit the tree, so we can have metadata
Diffstat (limited to 'dev-python/iniparse')
-rw-r--r--dev-python/iniparse/Manifest7
-rw-r--r--dev-python/iniparse/files/iniparse-0.4-python3.patch523
-rw-r--r--dev-python/iniparse/files/iniparse-0.4-tests.patch27
-rw-r--r--dev-python/iniparse/iniparse-0.4-r2.ebuild28
-rw-r--r--dev-python/iniparse/metadata.xml11
5 files changed, 596 insertions, 0 deletions
diff --git a/dev-python/iniparse/Manifest b/dev-python/iniparse/Manifest
new file mode 100644
index 000000000000..af220c9d569e
--- /dev/null
+++ b/dev-python/iniparse/Manifest
@@ -0,0 +1,7 @@
+AUX iniparse-0.4-python3.patch 16919 SHA256 bcc0da57d579dd03a44f99ca70686324251c14adb1a1a94632acd321f23c7581 SHA512 ed292dca5b124da5de1617cb2ad4f743b836607226805e488572b37cb08e9a71595ef2e008a26f99f8dd0acaa1308a77cdf58b48cde231524d034138df26ef7e WHIRLPOOL 431363554915af72f484649947a3c53bf314111dc1b3531b56661eb02140b9178eba7b266321f8fa5aa634656efd7a24ae941bf3e95114557cb15ea91f11b047
+AUX iniparse-0.4-tests.patch 779 SHA256 8710a9aa2abcf5e4014bc86c7f810a31c39271d475097e2a9f06a45b64753bb0 SHA512 543770491ca075463e4947d7adff0c846e31e03ba7b263c37d9728b93486ff751d8066cb5cdec3a244c30e00f6f1edbd39ec6ea1188340d0a3edf460af147ee3 WHIRLPOOL 57178426bb91d831d5bdc6e68ffba424abf9eb205f4dd444ff0a2fcbdd44b70fe751672ecbb82ee6d8975f824fc631fa5b624ab7eb9f999f9498d0160c703851
+DIST iniparse-0.4.tar.gz 31278 SHA256 abc1ee12d2cfb2506109072d6c21e40b6c75a3fe90a9c924327d80bc0d99c054 SHA512 d59eae7c1ce474c89eddb0b0cbff5973444571728aa0c6ce5b3632984353415f7eec4de63cf007c276df0d1bb914b2ea5dd0acc00f3a261285c8e2e9883fbe9a WHIRLPOOL 08c81ccaeb18e84f479c1ec851218b3d9466807126ca91d06a906fc36ab13e675939b41f78404200114de14e11ebae402caf7994138090ea247102b2ce6953c5
+EBUILD iniparse-0.4-r2.ebuild 588 SHA256 5a538a966cb2f85c61327d3e0fa01ad74e3907f36e50933f34518fedda4184a4 SHA512 f2e005c759d45723a843694c0c49fe00bd9f4e01f1292acfd13202be3b5e26da27a300b855696d66c385c4b218f7d4183371474e209f31248d20784b38f5515c WHIRLPOOL 6fb9dac25024936f3a9af17c30b5294319025836b0a49db044c387246e08ed478026c7fcdff54c802dc2b0067d417561b329d39140ff1671413761d14ff889ca
+MISC ChangeLog 3981 SHA256 9557e951ce1b4d1615eb745a286bae093184256d2a3e7c014efc5430b7f668c6 SHA512 dedfe2bd4e21ff10ee1c55237b56a0b5d3643470869c9f0fe2a83989842c78106305b1a969317beeba689692cb177aa34f41098cc3f68566610acec9d5d6ed96 WHIRLPOOL dc1b4facf1c84f805a78457f5530f7270401ceab3cfe254f878d0eff94d82edaee3eeb8a7ddd334d48e01aadd46b9011f73c3e3f7f7de68af0a66f4b9907137c
+MISC ChangeLog-2015 1533 SHA256 21378d14cf3dce616898510d96c890a2b711d8f971e1130cd0a028d71a6fc19e SHA512 ef091f82dd3f7d11b4f751aae79ca5cb6d43b0e3f97b7e2886e4f7d2b68f4e5d71659a8c838faa7028eb5be70f830813627e3f6218e38ea140fa16cf59057e7a WHIRLPOOL f9879ec75021ef4e34f3aa801394a30030cf14f1c4cead3ed7ca99896d5de98fcfbbe2b733106a07223166d0de60a1a77c442d39b747f833fe92f9d35212ff38
+MISC metadata.xml 311 SHA256 00f3ccc6d908852b939f3651f4b495184c23c3daae2ba28f5dbdce6339101c82 SHA512 f29afa7ed4888925433a7af5746a6d707c51856a95bf08c6f3b705e721091f84e18b1654d5e0cfb2e00d50d8eff2fa169d94a3642c5903e8cc503ff2a833ce72 WHIRLPOOL b04411eca92e4d200ebe8d3e1dcd633774e4bccb561f928114f5303979295d7bc2ea2f145424fc33d64d2996bb34f2427f5b80726b5f2bbb6c1c8c5ea449eb7f
diff --git a/dev-python/iniparse/files/iniparse-0.4-python3.patch b/dev-python/iniparse/files/iniparse-0.4-python3.patch
new file mode 100644
index 000000000000..a5ebb73e711c
--- /dev/null
+++ b/dev-python/iniparse/files/iniparse-0.4-python3.patch
@@ -0,0 +1,523 @@
+Index: iniparse/__init__.py
+===================================================================
+--- a/iniparse/__init__.py (revision 146)
++++ b/iniparse/__init__.py (working copy)
+@@ -3,17 +3,17 @@
+ # Copyright (c) 2007 Tim Lauridsen <tla@rasmil.dk>
+ # All Rights Reserved. See LICENSE-PSF & LICENSE for details.
+
+-from ini import INIConfig, change_comment_syntax
+-from config import BasicConfig, ConfigNamespace
+-from compat import RawConfigParser, ConfigParser, SafeConfigParser
+-from utils import tidy
++from .ini import INIConfig, change_comment_syntax
++from .config import BasicConfig, ConfigNamespace
++from .compat import RawConfigParser, ConfigParser, SafeConfigParser
++from .utils import tidy
+
+-from ConfigParser import DuplicateSectionError, \
+- NoSectionError, NoOptionError, \
+- InterpolationMissingOptionError, \
+- InterpolationDepthError, \
+- InterpolationSyntaxError, \
+- DEFAULTSECT, MAX_INTERPOLATION_DEPTH
++from .configparser import DuplicateSectionError, \
++ NoSectionError, NoOptionError, \
++ InterpolationMissingOptionError, \
++ InterpolationDepthError, \
++ InterpolationSyntaxError, \
++ DEFAULTSECT, MAX_INTERPOLATION_DEPTH
+
+ __all__ = [
+ 'BasicConfig', 'ConfigNamespace',
+Index: iniparse/compat.py
+===================================================================
+--- a/iniparse/compat.py (revision 146)
++++ b/iniparse/compat.py (working copy)
+@@ -12,20 +12,22 @@
+ """
+
+ import re
+-from ConfigParser import DuplicateSectionError, \
+- NoSectionError, NoOptionError, \
+- InterpolationMissingOptionError, \
+- InterpolationDepthError, \
+- InterpolationSyntaxError, \
+- DEFAULTSECT, MAX_INTERPOLATION_DEPTH
++from .configparser import DuplicateSectionError, \
++ NoSectionError, NoOptionError, \
++ InterpolationMissingOptionError, \
++ InterpolationDepthError, \
++ InterpolationSyntaxError, \
++ DEFAULTSECT, MAX_INTERPOLATION_DEPTH
+
+ # These are imported only for compatiability.
+ # The code below does not reference them directly.
+-from ConfigParser import Error, InterpolationError, \
+- MissingSectionHeaderError, ParsingError
++from .configparser import Error, InterpolationError, \
++ MissingSectionHeaderError, ParsingError
+
+-import ini
++import six
+
++from . import ini
++
+ class RawConfigParser(object):
+ def __init__(self, defaults=None, dict_type=dict):
+ if dict_type != dict:
+@@ -56,7 +58,7 @@
+ # The default section is the only one that gets the case-insensitive
+ # treatment - so it is special-cased here.
+ if section.lower() == "default":
+- raise ValueError, 'Invalid section name: %s' % section
++ raise ValueError('Invalid section name: %s' % section)
+
+ if self.has_section(section):
+ raise DuplicateSectionError(section)
+@@ -88,7 +90,7 @@
+ filename may also be given.
+ """
+ files_read = []
+- if isinstance(filenames, basestring):
++ if isinstance(filenames, six.string_types):
+ filenames = [filenames]
+ for filename in filenames:
+ try:
+@@ -143,7 +145,7 @@
+ def getboolean(self, section, option):
+ v = self.get(section, option)
+ if v.lower() not in self._boolean_states:
+- raise ValueError, 'Not a boolean: %s' % v
++ raise ValueError('Not a boolean: %s' % v)
+ return self._boolean_states[v.lower()]
+
+ def has_option(self, section, option):
+@@ -234,7 +236,7 @@
+ if "%(" in value:
+ try:
+ value = value % vars
+- except KeyError, e:
++ except KeyError as e:
+ raise InterpolationMissingOptionError(
+ option, section, rawval, e.args[0])
+ else:
+@@ -283,7 +285,7 @@
+ _badpercent_re = re.compile(r"%[^%]|%$")
+
+ def set(self, section, option, value):
+- if not isinstance(value, basestring):
++ if not isinstance(value, six.string_types):
+ raise TypeError("option values must be strings")
+ # check for bad percent signs:
+ # first, replace all "good" interpolations
+Index: iniparse/config.py
+===================================================================
+--- a/iniparse/config.py (revision 146)
++++ b/iniparse/config.py (working copy)
+@@ -143,7 +143,7 @@
+
+ >>> n.aaa = 42
+ >>> del n.x
+- >>> print n
++ >>> print(n)
+ aaa = 42
+ name.first = paramjit
+ name.last = oberoi
+@@ -152,7 +152,7 @@
+
+ >>> isinstance(n.name, ConfigNamespace)
+ True
+- >>> print n.name
++ >>> print(n.name)
+ first = paramjit
+ last = oberoi
+ >>> sorted(list(n.name))
+@@ -160,7 +160,7 @@
+
+ Finally, values can be read from a file as follows:
+
+- >>> from StringIO import StringIO
++ >>> from six import StringIO
+ >>> sio = StringIO('''
+ ... # comment
+ ... ui.height = 100
+@@ -171,7 +171,7 @@
+ ... ''')
+ >>> n = BasicConfig()
+ >>> n._readfp(sio)
+- >>> print n
++ >>> print(n)
+ complexity = medium
+ data.secret.password = goodness=gracious me
+ have_python
+@@ -199,7 +199,7 @@
+
+ def __str__(self, prefix=''):
+ lines = []
+- keys = self._data.keys()
++ keys = list(self._data.keys())
+ keys.sort()
+ for name in keys:
+ value = self._data[name]
+@@ -258,7 +258,7 @@
+ >>> n.ui.display_clock = True
+ >>> n.ui.display_qlength = True
+ >>> n.ui.width = 150
+- >>> print n
++ >>> print(n)
+ playlist.expand_playlist = True
+ ui.display_clock = True
+ ui.display_qlength = True
+@@ -267,7 +267,7 @@
+ >>> from iniparse import ini
+ >>> i = ini.INIConfig()
+ >>> update_config(i, n)
+- >>> print i
++ >>> print(i)
+ [playlist]
+ expand_playlist = True
+ <BLANKLINE>
+@@ -277,7 +277,7 @@
+ width = 150
+
+ """
+- for name in source:
++ for name in sorted(source):
+ value = source[name]
+ if isinstance(value, ConfigNamespace):
+ if name in target:
+Index: iniparse/configparser.py
+===================================================================
+--- a/iniparse/configparser.py (revision 0)
++++ b/iniparse/configparser.py (working copy)
+@@ -0,0 +1,7 @@
++try:
++ from ConfigParser import *
++ # not all objects get imported with __all__
++ from ConfigParser import Error, InterpolationMissingOptionError
++except ImportError:
++ from configparser import *
++ from configparser import Error, InterpolationMissingOptionError
+Index: iniparse/ini.py
+===================================================================
+--- a/iniparse/ini.py (revision 146)
++++ b/iniparse/ini.py (working copy)
+@@ -7,7 +7,7 @@
+
+ Example:
+
+- >>> from StringIO import StringIO
++ >>> from six import StringIO
+ >>> sio = StringIO('''# configure foo-application
+ ... [foo]
+ ... bar1 = qualia
+@@ -16,14 +16,14 @@
+ ... special = 1''')
+
+ >>> cfg = INIConfig(sio)
+- >>> print cfg.foo.bar1
++ >>> print(cfg.foo.bar1)
+ qualia
+- >>> print cfg['foo-ext'].special
++ >>> print(cfg['foo-ext'].special)
+ 1
+ >>> cfg.foo.newopt = 'hi!'
+ >>> cfg.baz.enabled = 0
+
+- >>> print cfg
++ >>> print(cfg)
+ # configure foo-application
+ [foo]
+ bar1 = qualia
+@@ -42,10 +42,12 @@
+ # Backward-compatiable with ConfigParser
+
+ import re
+-from ConfigParser import DEFAULTSECT, ParsingError, MissingSectionHeaderError
++from .configparser import DEFAULTSECT, ParsingError, MissingSectionHeaderError
+
+-import config
++import six
+
++from . import config
++
+ class LineType(object):
+ line = None
+
+@@ -278,6 +280,8 @@
+ value = property(get_value, set_value)
+
+ def __str__(self):
++ for c in self.contents:
++ pass#print(c.__str__())
+ s = [x.__str__() for x in self.contents]
+ return '\n'.join(s)
+
+@@ -465,7 +469,7 @@
+ self._sections = {}
+ if defaults is None: defaults = {}
+ self._defaults = INISection(LineContainer(), optionxformsource=self)
+- for name, value in defaults.iteritems():
++ for name, value in defaults.items():
+ self._defaults[name] = value
+ if fp is not None:
+ self._readfp(fp)
+@@ -551,7 +555,7 @@
+
+ for line in readline_iterator(fp):
+ # Check for BOM on first line
+- if linecount == 0 and isinstance(line, unicode):
++ if linecount == 0 and isinstance(line, six.text_type):
+ if line[0] == u'\ufeff':
+ line = line[1:]
+ self._bom = True
+Index: iniparse/utils.py
+===================================================================
+--- a/iniparse/utils.py (revision 146)
++++ b/iniparse/utils.py (working copy)
+@@ -1,5 +1,5 @@
+-import compat
+-from ini import LineContainer, EmptyLine
++from . import compat
++from .ini import LineContainer, EmptyLine
+
+ def tidy(cfg):
+ """Clean up blank lines.
+Index: tests/__init__.py
+===================================================================
+--- a/tests/__init__.py (revision 146)
++++ b/tests/__init__.py (working copy)
+@@ -1,12 +1,12 @@
+ import unittest, doctest
+
+-import test_ini
+-import test_misc
+-import test_fuzz
+-import test_compat
+-import test_unicode
+-import test_tidy
+-import test_multiprocessing
++from . import test_ini
++from . import test_misc
++from . import test_fuzz
++from . import test_compat
++from . import test_unicode
++from . import test_tidy
++from . import test_multiprocessing
+ from iniparse import config
+ from iniparse import ini
+
+Index: tests/test_compat.py
+===================================================================
+--- a/tests/test_compat.py (revision 146)
++++ b/tests/test_compat.py (working copy)
+@@ -1,9 +1,16 @@
+ from iniparse import compat as ConfigParser
+-import StringIO
++from six import StringIO
++try:
++ import UserDict
++except ImportError:
++ import collections as UserDict
+ import unittest
+-import UserDict
+
+-from test import test_support
++import sys
++if sys.version_info[0] < 3:
++ from test import test_support
++else:
++ from test import support as test_support
+
+ class SortedDict(UserDict.UserDict):
+ def items(self):
+@@ -35,7 +42,7 @@
+
+ def fromstring(self, string, defaults=None):
+ cf = self.newconfig(defaults)
+- sio = StringIO.StringIO(string)
++ sio = StringIO(string)
+ cf.readfp(sio)
+ return cf
+
+@@ -161,7 +168,7 @@
+ "No Section!\n")
+
+ def parse_error(self, exc, src):
+- sio = StringIO.StringIO(src)
++ sio = StringIO(src)
+ self.assertRaises(exc, self.cf.readfp, sio)
+
+ def test_query_errors(self):
+@@ -181,7 +188,7 @@
+ def get_error(self, exc, section, option):
+ try:
+ self.cf.get(section, option)
+- except exc, e:
++ except exc as e:
+ return e
+ else:
+ self.fail("expected exception type %s.%s"
+@@ -227,7 +234,7 @@
+ "foo: another very\n"
+ " long line"
+ )
+- output = StringIO.StringIO()
++ output = StringIO()
+ cf.write(output)
+ self.assertEqual(
+ output.getvalue(),
+@@ -465,7 +472,7 @@
+ "o1=4\n"
+ "[a]\n"
+ "k=v\n")
+- output = StringIO.StringIO()
++ output = StringIO()
+ self.cf.write(output)
+ self.assertEquals(output.getvalue(),
+ "[a]\n"
+Index: tests/test_fuzz.py
+===================================================================
+--- a/tests/test_fuzz.py (revision 146)
++++ b/tests/test_fuzz.py (working copy)
+@@ -1,9 +1,10 @@
+ import re
+ import os
+ import random
++import sys
+ import unittest
+-import ConfigParser
+-from StringIO import StringIO
++from six import StringIO
++from six.moves import configparser
+ from iniparse import compat, ini, tidy
+
+ # TODO:
+@@ -96,24 +97,25 @@
+ s = '\n'.join(good_lines)
+ cc = compat.RawConfigParser()
+ cc.readfp(StringIO(s))
+- cc_py = ConfigParser.RawConfigParser()
++ cc_py = configparser.RawConfigParser()
+ cc_py.readfp(StringIO(s))
+ # compare the two configparsers
+ self.assertEqualConfig(cc_py, cc)
+ # check that tidy does not change semantics
+ tidy(cc)
+- cc_tidy = ConfigParser.RawConfigParser()
++ cc_tidy = configparser.RawConfigParser()
+ cc_tidy.readfp(StringIO(str(cc.data)))
+ self.assertEqualConfig(cc_py, cc_tidy)
+ except AssertionError:
+ fname = 'fuzz-test-iter-%d.ini' % fuzz_iter
+- print 'Fuzz test failed at iteration', fuzz_iter
+- print 'Writing out failing INI file as', fname
++ print('Fuzz test failed at iteration', fuzz_iter)
++ print('Writing out failing INI file as', fname)
+ f = open(fname, 'w')
+ f.write(s)
+ f.close()
+ raise
+
++ @unittest.skipIf(sys.version_info[0] > 2, 'http://code.google.com/p/iniparse/issues/detail?id=22#c9')
+ def assertEqualConfig(self, c1, c2):
+ self.assertEqualSorted(c1.sections(), c2.sections())
+ self.assertEqualSorted(c1.defaults().items(), c2.defaults().items())
+@@ -123,9 +125,7 @@
+ self.assertEqual(c1.get(sec, opt), c2.get(sec, opt))
+
+ def assertEqualSorted(self, l1, l2):
+- l1.sort()
+- l2.sort()
+- self.assertEqual(l1, l2)
++ self.assertEqual(sorted(l1), sorted(l2))
+
+ class suite(unittest.TestSuite):
+ def __init__(self):
+Index: tests/test_ini.py
+===================================================================
+--- a/tests/test_ini.py (revision 146)
++++ b/tests/test_ini.py (working copy)
+@@ -1,5 +1,5 @@
+ import unittest
+-from StringIO import StringIO
++from six import StringIO
+
+ from iniparse import ini
+ from iniparse import compat
+@@ -196,13 +196,13 @@
+ self.assertEqual(p._data.find('section2').find('just').value, 'kidding')
+
+ itr = p._data.finditer('section1')
+- v = itr.next()
++ v = next(itr)
+ self.assertEqual(v.find('help').value, 'yourself')
+ self.assertEqual(v.find('but').value, 'also me')
+- v = itr.next()
++ v = next(itr)
+ self.assertEqual(v.find('help').value, 'me')
+ self.assertEqual(v.find('I\'m').value, 'desperate')
+- self.assertRaises(StopIteration, itr.next)
++ self.assertRaises(StopIteration, next, itr)
+
+ self.assertRaises(KeyError, p._data.find, 'section')
+ self.assertRaises(KeyError, p._data.find('section2').find, 'ahem')
+Index: tests/test_misc.py
+===================================================================
+--- a/tests/test_misc.py (revision 146)
++++ b/tests/test_misc.py (working copy)
+@@ -1,9 +1,9 @@
+ import re
+ import unittest
+ import pickle
+-import ConfigParser
++from six.moves import configparser
++from six import StringIO
+ from textwrap import dedent
+-from StringIO import StringIO
+ from iniparse import compat, ini
+
+ class CaseSensitiveConfigParser(compat.ConfigParser):
+Index: tests/test_tidy.py
+===================================================================
+--- a/tests/test_tidy.py (revision 146)
++++ b/tests/test_tidy.py (working copy)
+@@ -1,6 +1,6 @@
+ import unittest
+ from textwrap import dedent
+-from StringIO import StringIO
++from six import StringIO
+
+ from iniparse import tidy,INIConfig
+ from iniparse.ini import EmptyLine
+Index: tests/test_unicode.py
+===================================================================
+--- a/tests/test_unicode.py (revision 146)
++++ b/tests/test_unicode.py (working copy)
+@@ -1,5 +1,5 @@
+ import unittest
+-from StringIO import StringIO
++import six
+ from iniparse import compat, ini
+
+ class test_unicode(unittest.TestCase):
+@@ -17,14 +17,14 @@
+ """
+
+ def basic_tests(self, s, strable):
+- f = StringIO(s)
++ f = six.StringIO(s)
+ i = ini.INIConfig(f)
+- self.assertEqual(unicode(i), s)
+- self.assertEqual(type(i.foo.bar), unicode)
++ self.assertEqual(six.text_type(i), s)
++ self.assertEqual(type(i.foo.bar), six.text_type)
+ if strable:
+ self.assertEqual(str(i), str(s))
+ else:
+- self.assertRaises(UnicodeEncodeError, lambda: str(i))
++ self.assertRaises(UnicodeEncodeError, lambda: six.text_type(i).encode('ascii'))
+ return i
+
+ def test_ascii(self):
diff --git a/dev-python/iniparse/files/iniparse-0.4-tests.patch b/dev-python/iniparse/files/iniparse-0.4-tests.patch
new file mode 100644
index 000000000000..ca6900ad2ea5
--- /dev/null
+++ b/dev-python/iniparse/files/iniparse-0.4-tests.patch
@@ -0,0 +1,27 @@
+From b3d6ea5ed88b0e6cf9fdb411a14e725665ded92e Mon Sep 17 00:00:00 2001
+From: Tim Lauridsen <timlau@fedoraproject.org>
+Date: Fri, 7 Mar 2014 19:06:40 +0100
+Subject: [PATCH] Fix handling of REM xxxxxxxx as a comment, but REMXXXX is not
+ (upstream issue #28)
+
+---
+ tests/test_ini.py | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/tests/test_ini.py b/tests/test_ini.py
+index 07d4f4e..6d974f0 100644
+--- a/tests/test_ini.py
++++ b/tests/test_ini.py
+@@ -144,8 +144,7 @@ class test_comment_line(unittest.TestCase):
+ '#this is a comment',
+ ';; this is also a comment',
+ '; so is this ',
+- 'Rem and this',
+- 'remthis too!'
++ 'Rem and this'
+ ]
+ def test_parsing(self):
+ for l in self.lines:
+--
+1.8.5.3
+
diff --git a/dev-python/iniparse/iniparse-0.4-r2.ebuild b/dev-python/iniparse/iniparse-0.4-r2.ebuild
new file mode 100644
index 000000000000..4c4d1a47417f
--- /dev/null
+++ b/dev-python/iniparse/iniparse-0.4-r2.ebuild
@@ -0,0 +1,28 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+PYTHON_COMPAT=( python2_7 python3_{4,5,6} )
+
+inherit distutils-r1
+
+DESCRIPTION="Better INI parser for Python"
+HOMEPAGE="https://pypi.python.org/pypi/iniparse"
+SRC_URI="mirror://pypi/${PN:0:1}/${PN}/${P}.tar.gz"
+
+LICENSE="MIT PSF-2"
+SLOT="0"
+KEYWORDS="amd64 x86"
+IUSE=""
+
+DEPEND=">=dev-python/six-1.10.0[${PYTHON_USEDEP}]"
+RDEPEND="${DEPEND}"
+
+PATCHES=(
+ "${FILESDIR}/${P}-python3.patch"
+ "${FILESDIR}/${P}-tests.patch"
+)
+
+python_test() {
+ "${EPYTHON}" runtests.py || die
+}
diff --git a/dev-python/iniparse/metadata.xml b/dev-python/iniparse/metadata.xml
new file mode 100644
index 000000000000..6d4c229f7a73
--- /dev/null
+++ b/dev-python/iniparse/metadata.xml
@@ -0,0 +1,11 @@
+<?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">iniparse</remote-id>
+ </upstream>
+</pkgmetadata>