Update to 0.3
This commit is contained in:
parent
b6fcd1f8e9
commit
1e902a7c5f
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
/mallard-ducktype-0.1.tar.gz
|
||||
/mallard-ducktype-0.2.tar.gz
|
||||
/mallard-ducktype-0.3.tar.gz
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user