Commits

Maciej Fijalkowski committed 8648b34

simplify

Comments (0)

Files changed (2)

rpython/rlib/parsing/test/test_pcre_regtest.py

 from rpython.rlib.parsing.regexparse import make_runner, unescape
 import string
 import re
-import os
-this_dir = py.path.local(os.path.realpath(os.path.dirname(__file__)))
+this_dir = py.path.local(__file__).join('..')
 
 #py.test.skip("Still in progress")
 

rpython/translator/c/genc.py

         self.secondary_entrypoints = secondary_entrypoints
 
     def get_eci(self):
-        pypy_include_dir = py.path.local(os.path.realpath(os.path.dirname(__file__)))
+        pypy_include_dir = py.path.local(__file__).join('..')
         include_dirs = [pypy_include_dir]
         return ExternalCompilationInfo(include_dirs=include_dirs)
 
     defines['PYPY_LONGLONG_BIT'] = LONGLONG_BIT
 
 def add_extra_files(eci):
-    srcdir = py.path.local(os.path.realpath(os.path.dirname(__file__))).join('src')
+    srcdir = py.path.local(__file__).join('..', 'src')
     files = [
         srcdir / 'entrypoint.c',       # ifdef PYPY_STANDALONE
         srcdir / 'allocator.c',        # ifdef PYPY_STANDALONE