[pypy-commit] pypy default: simplify

fijal noreply at buildbot.pypy.org
Sun Jan 20 21:25:54 CET 2013


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: 
Changeset: r60250:8648b3444808
Date: 2013-01-20 22:25 +0200
http://bitbucket.org/pypy/pypy/changeset/8648b3444808/

Log:	simplify

diff --git a/rpython/rlib/parsing/test/test_pcre_regtest.py b/rpython/rlib/parsing/test/test_pcre_regtest.py
--- a/rpython/rlib/parsing/test/test_pcre_regtest.py
+++ b/rpython/rlib/parsing/test/test_pcre_regtest.py
@@ -84,8 +84,7 @@
 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")
 
diff --git a/rpython/translator/c/genc.py b/rpython/translator/c/genc.py
--- a/rpython/translator/c/genc.py
+++ b/rpython/translator/c/genc.py
@@ -131,7 +131,7 @@
         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)
 
@@ -753,7 +753,7 @@
     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


More information about the pypy-commit mailing list