diff --git a/python-toml.spec b/python-toml.spec index 41fa75d..72510fd 100644 --- a/python-toml.spec +++ b/python-toml.spec @@ -7,7 +7,7 @@ toml file. Name: python-%{pypi_name} Version: 0.10.1 -Release: 3%{?dist} +Release: 4%{?dist} Summary: Python Library for Tom's Obvious, Minimal Language License: MIT @@ -38,6 +38,8 @@ Summary: %{summary} %prep %autosetup -p1 -n %{pypi_name}-%{version} +# https://github.com/uiri/toml/pull/339 +sed -i '/pytest-cov/d' tox.ini %generate_buildrequires @@ -69,6 +71,9 @@ toml-test $(pwd)/tests/decoding_test3.sh %changelog +* Fri Nov 13 2020 Miro Hrončok - 0.10.1-4 +- Don't BR pytest-cov + * Thu Sep 03 2020 Miro Hrončok - 0.10.1-3 - Use pyproject-rpm-macros diff --git a/toml_test.py b/toml_test.py deleted file mode 100644 index f399c05..0000000 --- a/toml_test.py +++ /dev/null @@ -1,56 +0,0 @@ -#!/usr/bin/env python2 - -import datetime -import json -import sys -import toml - -try: - _range = xrange - iteritems = dict.iteritems -except NameError: - unicode = str - _range = range - basestring = str - unichr = chr - iteritems = dict.items - long = int - -def tag(value): - if isinstance(value, dict): - d = { } - for k, v in iteritems(value): - d[k] = tag(v) - return d - elif isinstance(value, list): - a = [] - for v in value: - a.append(tag(v)) - try: - a[0]["value"] - except KeyError: - return a - except IndexError: - pass - return {'type': 'array', 'value': a} - elif isinstance(value, basestring): - return {'type': 'string', 'value': value} - elif isinstance(value, bool): - return {'type': 'bool', 'value': str(value).lower()} - elif isinstance(value, int): - return {'type': 'integer', 'value': str(value)} - elif isinstance(value, long): - return {'type': 'integer', 'value': str(value)} - elif isinstance(value, float): - return {'type': 'float', 'value': repr(value)} - elif isinstance(value, datetime.datetime): - sdate = value.strftime('%Y-%m-%dT%H:%M:%SZ') - return {'type': 'datetime', 'value': sdate} - assert False, 'Unknown type: %s' % type(value) - - -if __name__ == '__main__': - tdata = toml.loads(sys.stdin.read()) - tagged = tag(tdata) - print(json.dumps(tagged)) - diff --git a/toml_test3.py b/toml_test3.py deleted file mode 100644 index 84b6351..0000000 --- a/toml_test3.py +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env python3 - -import toml_test -import toml -import sys -import json - -if __name__ == '__main__': - tdata = toml.loads(sys.stdin.read()) - tagged = toml_test.tag(tdata) - print(json.dumps(tagged))