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

Ease SageNB development by providing hg commands, and extracting packages to /devel #9920

Closed
TimDumol mannequin opened this issue Sep 16, 2010 · 24 comments
Closed

Ease SageNB development by providing hg commands, and extracting packages to /devel #9920

TimDumol mannequin opened this issue Sep 16, 2010 · 24 comments

Comments

@TimDumol
Copy link
Mannequin

TimDumol mannequin commented Sep 16, 2010

Jason Grout commented on #9822 about the relative difficulty/inconvenience of developing and applying patches for SageNB as compared to Sage. This ticket should fix it.

CC: @jasongrout @kcrisman

Component: notebook

Author: Tim Dumol

Reviewer: Jason Grout

Merged: sagenb-0.8.4

Issue created by migration from https://trac.sagemath.org/ticket/9920

@TimDumol TimDumol mannequin added this to the sage-4.6 milestone Sep 16, 2010
@TimDumol TimDumol mannequin assigned jasongrout and williamstein Sep 16, 2010
@TimDumol
Copy link
Mannequin Author

TimDumol mannequin commented Sep 16, 2010

Attachment: trac_9920-sagenb-package-extraction.patch.gz

SageNB package. Extracts SageNB to $SAGE_ROOT/devel/ for ease of use.

@TimDumol
Copy link
Mannequin Author

TimDumol mannequin commented Sep 16, 2010

Attachment: trac_9920-sagelib-hg.patch.gz

Sage main library. Adds hg_sagenb.

@TimDumol
Copy link
Mannequin Author

TimDumol mannequin commented Sep 16, 2010

Author: Tim Dumol

@TimDumol
Copy link
Mannequin Author

TimDumol mannequin commented Sep 16, 2010

comment:1

Patches attached.

@TimDumol TimDumol mannequin added the s: needs review label Sep 16, 2010
@jasongrout
Copy link
Member

comment:2

Does this mean that I should be using spkg-dist to make the spkg, instead of sage -spkg?

Also, does this set things up so that changes are reflected in the running notebook server? It seems that the spkg-dist just copies the hg repository there, but the notebook install is completely different.

@TimDumol
Copy link
Mannequin Author

TimDumol mannequin commented Sep 24, 2010

Attachment: trac_9920-sagenb-package-extraction.2.patch.gz

Puts the "$SAGE_ROOT/devel/sagenb" in develop mode.

@TimDumol
Copy link
Mannequin Author

TimDumol mannequin commented Sep 24, 2010

comment:3

Replying to @jasongrout:

Does this mean that I should be using spkg-dist to make the spkg, instead of sage -spkg?

Yes. That has been the case for a long time (c.f. SPKG.txt)

Also, does this set things up so that changes are reflected in the running notebook server? It seems that the spkg-dist just copies the hg repository there, but the notebook install is completely different.

I neglected to add that. Thanks for the notification. This new patch should fix it.

@jasongrout
Copy link
Member

comment:4

Very nice! This seems to work well.

@jasongrout
Copy link
Member

Reviewer: Jason Grout

@jasongrout
Copy link
Member

comment:5

I'll start reviewing more notebook patches when this spkg is incorporated into sage!

@qed777
Copy link
Mannequin

qed777 mannequin commented Oct 3, 2010

comment:6

The extcode, sage_scripts, and sage packages use Mercurial in their spkg-installs to merge changes into an existing repository. This could be more efficient than copying every file every time. Can we do that here?

Does the new spkg-install now install SageNB two places, under site-packages and devel? Is it practical to do just the latter?

@qed777 qed777 mannequin added s: needs info and removed s: positive review labels Oct 3, 2010
@jasongrout
Copy link
Member

comment:7

Replying to @qed777:

The extcode, sage_scripts, and sage packages use Mercurial in their spkg-installs to merge changes into an existing repository. This could be more efficient than copying every file every time. Can we do that here?

Can we make a new ticket for that?

In fact, I like this approach better (backup and copy), since it plays nicely with patch queues. The merge approach messes everything up if you forgot to pop all of your patches off.

Does the new spkg-install now install SageNB two places, under site-packages and devel? Is it practical to do just the latter?

No, I don't think it installs twice (you can check the files to make sure). The setup.py develop installs under $SAGE_ROOT/devel/ and changes the site-packages folder to refer to that location.

@TimDumol
Copy link
Mannequin Author

TimDumol mannequin commented Oct 4, 2010

comment:8

Replying to @jasongrout:

Replying to @qed777:

The extcode, sage_scripts, and sage packages use Mercurial in their spkg-installs to merge changes into an existing repository. This could be more efficient than copying every file every time. Can we do that here?

Can we make a new ticket for that?

In fact, I like this approach better (backup and copy), since it plays nicely with patch queues. The merge approach messes everything up if you forgot to pop all of your patches off.

I agree with Jason.

Does the new spkg-install now install SageNB two places, under site-packages and devel? Is it practical to do just the latter?

No, I don't think it installs twice (you can check the files to make sure). The setup.py develop installs under $SAGE_ROOT/devel/ and changes the site-packages folder to refer to that location.

Actually, it does, but doing so is needed for the docs to show (static docs). We can make another ticket for that.

@jasongrout
Copy link
Member

comment:10

I think both questions were answered, so I'm setting this back to positive review. It would be fantastic if it were included in the sagenb package for the next release.

@jhpalmieri
Copy link
Member

comment:12

By the way, another issue for another ticket: updating the developer's guide to include sagenb in the list of Mercurial repositories.

@qed777
Copy link
Mannequin

qed777 mannequin commented Oct 5, 2010

comment:13

Sounds good. Thanks for the information. I'll add this to SageNB 0.8.4 at #10036.

@qed777
Copy link
Mannequin

qed777 mannequin commented Oct 5, 2010

Merged: sagenb-0.8.4

@qed777 qed777 mannequin removed the s: positive review label Oct 6, 2010
@qed777 qed777 mannequin closed this as completed Oct 6, 2010
@qed777
Copy link
Mannequin

qed777 mannequin commented Oct 7, 2010

comment:16

There's a problem with compiling from scratch, because $SAGE_ROOT/devel does not exist when sagenb-*.spkg is installed. I think doing mkdir -p will be enough.

Can someone add a new patch to fix this?

@qed777
Copy link
Mannequin

qed777 mannequin commented Oct 7, 2010

Make $SAGE_ROOT/devel on install, if necessary. Apply on top of package extraction patch.

@qed777
Copy link
Mannequin

qed777 mannequin commented Oct 7, 2010

comment:17

Attachment: trac_9920-devel_dir_fix.patch.gz

I've added a patch that I'm testing now.

@qed777
Copy link
Mannequin

qed777 mannequin commented Oct 7, 2010

comment:18

Replying to @qed777:

I've added a patch that I'm testing now.

It works.

@qed777
Copy link
Mannequin

qed777 mannequin commented Oct 7, 2010

comment:19

I think we'll need to open a new ticket for making this link

ln -sf "$SAGE_ROOT/devel/sagenb-main" "$SAGE_ROOT/devel/sagenb" 

relative. Otherwise, Sage won't start after I move/rename the root directory.

@qed777
Copy link
Mannequin

qed777 mannequin commented Oct 7, 2010

comment:20

And maybe also add python setup.py develop to SAGE_LOCAL/bin/sage-location?

@qed777
Copy link
Mannequin

qed777 mannequin commented Oct 7, 2010

comment:21

Replying to @qed777:

And maybe also add python setup.py develop to SAGE_LOCAL/bin/sage-location?

See #10097.

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

No branches or pull requests

3 participants