diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..319d72a --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1 @@ +recursive-include eptransition *.idf *.idd diff --git a/eptransition/__init__.py b/eptransition/__init__.py index 13faa15..28e6093 100644 --- a/eptransition/__init__.py +++ b/eptransition/__init__.py @@ -1,3 +1,3 @@ __name__ = "EPTransition" -__version__ = 0.92 +__version__ = 0.951 __description__ = "This tool is used to transition EnergyPlus input files between versions" diff --git a/eptransition/idd/processor.py b/eptransition/idd/processor.py index b5b991e..facdac2 100644 --- a/eptransition/idd/processor.py +++ b/eptransition/idd/processor.py @@ -64,7 +64,7 @@ def process_file_given_file_path(self, file_path): """ if not os.path.exists(file_path): raise exceptions.ProcessingException("Input IDD file not found=\"" + file_path + "\"") # pragma: no cover - self.idd_file_stream = open(file_path, "r") + self.idd_file_stream = open(file_path, "rb") self.file_path = file_path return self.process_file() @@ -159,6 +159,13 @@ def process_file(self): if not peeked_char: peeked_char = "\n" # to simulate that the line ended + # if we are on Windows, we may end up with "\r", so move the read and peeked characters forward once + if peeked_char == "\r": # pragma no cover -- we don't unit test on windows, so this won't be caught + just_read_char = self.read_one_char() + peeked_char = self.peek_one_char() + if not peeked_char: + peeked_char = "\n" + # jump if we are at an EOL if just_read_char == "\n": # increment the counter diff --git a/setup.py b/setup.py index 8052a7e..598af88 100755 --- a/setup.py +++ b/setup.py @@ -36,6 +36,7 @@ def my_test_suite(): ], keywords='cli energyplus', packages=setuptools.find_packages(exclude=['test', 'test.*', '.tox']), + include_package_data=True, install_requires=[], extras_require={ 'test': ['coverage', 'unittest', 'coveralls'],