views:

160

answers:

1

When specifying my script file in setup.py, e.g. "script": 'pythonturtle.py', how can I specify its relative position in the file system? In my case, I need to go down two folders and then go into the "src" folder and it's in there. How do I write this in a cross-platform way?

+1  A: 

How can you speak of py2exe and cross-platform? py2exe is windows only.

As far as I know, you have to keep your setup file in the same place as your script. Or if you don't have to it is certainly a strong convention.

What you can do is define a dist_dir option so that your program gets built in the right place.

setup(
    options = {"py2exe": {"dist_dir": os.path.join("..", "foo", "bar")}},
    windows = ["pythonturtle.py"],
)
Toni Ruža