#11678: sage-4.7 gives error on relocating the root directory
--------------------------+-------------------------------------------------
Reporter: ppurka | Owner: tdb
Type: defect | Status: new
Priority: minor | Milestone: sage-4.7.2
Component: relocation | Keywords: flask notebook easy-install.pth
easy_install
Work_issues: | Upstream: N/A
Reviewer: | Author:
Merged: | Dependencies:
--------------------------+-------------------------------------------------
Changes (by leif):
* keywords: => flask notebook easy-install.pth easy_install
Comment:
Replying to [comment:13 rkirov]:
> I don't understand python's setuptools, but I haven't hardcoded the path
anywhere. My guess is that doing "python setup.py develop" does that. Once
flask becomes a proper spkg this should go away (hopefully).
In SageNB, we use
{{{
#!sh
python setup.py develop --egg-path ../../../../devel/sagenb
}}}
but that apparently doesn't always work, so I hacked SageNB's `spkg-dist`
which creates its `spkg-install`:
{{{
#!sh
...
cd "$SAGE_ROOT/local/lib/python/site-packages"
...
if ! grep sagenb easy-install.pth >/dev/null; then
# Ugly work-around, we haven't found the real cause yet (see #10176):
echo "No sagenb path found in 'easy-install.pth'"'!'
echo "Adding relative sagenb path to 'easy-install.pth'..."
sed -e '$ i \../../../../devel/sagenb' easy-install.pth > easy-
install.pth.$$
if [ $? -ne 0 ]; then
echo >&2 "Error adding relative sagenb path to 'easy-
install.pth'."
exit 1
fi
else
echo "Making sagenb path in 'easy-install.pth' relative..."
sed 's/^.*sagenb.*$/..\/..\/..\/..\/devel\/sagenb/' easy-install.pth >
easy-install.pth.$$
if [ $? -ne 0 ]; then
echo >&2 "Error patching 'easy-install.pth' to have relative path
to SageNB."
exit 1
fi
fi
...
# The following fails only on wrong file permissions etc.:
mv -f easy-install.pth.$$ easy-install.pth
if [ $? -ne 0 ]; then
echo >&2 "Error overwriting original 'easy-install.pth'."
exit 1
fi
...
}}}
(IIRC the trouble with ''a completely missing'' `sagenb` path was caused
by having `SAGE_PATH` set to "`.`", but I'm not sure.)
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11678#comment:14>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.