summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--__init__.py2
-rw-r--r--ext/_ruamel_yaml.c12
-rw-r--r--ext/_ruamel_yaml.pyx2
-rw-r--r--loader.py4
-rw-r--r--parser.py (renamed from parser_.py)20
-rw-r--r--setup.py10
6 files changed, 23 insertions, 27 deletions
diff --git a/__init__.py b/__init__.py
index ca0040d..9535493 100644
--- a/__init__.py
+++ b/__init__.py
@@ -9,7 +9,7 @@ from __future__ import absolute_import
_package_data = dict(
full_package_name="ruamel.yaml",
- version_info=(0, 11, 7),
+ version_info=(0, 11, 8, "dev"),
author="Anthon van der Neut",
author_email="a.van.der.neut@ruamel.eu",
description="ruamel.yaml is a YAML parser/emitter that supports roundtrip preservation of comments, seq/map flow style, and map key order", # NOQA
diff --git a/ext/_ruamel_yaml.c b/ext/_ruamel_yaml.c
index d5f069e..1a5252a 100644
--- a/ext/_ruamel_yaml.c
+++ b/ext/_ruamel_yaml.c
@@ -941,7 +941,7 @@ static char __pyx_k_DocumentStartToken[] = "DocumentStartToken";
static char __pyx_k_SequenceStartEvent[] = "SequenceStartEvent";
static char __pyx_k_get_version_string[] = "get_version_string";
static char __pyx_k_ruamel_yaml_events[] = "ruamel.yaml.events";
-static char __pyx_k_ruamel_yaml_parser[] = "ruamel.yaml.parser_";
+static char __pyx_k_ruamel_yaml_parser[] = "ruamel.yaml.parser";
static char __pyx_k_ruamel_yaml_reader[] = "ruamel.yaml.reader";
static char __pyx_k_ruamel_yaml_tokens[] = "ruamel.yaml.tokens";
static char __pyx_k_unknown_event_type[] = "unknown event type";
@@ -23189,7 +23189,7 @@ PyMODINIT_FUNC PyInit__ruamel_yaml(void)
* from ruamel.yaml.error import YAMLError
* from ruamel.yaml.reader import ReaderError # <<<<<<<<<<<<<<
* from ruamel.yaml.scanner import ScannerError
- * from ruamel.yaml.parser_ import ParserError
+ * from ruamel.yaml.parser import ParserError
*/
__pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__Pyx_GOTREF(__pyx_t_2);
@@ -23209,7 +23209,7 @@ PyMODINIT_FUNC PyInit__ruamel_yaml(void)
* from ruamel.yaml.error import YAMLError
* from ruamel.yaml.reader import ReaderError
* from ruamel.yaml.scanner import ScannerError # <<<<<<<<<<<<<<
- * from ruamel.yaml.parser_ import ParserError
+ * from ruamel.yaml.parser import ParserError
* from ruamel.yaml.composer import ComposerError
*/
__pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 19; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
@@ -23229,7 +23229,7 @@ PyMODINIT_FUNC PyInit__ruamel_yaml(void)
/* "_ruamel_yaml.pyx":20
* from ruamel.yaml.reader import ReaderError
* from ruamel.yaml.scanner import ScannerError
- * from ruamel.yaml.parser_ import ParserError # <<<<<<<<<<<<<<
+ * from ruamel.yaml.parser import ParserError # <<<<<<<<<<<<<<
* from ruamel.yaml.composer import ComposerError
* from ruamel.yaml.constructor import ConstructorError
*/
@@ -23249,7 +23249,7 @@ PyMODINIT_FUNC PyInit__ruamel_yaml(void)
/* "_ruamel_yaml.pyx":21
* from ruamel.yaml.scanner import ScannerError
- * from ruamel.yaml.parser_ import ParserError
+ * from ruamel.yaml.parser import ParserError
* from ruamel.yaml.composer import ComposerError # <<<<<<<<<<<<<<
* from ruamel.yaml.constructor import ConstructorError
* from ruamel.yaml.emitter import EmitterError
@@ -23269,7 +23269,7 @@ PyMODINIT_FUNC PyInit__ruamel_yaml(void)
__Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
/* "_ruamel_yaml.pyx":22
- * from ruamel.yaml.parser_ import ParserError
+ * from ruamel.yaml.parser import ParserError
* from ruamel.yaml.composer import ComposerError
* from ruamel.yaml.constructor import ConstructorError # <<<<<<<<<<<<<<
* from ruamel.yaml.emitter import EmitterError
diff --git a/ext/_ruamel_yaml.pyx b/ext/_ruamel_yaml.pyx
index a1b55ce..55c1e39 100644
--- a/ext/_ruamel_yaml.pyx
+++ b/ext/_ruamel_yaml.pyx
@@ -17,7 +17,7 @@ def get_version():
from ruamel.yaml.error import YAMLError
from ruamel.yaml.reader import ReaderError
from ruamel.yaml.scanner import ScannerError
-from ruamel.yaml.parser_ import ParserError
+from ruamel.yaml.parser import ParserError
from ruamel.yaml.composer import ComposerError
from ruamel.yaml.constructor import ConstructorError
from ruamel.yaml.emitter import EmitterError
diff --git a/loader.py b/loader.py
index cadaf46..10ed99f 100644
--- a/loader.py
+++ b/loader.py
@@ -7,14 +7,14 @@ __all__ = ['BaseLoader', 'SafeLoader', 'Loader', 'RoundTripLoader']
try:
from .reader import * # NOQA
from .scanner import * # NOQA
- from .parser_ import * # NOQA
+ from .parser import * # NOQA
from .composer import * # NOQA
from .constructor import * # NOQA
from .resolver import * # NOQA
except (ImportError, ValueError): # for Jython
from ruamel.yaml.reader import * # NOQA
from ruamel.yaml.scanner import * # NOQA
- from ruamel.yaml.parser_ import * # NOQA
+ from ruamel.yaml.parser import * # NOQA
from ruamel.yaml.composer import * # NOQA
from ruamel.yaml.constructor import * # NOQA
from ruamel.yaml.resolver import * # NOQA
diff --git a/parser_.py b/parser.py
index 9eb0dc6..543cca9 100644
--- a/parser_.py
+++ b/parser.py
@@ -73,18 +73,14 @@ from __future__ import absolute_import
__all__ = ['Parser', 'RoundTripParser', 'ParserError']
-try:
- from .error import MarkedYAMLError
- from .tokens import * # NOQA
- from .events import * # NOQA
- from .scanner import * # NOQA
- from .compat import utf8
-except (ImportError, ValueError): # for Jython
- from ruamel.yaml.error import MarkedYAMLError
- from ruamel.yaml.tokens import * # NOQA
- from ruamel.yaml.events import * # NOQA
- from ruamel.yaml.scanner import * # NOQA
- from ruamel.yaml.compat import utf8
+# need to have full path, as pkg_resources tries to load parser.py in __init__.py
+# only to not do anything with the package afterwards
+# and for Jython too
+from ruamel.yaml.error import MarkedYAMLError # NOQA
+from ruamel.yaml.tokens import * # NOQA
+from ruamel.yaml.events import * # NOQA
+from ruamel.yaml.scanner import * # NOQA
+from ruamel.yaml.compat import utf8 # NOQA
class ParserError(MarkedYAMLError):
diff --git a/setup.py b/setup.py
index 0f81d70..137575f 100644
--- a/setup.py
+++ b/setup.py
@@ -1,18 +1,19 @@
# # header
# coding: utf-8
-from __future__ import print_function
+from __future__ import print_function, absolute_import, division
# # __init__.py parser
import sys
import os
-import platform
+sys.path = [path for path in sys.path if path not in [os.getcwd(), '']]
+import platform # NOQA
from _ast import * # NOQA
-from ast import parse
+from ast import parse # NOQA
from setuptools import setup, Extension, Distribution # NOQA
-from setuptools.command import install_lib
+from setuptools.command import install_lib # NOQA
if __name__ != '__main__':
raise NotImplementedError('should never include setup.py')
@@ -238,7 +239,6 @@ class NameSpacePackager(object):
os.system('pip install .')
sys.exit(0)
print('error: you have to install with "pip install ."')
- o
sys.exit(1)
# If you only support an extension module on Linux, Windows thinks it
# is pure. That way you would get pure python .whl files that take