Skip to content

Commit

Permalink
Update installation README
Browse files Browse the repository at this point in the history
The version of sagenb shipped with recent versions of Sage is now not
ancient, so the specialized instructions on trac ticket #13121 are no
longer necessary.
  • Loading branch information
kini committed Jan 17, 2013
1 parent ae02bff commit 2638c05
Show file tree
Hide file tree
Showing 2 changed files with 81 additions and 39 deletions.
63 changes: 63 additions & 0 deletions HACKING.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
================================
Development of the Sage notebook
================================

Unlike most other parts of Sage (as of January 2013), development of
sagenb is done on a moving target, namely a git repository on GitHub.
Rather than making changes to the version of sagenb that came with your
copy of Sage, please first clone `the sagenb git repository`_ and
install it into your copy of Sage before you start coding. Details on
how to do this are as follows.

#. Install `the latest development version of Sage`_ from sagemath.org.

#. Sign up for an account at github.com, if you don't already have one,
and log in; set up your SSH keys for authentication as directed by
the instructions.

#. Create your own fork of sagenb on the GitHub website. To do this, go
to `the sagenb git repository`_ page and click on "Fork" in the
upper right corner of the webpage.

#. Clone your fork of sagenb to somewhere on your local disk, for
example ``~/src/sagenb``::

$ cd ~/src
$ git clone [email protected]:<your username>/sagenb sagenb

#. Where ``$SAGE_ROOT`` represents the base path of your Sage
installation, perform the following commands::

$ cd $SAGE_ROOT/devel
$ rm sagenb
$ ln -s ~/src/sagenb sagenb # or wherever your clone is
$ cd sagenb
$ $SAGE_ROOT/sage --python setup.py develop

#. You can also add the `sagenb`_ git repository as a remote branch
called ``upstream``::

$ git remote add upstream [email protected]:sagemath/sagenb
$ git remote update upstream

This will allow you to update your local repository as other
people's changes are merged. Such an operation might look something
like this::

$ git remote update upstream # learn what has changed
$ git checkout master # move to local master
$ git merge upstream/master # merge changes to local master

This completes the installation process. Now you can modify files in
your ``sagenb`` directory and submit your modifications to us using pull
requests on GitHub. (A full walkthrough of using git and GitHub are
beyond the scope of this file.)

If you ever need to switch to using another Sage installation for your
sagenb development, you only need to repeat step 5 with the new value of
``$SAGE_ROOT``.


.. _the sagenb git repository: http://github.com/sagemath/sagenb
.. _the latest development version of Sage:
http://sagemath.org/download-latest.html
57 changes: 18 additions & 39 deletions INSTALL.rst
Original file line number Diff line number Diff line change
@@ -1,43 +1,22 @@
=============================================
Installation of the Sage notebook from github
=============================================
The current development version of the Sage notebook is present in github.
Since this development version is not yet merged into the Sage
distribution, one needs to follow a couple of additional steps to have
a working development version of the Sage notebook.
=================================
Installation of the Sage notebook
=================================

Installation Steps
------------------
The steps one needs to follow are outlined below.
Currently, standalone usage of the Sage notebook is not supported,
though this is one of our goals for the future. For now, please use
sagenb with a copy of `Sage`_.

#. First install the latest development version of Sage from the
`sagemath`_ website.
#. Next, follow the directions in `ticket 13121`_ to upgrade your notebook
to version 0.10.1 (or the latest version).
#. Create a fork of the `sagenb`_ git repository on the github website. To
create the fork, go to `sagenb`_ and click on "Fork" on the upper right
corner of the webpage.
#. Clone your fork on to your local machine as follows. Note that the
``SAGE_ROOT`` variable below corresponds to the directory in which the
Sage distribution is present, and ``username`` is your login name in
github::
The `latest version of Sage`_ should come with a somewhat recent version
of the Sage notebook, and the `latest development version of Sage`_
a possibly more recent version.

$ cd SAGE_ROOT/devel
$ git clone [email protected]:username/sagenb.git sagenb-github
$ rm sagenb
$ ln -s sagenb-github sagenb
$ cd sagenb
$ ../../sage --python setup.py develop
Alternatively, see HACKING.rst for instructions on how to install the
truly latest, development version of sagenb into an already installed
copy of Sage. This is only recommended for people who want to modify the
code of sagenb, since the development version may be buggy or otherwise
unsuitable for daily use (standard disclaimer).

#. You can also add the `sagenb`_ git repository as a remote branch called
``upstream``::

$ git remote add upstream [email protected]:sagemath/sagenb
$ git fetch upstream

#. You are now all set to work with the development version of the Sage
notebook!

.. _sagemath: http://sagemath.org/download-latest.html
.. _`ticket 13121`: http://trac.sagemath.org/sage_trac/ticket/13121
.. _sagenb: https://github.com/sagemath/sagenb
.. _Sage: http://sagemath.org/
.. _latest version of Sage: http://sagemath.org/download.html
.. _latest development version of Sage:
http://sagemath.org/download-latest.html

0 comments on commit 2638c05

Please sign in to comment.