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

Pip should be able to retain the build directory #2053

Closed
horrovac opened this issue Sep 19, 2014 · 4 comments

Comments

Projects
None yet
4 participants
@horrovac
Copy link

commented Sep 19, 2014

When a build fails, pip automatically removes all the build files. This should not happen, or there should at least be an option to instruct pip to leave it alone. In many cases the build files provide useful info for troubleshooting, which gets lost for no good reason. Currently, if I want to troubleshoot I have to go find the sources, unpack them somewhere, repeat the build process correctly to reproduce the failure - just to recreate something that was already there. I propose to automatically delete the build files ONLY if the build was successful, otherwise warn and inform the user where the build is. On next run of pip the old build could be automatically deleted or left to the user to take care of. Or: provide a flag, say, --keep-build , which would enable users to request the desirable behaviour.

@dstufft

This comment has been minimized.

Copy link
Member

commented Sep 19, 2014

pip install --no-clean ?

@dstufft dstufft closed this Sep 19, 2014

@dstufft dstufft reopened this Sep 19, 2014

@horrovac

This comment has been minimized.

Copy link
Author

commented Sep 19, 2014

Dangit. Perhaps make this request rather "point out pip <action> --help in pip --help". May seem obvious once you know it, but obviously it's not :)

Thanks, that's exactly what I meant.

@gwideman

This comment has been minimized.

Copy link

commented Sep 23, 2014

... except that --no-clean doesn't seem to work, as I have now posted in issue #2060.

@qwcode

This comment has been minimized.

Copy link
Contributor

commented Sep 25, 2014

--no-clean is working in most cases. #2060 was really a dupe of #804, which deals with installing directly from local archives.

@horrovac fair point I guess about the help. if you feel strongly about it, log another ticket for that or post a PR with the change in the help text.

closing.

@qwcode qwcode closed this Sep 25, 2014

vbraun added a commit to vbraun/sage that referenced this issue Sep 24, 2016

Trac #21480: Make sagelib setup.py self-contained and independent of …
…SAGE_ROOT

This ticket changes the build process of sagelib in the following way:
 - `src/Makefile` delegates ALL building to `src/setup.py`
 - `src/setup.py` no longer depends on environment variables
`$SAGE_ROOT`, `$SAGE_SRC`, `$SAGE_DOC_SRC` etc. (to demonstrate this,
`Makefile` poisons these environment variables). It still depends on
`$SAGE_LOCAL` and environment variables that point below it.

This ticket is meant as:
 - preparation for VPATH builds of sage-the-distribution (#21469)
 - working towards the goal of making `sagelib` pip-installable -- see
#21507 for the eventual goal of having sagelib on PyPI
 - making the flow of directory information at build time clearer for
developers

 More specifically, the goal of this ticket is that only SAGE_LOCAL
needs to be set when the user does 'pip install' of the sagelib. (This
ticket almost achieves this, except it also needs SAGE_PKGS and
SAGE_CYTHONIZED to be set. The hope is that #20382 and other future
tickets will develop better mechanisms to communicate package and
directory information to the build.)

. . . . . . .

Some possibly useful information:
 - Documentation on distutils (https://docs.python.org/2/install/),
describing use of `--build-base` to do VPATH builds.
 - `pip install` keeps the source directory clean, building instead in a
temporary directory, by copying the sources.
 `pip install` also offers options `--build` to select a build
directory, but there are some pip issues:
[pypa/pip#2060 2060],
[pypa/pip#2053 2053],
[pypa/pip#804 804] that affect this
 - #14807 has some tricks to making VPATH builds work without copying
all python source files. But it uses automake instead of setup.py; we
will not do this in our ticket.

URL: https://trac.sagemath.org/21480
Reported by: mkoeppe
Ticket author(s): Matthias Koeppe
Reviewer(s): Jeroen Demeyer

vbraun added a commit to vbraun/sage that referenced this issue Oct 11, 2016

Trac #21480: Make sagelib setup.py self-contained and independent of …
…SAGE_ROOT

This ticket changes the build process of sagelib in the following way:
 - `src/Makefile` delegates ALL building to `src/setup.py`
 - `src/setup.py` no longer depends on environment variables
`$SAGE_ROOT`, `$SAGE_SRC`, `$SAGE_DOC_SRC` etc. (to demonstrate this,
`Makefile` poisons these environment variables). It still depends on
`$SAGE_LOCAL` and environment variables that point below it.

This ticket is meant as:
 - preparation for VPATH builds of sage-the-distribution (#21469)
 - working towards the goal of making `sagelib` pip-installable -- see
#21507 for the eventual goal of having sagelib on PyPI
 - making the flow of directory information at build time clearer for
developers

 More specifically, the goal of this ticket is that only SAGE_LOCAL
needs to be set when the user does 'pip install' of the sagelib. (This
ticket almost achieves this, except it also needs SAGE_PKGS and
SAGE_CYTHONIZED to be set. The hope is that #20382 and other future
tickets will develop better mechanisms to communicate package and
directory information to the build.)

. . . . . . .

Some possibly useful information:
 - Documentation on distutils (https://docs.python.org/2/install/),
describing use of `--build-base` to do VPATH builds.
 - `pip install` keeps the source directory clean, building instead in a
temporary directory, by copying the sources.
 `pip install` also offers options `--build` to select a build
directory, but there are some pip issues:
[pypa/pip#2060 2060],
[pypa/pip#2053 2053],
[pypa/pip#804 804] that affect this
 - #14807 has some tricks to making VPATH builds work without copying
all python source files. But it uses automake instead of setup.sh; we
will not do this in our ticket.

'''configure tarball''':
http://sage.ugent.be/www/jdemeyer/sage/configure-185.tar.gz

URL: https://trac.sagemath.org/21480
Reported by: mkoeppe
Ticket author(s): Matthias Koeppe
Reviewer(s): Jeroen Demeyer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.