remove duplicated condition
authorStefan Behnel <stefan_ml@behnel.de>
Wed, 15 Aug 2012 10:47:12 +0000 (12:47 +0200)
committerStefan Behnel <stefan_ml@behnel.de>
Wed, 15 Aug 2012 10:47:12 +0000 (12:47 +0200)
Cython/Compiler/ModuleNode.py

index e976042..8cf74ae 100644 (file)
@@ -1923,7 +1923,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
             code.globalstate.get_py_string_const(
                 EncodedString(decode_filename(module_path))).cname,
             code.error_goto(self.pos)))
-        if os.path.splitext(os.path.basename(module_path))[0] == '__init__':
+        if env.is_package:
             # compiling a package => set __path__ as well
             temp = code.funcstate.allocate_temp(py_object_type, True)
             code.putln('%s = Py_BuildValue("[O]", %s); %s' % (