should be callable from an arbitrary directory

Create issue
Issue #294 resolved
Antoine Pitrou created an issue

Right now running from another directory fails, which is mildly annoying:

{{{ (env) [antoine@localhost env]$ python ~/distribute/ build Traceback (most recent call last): File "/home/antoine/distribute/", line 14, in <module> for line in open(""): FileNotFoundError: [Errno 2] No such file or directory: '' }}}

Comments (5)

  1. Jason R. Coombs
    • changed status to open

    I am aware of several aspects that expect the script to be run from the current directory. The patch is probably appropriate. Arfrever - can you add a unit test and changelog entry?

  2. Jason R. Coombs

    Also to consider - does distutils make the same assumption (that the script is run from its directory)?

    And if we change the current working directory, should we change back to the original directory after running?

  3. Arfrever Frehtes Taifersar Arahesis

    The change is in of Distribute itself, not in installed code, so a unit test does not make sense.

    distutils makes the same assumption.

    os.chdir() changes current directory for Python process, not parent shell process.

  4. Log in to comment