-
-
Notifications
You must be signed in to change notification settings - Fork 487
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
Make python support SAGE_SPKG_INSTALL_DOCS #10831
Comments
This comment has been minimized.
This comment has been minimized.
comment:2
See comments on #10828 I wonder if it might be sensible to create a new package called - python-documentation-1.0.spkg in order to resolve this circular dependency problem. That new python-documentation-1.0.spkg gets built after both python and sphinx are built. This package then copies the contents of the python package from the python.spkg, extracts it, then builds only the documentation - not all of Python if at all possible. Otherwise, the build will fail for sure for everyone, which is off-putting to newcomers, even if old hands know how to get around the problem. The ability to type 'make' then go away and leave it will be lost if the build fails on this each time. dave |
comment:3
I see your note that's its impossible to build just the docs for Python. Another option, which would be quicker is to
Somehow I think we should automate this, so Python's documentation gets built without manual intervention. It can't be rocket science to do this. If the worst comes to the worst, just build Python twice if Dave |
comment:4
Yes, I suppose worst-case is just adding a python-docs target to the deps file that builds python again after sphinx is installed. A slightly better case is adding a python-docs target that defines an environment variable SAGE_PYTHON_BUILD=no or something and then re-installs the python spkg. Then modify the python spkg to check for that variable and not actually build python if that variable is no. |
comment:5
Replying to @jasongrout:
That's quite easy to do.
Ideally though we don't want the user to have to mess with that environment variable. I think this can be automated. As long as there's not an issue with hard-coded paths (which may make the documentation useless if Sage is moved), then I think a temporary tar file is the best solution, as it will save a lot of time. Python is a big package to build twice if it is unnecessary. This needs a bit of thought, and its late here, so I'm going to bed. Dave |
comment:7
Replying to @sagetrac-drkirkby:
Yep. I'm thinking that the python-docs target will
The user won't ever have to deal with that environment variable---it's all behind the scenes. |
comment:8
(note that the makefile wouldn't export SAGE_SPKG_PYTHON_BUILD, but would do the equivalent of |
comment:9
I'm a little lost in the deps file. I've attached a patch which I think does what we want (add a new target that reinstalls the python spkg, but with a local variable set so that python isn't actually rebuilt). Comments, David? |
Attachment: 10831-deps.patch.gz Apply to deps (probably needs to be redone after #9433) |
apply to the spkg/install file |
comment:10
Attachment: 10831-install.patch.gz Okay, I think I made the necessary changes to the deps and install file. The assumption is that the file |
comment:11
See #11197 for building docs after Sage is built. |
Changed author from Jason Grout to none |
comment:16
outdated, should close |
Reviewer: Dima Pasechnik |
This is a bit tricky since we need sphinx and other things installed before we can build the docs, but sphinx and the other things depend on python. To resolve this circular dependency, we try to import sphinx. If we can't import sphinx, then we exit without error with a message that you should install sphinx and related tools first and then try building the docs again. This means that in order to use the environment variable, you have to install the python spkg twice, since we don't have an option to just build docs without building python. But maybe that's worth it for someone that just wants the python docs.
The new spkg is here: http://sage.math.washington.edu/home/jason/python-2.6.4.p10.spkg
Component: packages: standard
Reviewer: Dima Pasechnik
Issue created by migration from https://trac.sagemath.org/ticket/10831
The text was updated successfully, but these errors were encountered: