Skip to content
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

document how to set tmpdir #4262

Closed
petrelharp opened this issue Feb 1, 2017 · 13 comments · Fixed by #4944
Closed

document how to set tmpdir #4262

petrelharp opened this issue Feb 1, 2017 · 13 comments · Fixed by #4944
Labels
auto-locked Outdated issues that have been locked by automation good first issue A good item for first time contributors to work on type: docs Documentation related

Comments

@petrelharp
Copy link

  • Pip version: 9.0.1
  • Python version: 3.5.3
  • Operating system: Linux

Description:

My /tmp directory is on a partition without enough space to build a (big) package. From the documentation (and unfamiliarity with pip) I expected that specifying --build to another directory would move all of pip's temporary building activity to that directory:

pip3 install --build /lots/of/space thepackage

Of course, it did not.

Eventually I found out that setting TMPDIR to the desired directory would do it (in bash).

I recommend providing an option to specify the tmpdir, or (maybe better) saying something in the documentation about how to do this. Perhaps, by adding to the documentation for --build something like perhaps: "The initial build will still take place in an OS-specified temporary directory (change this by setting TMPDIR)."

@xavfernandez xavfernandez added type: docs Documentation related good first issue A good item for first time contributors to work on labels Feb 2, 2017
@Riyuzakii
Copy link

hey @xavfernandez i would like to fix this, could you guide me through this. ("First Timer on Github ")

@xavfernandez
Copy link
Member

@Riyuzakii, sorry for the delay.

I don't know how much you know about git, github, sphinx and tox but you'll have to:

  • fork pip
  • clone your fork
  • create a new git branch
  • update the documentation (in the docs directory)
  • install tox to build the documentation via tox -e docs
  • check the result in docs/_build/html/
  • commit your change and push it to your fork
  • finally open a pull request against pip master branch.

Let me know if you need clarification.

@1byxero
Copy link
Contributor

1byxero commented Oct 25, 2017

if its not fixed yet, i would like to take it up!

@pradyunsg
Copy link
Member

Hi @1byxero! Go ahead. @xavfernandez wrote a summary above.

Ping me by mentioning me on this issue if you need help. :)

@1byxero
Copy link
Contributor

1byxero commented Oct 26, 2017

So, if i understand the issue right, the issue is about providing a parameter for custom temp directory is not documented, but the is implemented.
And to fix it, all i need to do is add that in documentation.

Is that right?
@pradyunsg

@pradyunsg
Copy link
Member

Indeed.

As I understand, a documentation-only fix for this would be to add note to the documentation of
--build that the TMPDIR environment variable has to be used to change the location of temporary builds that pip does.

@1byxero
Copy link
Contributor

1byxero commented Oct 30, 2017

And i think the changes should be made to pip_install.rst i.e this file
Right?
@pradyunsg

@pradyunsg
Copy link
Member

pradyunsg commented Nov 1, 2017

I'd prefer that they are made in the help text for --build (as an additional statement in help text) and in the file you've linked to. :)

help='Directory to unpack packages into and build in.'

@1byxero
Copy link
Contributor

1byxero commented Nov 22, 2017

@pradyunsg Hey, So to fix the issue I added the following text in the help argument of -build option and using tox to build the preview automatically added the same text in the documentation.

Initial build would still take place in direcotry set by TMPDIR environment variable. To change this behavior, set appropriate directory by setting TMPDIR environment variable

So basically I changed

build_dir = partial(
    Option,
    '-b', '--build', '--build-dir', '--build-directory',
    dest='build_dir',
    metavar='dir',
    help="Directory to unpack packages into and build in."
)  # type: Any

to

build_dir = partial(
    Option,
    '-b', '--build', '--build-dir', '--build-directory',
    dest='build_dir',
    metavar='dir',
    help="Directory to unpack packages into and build in. "
         "Initial build would still take place in direcotry set by TMPDIR "
         "environment variable, (TEMP on windows) To change this behavior,"
         "set appropriate directory by setting TMPDIR environment variable"
)  # type: Any

I think thats enough to solve the issue, if not please let me know what else should i change before committing and creating a PR

@pfmoore
Copy link
Member

pfmoore commented Nov 22, 2017

On Windows it would be the TEMP environment variable, not TMPDIR, I guess...

@1byxero
Copy link
Contributor

1byxero commented Dec 11, 2017

@pfmoore Have updated, Thanks for the help :)
@xavfernandez @pradyunsg Should i go ahead and create a PR?

@pradyunsg
Copy link
Member

@1byxero Go ahead. :)

@lock
Copy link

lock bot commented Jun 2, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 2, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation good first issue A good item for first time contributors to work on type: docs Documentation related
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants