Update to 0.3

This commit is contained in:
David King 2017-10-10 07:58:15 +01:00
parent b6fcd1f8e9
commit 1e902a7c5f
4 changed files with 7 additions and 44 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
/mallard-ducktype-0.1.tar.gz
/mallard-ducktype-0.2.tar.gz
/mallard-ducktype-0.3.tar.gz

View File

@ -1,38 +0,0 @@
From ec2b427c8b9555b9fb4fa045c6cdd7a5878d9583 Mon Sep 17 00:00:00 2001
From: David King <dking@redhat.com>
Date: Wed, 9 Sep 2015 11:32:08 +0100
Subject: [PATCH] Open files as UTF-8
Do not rely on the platform-preferred encoding when opening files, and
instead force UTF-8 encoding.
Fixes #11
---
mallard/ducktype/parser.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mallard/ducktype/parser.py b/mallard/ducktype/parser.py
index 35ea594..da73f54 100644
--- a/mallard/ducktype/parser.py
+++ b/mallard/ducktype/parser.py
@@ -169,7 +169,7 @@ class Node:
fd = sys.stdout
elif isinstance(outfile, str):
close = True
- fd = open(outfile, 'w')
+ fd = open(outfile, 'w', encoding='utf-8')
else:
fd = outfile
self._write_xml(fd)
@@ -651,7 +651,7 @@ class DuckParser:
self._defaultid = os.path.basename(filename)
if self._defaultid.endswith('.duck'):
self._defaultid = self._defaultid[:-5]
- fd = open(filename)
+ fd = open(filename, encoding='utf-8')
for line in fd:
self.parse_line(line)
fd.close()
--
2.5.1

View File

@ -1,15 +1,13 @@
%global srcname mallard-ducktype
Name: python3-mallard-ducktype
Version: 0.2
Release: 8%{?dist}
Version: 0.3
Release: 1%{?dist}
Summary: Parse Ducktype files and convert them to Mallard
License: MIT
URL: https://pypi.python.org/pypi/%{srcname}
Source0: https://pypi.python.org/packages/source/m/%{srcname}/%{srcname}-%{version}.tar.gz
# https://github.com/projectmallard/mallard-ducktype/issues/11
Patch0: %{srcname}-0.2-open-utf8.patch
BuildArch: noarch
BuildRequires: python3-devel
@ -21,7 +19,6 @@ Parse Ducktype files and convert them to Mallard.
%prep
%setup -q -n %{srcname}-%{version}
rm -rf %{srcname}-%{version}/mallard_ducktype.egg-info/
%patch0 -p1
%build
@ -45,6 +42,9 @@ rm -rf %{srcname}-%{version}/mallard_ducktype.egg-info/
%changelog
* Tue Oct 10 2017 David King <amigadave@amigadave.com> - 0.3-1
- Update to 0.3
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.2-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild

View File

@ -1 +1 @@
8e1b7403c3112ef80e6bd52fa77ce566 mallard-ducktype-0.2.tar.gz
SHA512 (mallard-ducktype-0.3.tar.gz) = d86e9ee007a51a2452f3f89e02e55df3954b883d2811cc923cb0b09a176c7b3b32cd8f11b4881bf4c1f4a45d0fce91e960c849b027e0a383f667248078be417f