Skip to content

#9e2609 broke deploying from subdirectories #287

Open
@okey

Description

@okey

Commit #9e2609, after 2.5.1 and before 2.6.0, refactored how creating setup.py was handled and in doing so removed a side effect that allowed deploying from project subdirectories to work.

Previously, there was an os.chdir call in _build_egg() in deploy.py on line 170. Removing this caused the run_python call to fail if shub deploy is issued from a subdirectory (e.g. the spiders subdirectory). Note the previous working directory was never restored in the old version of this function.

To fix this, we must also fix reading requirements files in _upload_egg() because this will also fail the working directory is incorrect.

There are a few ways to fix this and I'm not certain which is best. Perhaps explicitly changing to the project directory at the start of deploy_cmd() would be appropriate?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions