From b1a5f925527093b0b5c11507f379a908e3354820 Mon Sep 17 00:00:00 2001 From: Brecht Machiels Date: Tue, 22 May 2018 12:57:47 +0200 Subject: [PATCH] rnc2rng 2.6.1 handles rnc file encoding (fixes #81) --- setup.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index dbaad6d..774932b 100755 --- a/setup.py +++ b/setup.py @@ -9,6 +9,7 @@ import sys from datetime import datetime +from io import open from subprocess import Popen, PIPE from setuptools import setup, find_packages from setuptools.command.build_py import build_py @@ -63,9 +64,8 @@ def convert_rnc(): import rnc2rng filename_root, _ = os.path.splitext(CSL_SCHEMA_RNC) - with open(CSL_SCHEMA_RNC, 'r') as rnc: - root = rnc2rng.load(rnc) - with open(filename_root + '.rng', 'w') as rng: + root = rnc2rng.load(CSL_SCHEMA_RNC) + with open(filename_root + '.rng', 'w', encoding='utf-8') as rng: rnc2rng.dump(root, rng) @@ -91,7 +91,7 @@ def run(self): 'data/schema/*.rng', 'data/styles/*.csl']}, scripts=['bin/csl_unsorted'], - setup_requires=['rnc2rng>=2.2'], + setup_requires=['rnc2rng>=2.6.1'], install_requires=['lxml'], provides=[PACKAGE], #test_suite='nose.collector',