[Python-modules-commits] r22591 - in packages/python-networkx/trunk/debian (3 files)

morph at users.alioth.debian.org morph at users.alioth.debian.org
Tue Aug 28 16:03:48 UTC 2012


    Date: Tuesday, August 28, 2012 @ 16:03:47
  Author: morph
Revision: 22591

* debian/{control, rules}
  - provide Python 3 package; Closes: #597422

Modified:
  packages/python-networkx/trunk/debian/changelog
  packages/python-networkx/trunk/debian/control
  packages/python-networkx/trunk/debian/rules

Modified: packages/python-networkx/trunk/debian/changelog
===================================================================
--- packages/python-networkx/trunk/debian/changelog	2012-08-28 09:19:37 UTC (rev 22590)
+++ packages/python-networkx/trunk/debian/changelog	2012-08-28 16:03:47 UTC (rev 22591)
@@ -4,8 +4,10 @@
     - updated intersphinx mapping files
   * debian/rules
     - reorganize build and test targets
+  * debian/{control, rules}
+    - provide Python 3 package; Closes: #597422
 
- -- Sandro Tosi <morph at debian.org>  Tue, 28 Aug 2012 11:06:24 +0200
+ -- Sandro Tosi <morph at debian.org>  Tue, 28 Aug 2012 18:03:21 +0200
 
 python-networkx (1.7-1) experimental; urgency=low
 

Modified: packages/python-networkx/trunk/debian/control
===================================================================
--- packages/python-networkx/trunk/debian/control	2012-08-28 09:19:37 UTC (rev 22590)
+++ packages/python-networkx/trunk/debian/control	2012-08-28 16:03:47 UTC (rev 22591)
@@ -4,9 +4,10 @@
 Maintainer: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
 Uploaders: Sandro Tosi <morph at debian.org>
 Build-Depends: debhelper (>= 7.0.50~)
-Build-Depends-Indep: python-all (>= 2.3.5-11), python-support (>= 1), python-setuptools (>= 0.6a9), python-nose (>= 0.10.1), python-sphinx (>= 1.0.7+dfsg), zip, texlive-latex-base, texlive-binaries, python-matplotlib, texlive-latex-recommended, texlive-latex-extra, texlive-fonts-recommended, python-pygraphviz, dvipng, python-numpy, python-scipy
+Build-Depends-Indep: python-all (>= 2.3.5-11), python3-all, python-support (>= 1), python-setuptools (>= 0.6a9), python-nose (>= 0.10.1), python-sphinx (>= 1.0.7+dfsg), zip, texlive-latex-base, texlive-binaries, python-matplotlib, texlive-latex-recommended, texlive-latex-extra, texlive-fonts-recommended, python-pygraphviz, dvipng, python-numpy, python-scipy, python3-scipy, python3-setuptools, python3-nose
 Standards-Version: 3.9.3
 XS-Python-Version: >= 2.6
+X-Python3-Version: >= 3.2
 Homepage: http://networkx.lanl.gov/
 Vcs-Svn: svn://svn.debian.org/python-modules/packages/python-networkx/trunk/
 Vcs-Browser: http://svn.debian.org/viewsvn/python-modules/packages/python-networkx/trunk/
@@ -28,6 +29,26 @@
  The potential audience for NetworkX includes: mathematicians, physicists,
  biologists, computer scientists, social scientists.
 
+Package: python3-networkx
+Architecture: all
+Depends: ${misc:Depends}, ${python3:Depends}
+Recommends: python3-numpy, python3-scipy, python3-pkg-resources, python3-yaml
+#Recommends: python-pygraphviz | python-pydot, python-matplotlib
+Description: tool to create, manipulate and study complex networks (Python3)
+ NetworkX is a Python-based package for the creation, manipulation, and
+ study of the structure, dynamics, and functions of complex networks.
+ .
+ The structure of a graph or network is encoded in the edges (connections,
+ links, ties, arcs, bonds) between nodes (vertices, sites, actors). If
+ unqualified, by graph it's meant a simple undirected graph, i.e. no
+ self-loops and no multiple edges are allowed. By a network it's usually
+ meant a graph with weights (fields, properties) on nodes and/or edges.
+ .
+ The potential audience for NetworkX includes: mathematicians, physicists,
+ biologists, computer scientists, social scientists.
+ .
+ This package contains the Python 3 version of NetworkX.
+
 Package: python-networkx-doc
 Section: doc
 Architecture: all

Modified: packages/python-networkx/trunk/debian/rules
===================================================================
--- packages/python-networkx/trunk/debian/rules	2012-08-28 09:19:37 UTC (rev 22590)
+++ packages/python-networkx/trunk/debian/rules	2012-08-28 16:03:47 UTC (rev 22591)
@@ -1,10 +1,13 @@
 #!/usr/bin/make -f
 
 DEBIANDOC_DIR=$(CURDIR)/debian/python-networkx/usr/share/doc/python-networkx
-PYLIBPATH := $(shell python -c "from distutils.command.build import build ; from distutils.core import Distribution ; b = build(Distribution()) ; b.finalize_options() ; print b.build_platlib")
+LIB2 := $(shell python -c "from distutils.command.build import build ; from distutils.core import Distribution ; b = build(Distribution()) ; b.finalize_options() ; print b.build_platlib")
+LIB3 := $(shell python3 -c "from distutils.command.build import build ; from distutils.core import Distribution ; b = build(Distribution()) ; b.finalize_options() ; print (b.build_platlib)")
+PYTHON2 := $(shell pyversions -r)
+PYTHON3 := $(shell py3versions -r)
 
 %:
-	dh $@ --with sphinxdoc
+	dh $@ --with sphinxdoc,python3
 
 override_dh_auto_clean:
 	dh_auto_clean
@@ -25,15 +28,20 @@
 	dh_auto_build
 
 	# build doc, run in a separate shell, so we can export MPLCONFIGDIR
-	(export MPLCONFIGDIR=. ; make -C doc dist PYTHONPATH=../$(PYLIBPATH))
+	(export MPLCONFIGDIR=. ; make -C doc dist PYTHONPATH=../$(LIB2))
 
 override_dh_auto_test:
 ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
 	set -e ; \
 	# running tests
-	for py in $(shell pyversions -r) ; do\
-		PYTHONPATH=$(PYLIBPATH) $$py setup_egg.py nosetests ; \
+	for py in $(PYTHON2) ; do\
+		PYTHONPATH=$(LIB2) $$py setup_egg.py nosetests ; \
 	done
+	set -e ; \
+	# running tests Python 3
+	for py in $(PYTHON3) ; do\
+		PYTHONPATH=$(LIB3) $$py setup_egg.py nosetests ; \
+	done
 endif
 
 override_dh_install:
@@ -41,11 +49,23 @@
 	# Install egg-info directories (--single-... option)
 	python setup_egg.py install --no-compile --root=$(CURDIR)/debian/python-networkx \
 		--single-version-externally-managed --install-layout=deb
+	python3 setup_egg.py install --no-compile --root=$(CURDIR)/debian/python3-networkx \
+		--single-version-externally-managed --install-layout=deb
 
 	# Fix executable bits:
 	chmod +x debian/python-networkx/usr/lib/`pyversions -d`/*-packages/networkx/tests/test.py
+	chmod +x debian/python3-networkx/usr/lib/*/*-packages/networkx/tests/test.py
 	find debian/python-networkx -name '*.bz2' -exec chmod a-x {} ';'
 
+	# fix test shebang
+	sed 's|/usr/bin/env python|/usr/bin/python3|' -i debian/python3-networkx/usr/lib/*/*-packages/networkx/tests/test.py
+
+	# remove duplicate examples
+	rm -rf debian/python3-networkx/usr/share/doc/python-networkx
+
+	# don't ship python 2 code for _decorator because it can't be byte-compiled
+	rm -f debian/python3-networkx/usr/lib/python3/dist-packages/networkx/external/decorator/_decorator.py
+
 	# Do some cleanup: delete unneeded files:
 	rm $(DEBIANDOC_DIR)/INSTALL.txt $(DEBIANDOC_DIR)/LICENSE.txt
 




More information about the Python-modules-commits mailing list