New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

install --download doesn't download dependencies #315

Closed
leknarf opened this Issue Jul 8, 2011 · 4 comments

Comments

Projects
None yet
3 participants
@leknarf

leknarf commented Jul 8, 2011

Using the --download (-d) option only downloads the explicitly requested package, but does not download any of the usual dependencies. For example, running $pip install fabric will install pycrypto, paramiko, and fabric, but $pip install -d . fabric will only download fabric itself.

Pip should download the same packages when using the --download flag as would have been installed without the flag.

Note that there is also an explicit --no-deps option. The --download mode should respect this flag if it is provided.

@hongqn

This comment has been minimized.

Show comment
Hide comment
@hongqn

hongqn Dec 24, 2011

Contributor

Maybe you could give the changeset included in #416 a look

Contributor

hongqn commented Dec 24, 2011

Maybe you could give the changeset included in #416 a look

@hongqn

This comment has been minimized.

Show comment
Hide comment
@hongqn

hongqn Jan 31, 2012

Contributor

I posted the following in #417, but this issue may be a better place to discuss. So I repost it. Sorry for the noise.

@carljm I am trying to change the behavior of --download to download dependencies. However, I meet some test case design problem. To detect what the dependencies are, I have to unpacked code in the build dir and run_egg_info() on it. Then, should I delete the unpacked source code in the clean stage?

According to pip/commands/install.py:

    if not options.no_install:
        requirement_set.cleanup_files(bundle=self.bundle)

--download option will forbid the cleanup stage. So this test case will fail because the build directory has source code unpacked there (a INITools directory was created there).

If I changed install.py to force cleanup the source code, another test case would fail, because it thinks the source dir should exist.

What behavior do you prefer for --download? Remove the unpacked source code anyway, or keep it? Or depend on if --editable exists in options?

Contributor

hongqn commented Jan 31, 2012

I posted the following in #417, but this issue may be a better place to discuss. So I repost it. Sorry for the noise.

@carljm I am trying to change the behavior of --download to download dependencies. However, I meet some test case design problem. To detect what the dependencies are, I have to unpacked code in the build dir and run_egg_info() on it. Then, should I delete the unpacked source code in the clean stage?

According to pip/commands/install.py:

    if not options.no_install:
        requirement_set.cleanup_files(bundle=self.bundle)

--download option will forbid the cleanup stage. So this test case will fail because the build directory has source code unpacked there (a INITools directory was created there).

If I changed install.py to force cleanup the source code, another test case would fail, because it thinks the source dir should exist.

What behavior do you prefer for --download? Remove the unpacked source code anyway, or keep it? Or depend on if --editable exists in options?

@carljm

This comment has been minimized.

Show comment
Hide comment
@carljm

carljm Jan 31, 2012

Contributor

@hongqn There ought to be a distinction between cleaning up the build directory and cleaning up editable source directories. I can't think of any situation where a source directory ought to be cleaned up, but yes, the build directory where the source is temporarily unpacked ought to be cleaned up.

Contributor

carljm commented Jan 31, 2012

@hongqn There ought to be a distinction between cleaning up the build directory and cleaning up editable source directories. I can't think of any situation where a source directory ought to be cleaned up, but yes, the build directory where the source is temporarily unpacked ought to be cleaned up.

@carljm

This comment has been minimized.

Show comment
Hide comment
@carljm

carljm Feb 1, 2012

Contributor

Fixed with merge of #443. Thanks @hongqn!

Contributor

carljm commented Feb 1, 2012

Fixed with merge of #443. Thanks @hongqn!

@carljm carljm closed this Feb 1, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment