summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Borassi <michele.borassi@imtlucca.it>2015-07-27 10:06:08 +0200
committerMichele Borassi <michele.borassi@imtlucca.it>2015-07-28 12:42:54 +0200
commite09511fbfb3747c6d7bf5604e03c926aa27a9ab4 (patch)
tree4cc0468769ec880a9958341fdf3d0fc96db8664c
parentSmall correction in the documentation (diff)
Modified spkg-src according to Nathann's suggestions.
-rw-r--r--build/pkgs/python_igraph/checksums.ini6
-rw-r--r--build/pkgs/python_igraph/dependencies5
-rwxr-xr-xbuild/pkgs/python_igraph/spkg-src47
3 files changed, 41 insertions, 17 deletions
diff --git a/build/pkgs/python_igraph/checksums.ini b/build/pkgs/python_igraph/checksums.ini
index 3aeeb21..4535473 100644
--- a/build/pkgs/python_igraph/checksums.ini
+++ b/build/pkgs/python_igraph/checksums.ini
@@ -1,4 +1,4 @@
tarball=python_igraph-VERSION.tar.gz
-sha1=faf9bdb2083a893b34e3f70ae332ed361da3d1b9
-md5=1bfb3317b9fc23e8c5c10bdeb37a4c93
-cksum=146006935
+sha1=7a54b45586d0c00adadcaf336e9c61dbbed037dd
+md5=f69a508b0e697eedb91300e1502e8c9f
+cksum=156187639
diff --git a/build/pkgs/python_igraph/dependencies b/build/pkgs/python_igraph/dependencies
new file mode 100644
index 0000000..a23b62d
--- /dev/null
+++ b/build/pkgs/python_igraph/dependencies
@@ -0,0 +1,5 @@
+$(INST)/$(IGRAPH)
+
+----------
+All lines of this file are ignored except the first.
+It is copied by SAGE_ROOT/build/make/install into SAGE_ROOT/build/make/Makefile.
diff --git a/build/pkgs/python_igraph/spkg-src b/build/pkgs/python_igraph/spkg-src
index 44c3d51..a8ee005 100755
--- a/build/pkgs/python_igraph/spkg-src
+++ b/build/pkgs/python_igraph/spkg-src
@@ -4,24 +4,43 @@
# python-igraph-0.7.0.tar.gz into python_igraph-0.7.0.tar.gz, and it modifies
# the name of the top folder accordingly.
-if [ -e upstream/python_igraph-0.7.0.tar.gz ]
+
+if [ -z "$SAGE_ROOT" -o -z "$SAGE_DISTFILES" ]; then
+ echo >&2 "\$SAGE_ROOT or \$SAGE_DISTFILES undefined ... exiting";
+ echo >&2 "Maybe run 'sage -sh'?"
+ exit 1
+fi
+
+PKG_DIR="$SAGE_ROOT/build/pkgs/python_igraph/"
+VERSION=$(cat "$PKG_DIR/package-version.txt")
+PYTHONIGRAPH=python-igraph-$VERSION
+PYTHONIGRAPHMOD=python_igraph-$VERSION
+
+set -e
+shopt -s extglob
+
+if [ -e $SAGE_ROOT/upstream/$PYTHONIGRAPHMOD-$VERSION.tar.gz ]
then
echo "The modified .tar file already exists."
exit
fi
-if [ -e upstream/python-igraph-0.7.0.tar.gz ]
+# work in a temporary directory
+cd $(mktemp -d)
+
+mkdir src
+cd src
+
+tar xzf <( curl -L "igraph.org/nightly/get/python/$PYTHONIGRAPH.tar.gz" )
+
+if [ -e $PYTHONIGRAPH ]
then
- tar -zxf upstream/python-igraph-0.7.0.tar.gz -C local/var/tmp/sage/build/
- cd local/var/tmp/sage/build
- mv python-igraph-0.7.0 python_igraph-0.7.0
- tar -zcf python_igraph-0.7.0.tar.gz python_igraph-0.7.0
- rm -rf python_igraph-0.7.0
- cd ../../../../..
- mv local/var/tmp/sage/build/python_igraph-0.7.0.tar.gz upstream/python_igraph-0.7.0.tar.gz
- rm upstream/python-igraph-0.7.0.tar.gz
- ./sage -sh sage-fix-pkg-checksums
- echo "Correctly modified .tar file."
+ mv $PYTHONIGRAPH $PYTHONIGRAPHMOD
+ tar -zcf $PYTHONIGRAPHMOD.tar.gz $PYTHONIGRAPHMOD
+ mv $PYTHONIGRAPHMOD.tar.gz $SAGE_ROOT/upstream/python_igraph-$VERSION.tar.gz
+ echo "Correctly downloaded/modified file .tar file."
else
- echo "File python-igraph-0.7.0.tar.gz not found in folder upstream."
-fi \ No newline at end of file
+ echo "Cannot find file $PYTHONIGRAPH.tar.gz."
+fi
+cd ..
+rm -rf src \ No newline at end of file