from pych.extern import Chapel

@Chapel(sfile="/home/safl/pychapel/module/ext/src/mymodule.chpl")
def hello_mymodule():
    return None

@Chapel()
def hello_inline():
    """
    writeln("Hello from inline.");
    """
    return None

if __name__ == "__main__":
    hello_mymodule()
    hello_inline()

from pych.extern import Chapel
import os

currentloc = os.getcwd();

# Note: depends on test living in a specific location relative to
# mymodule.chpl.  Not ideal, but also not a huge issue.
@Chapel(sfile=currentloc + "/../../../module/ext/src/mymodule.chpl")
def hello_mymodule():
    return None

@Chapel()
def hello_inline():
    """
    writeln("Hello from inline.");
    """
    return None

if __name__ == "__main__":
    hello_mymodule()
    hello_inline()

Use repository hierarchy instead of absolute path for sfile
Use repository hierarchy instead of absolute path for sfile

The test chapel.sfile-inline.py was depending on an absolute path to find the
location of a chapel file that was outside the normal sfile storage location.
The absolute location was both machine and user-specific.  I replaced the path
with a relative path that depends on the directory structure for the repository.
This allows a wider ability to successfully run this test.  It's a little
finicky, but I intend to make the test more robust later.
