Commit 22ac4447 authored by Sandro Tosi's avatar Sandro Tosi

merge 1:1.5.1-4

parent 37d58c99
......@@ -3,26 +3,32 @@ Information for Maintainers of packages depending on python-numpy
With Numpy 1.4.1 upload in unstable, we had several packages failing
to execute due to a change in 'dtype' format (some fields were added
at the end of the data strucutre).
at the end of the data structure).
After that, we decided to provide a reliable way to specify strict
versioned depends on python-numpy by the packages depending on it, in
order to avoid similar failures in future uploads.
Currently you have two ways to do that:
* dh_numpy, that will add python-numpy versioned depends (using pydist
file information, see below) to python:Depends substvar
* dh_python2 and the pydist file shipped by python-numpy,
/usr/share/python/di st/python-numpy; you can read more out pydist
files at [1].
python-support will receive the same support for pydist as of
dh_python2, but it's not already implemented at the time or
writing. So, in case you don't want to use dh_python2, use dh_numpy
helper script.
-- Sandro Tosi <> Tue, 27 Jul 2010 23:28:11 +0200
\ No newline at end of file
python-numpy provides a debhelper tool, dh_numpy, that will add Numpy
dependencies to python:Depends substvar; what dh_numpy does is:
* if the package is arch:all, a simple dependency on 'python-numpy' is
* if the package is arch:any, two dependencies are added:
* python-numpy-abi$N, where N is the value for the current Numpy
ABI, as defined by upstream C_ABI_VERSION value;
* python-numpy (>= $VER), where VER is the minimum python-numpy
package version implementing the current Numpy API, as defined by
upstream C_API_VERSION value.
* if the package is arch:any and the '--strict' command-line option is
passed to dh_numpy, a dependency against python-numpy-api$M is
added, where M is the value for the current Numpy API, as defined by
upstream C_API_VERSION value.
The current values for API, ABI and version are available in the file
/usr/share/numpy/versions .
You should call dh_numpy regardless of the python helper you are using
in the package.
-- Sandro Tosi <> Sun, 29 Jan 2012 11:01:45 +0100
......@@ -49,6 +49,23 @@ python-numpy (1:1.6.1-1) experimental; urgency=low
-- Sandro Tosi <> Fri, 16 Sep 2011 20:02:50 +0200
python-numpy (1:1.5.1-4) unstable; urgency=low
[ Jakub Wilk ]
* Enhancement to dh_numpy: now it is able to generate dependencies also on
virtual packages matching Numpy API and ABI versions; this allows the
packages to declare less strict relationships with python-numpy, improving
the ability to handle Numpy newer versions transitions. A detailed
description of the dependencies generation is available in
README.DebianMaints file. Closes: #643873
[ Sandro Tosi ]
* debian/patches/20_sphinx_1.1.2.diff
- fix a FTBFS with Sphinx 1.1.2 due to autoindex not being allowed in a
glossary section; thanks to Jakub Wilk for the report; Closes: #655635
-- Sandro Tosi <> Wed, 01 Feb 2012 19:09:17 +0100
python-numpy (1:1.5.1-3) unstable; urgency=low
* debian/rules
......@@ -14,7 +14,7 @@ Package: python-numpy
Architecture: any
Depends: ${python:Depends}, ${shlibs:Depends}, ${misc:Depends}
Suggests: python-numpy-doc, python-numpy-dbg, python-nose (>= 0.10.1), python-dev, gfortran
Provides: ${python:Provides}, python-numpy-dev, python-f2py
Provides: ${python:Provides}, ${numpy:Provides}, python-numpy-dev, python-f2py
Description: Numerical Python adds a fast array facility to the Python language
Numpy contains a powerful N-dimensional array object, sophisticated
(broadcasting) functions, tools for integrating C/C++ and Fortran
#!/usr/bin/perl -w
# Copyright © 2010 Piotr Ożarowski <>
# Copyright © 2012 Jakub Wilk <>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
......@@ -23,24 +24,34 @@
use strict;
use Debian::Debhelper::Dh_Lib;
init(options => {
"strict" => \$dh{STRICT},
my $numpy_dep;
my %data;
open(PYDIST, '/usr/share/python/dist/python-numpy') || error("cannot read python-numpy pydist file: $!\n");
while (<PYDIST>) {
my($line) = $_;
if ($line =~ /[^\s]*\s([^;]*).*/ ) {
$numpy_dep = $1;
open(FILE, '<', '/usr/share/numpy/versions') or error("cannot read version data: $!\n");
while (<FILE>) {
next unless /^[^#]/;
my ($key, $value) = split;
$data{$key} = $value;
close FILE;
if($numpy_dep eq "") {
error ("cannot parse pydist file")
unless ($data{'abi'} and $data{'api'} and $data{'api-min-version'}) {
error("cannot parse version data file");
foreach my $package (@{$dh{DOPACKAGES}}) {
my $numpy_dep;
if (package_arch($package) eq 'all') {
$numpy_dep = 'python-numpy';
} elsif ($dh{STRICT}) {
$numpy_dep = "python-numpy-api$data{'api'}";
} else {
$numpy_dep = "python-numpy (>= $data{'api-min-version'}), python-numpy-abi$data{'abi'}";
addsubstvar($package, "python:Depends", $numpy_dep);
.TH DH_NUMPY 1 "2010-07-27" "Numpy"
.TH DH_NUMPY 1 "2012-01-29" "Numpy"
dh_numpy \- adds to python:Depends the Numpy versioned depends
dh_numpy \- adds Numpy depends to python:Depends substvar
\fBdh_numpy\fR [\fIdebhelper\ options\fR]
dh_numpy adds information about the correct versioned depends on python-numpy to python:Depends substvar.
This is needed because some Python extensions require strict versioned depends on python-numpy, and using this helper script is the easiest way to get them.
This is needed because some Python extensions require strict versioned depends on python-numpy, and using this helper script is the easiest and most consistent way to get them.
The helper script uses the information stored in /usr/share/python/dist/python-numpy to generate the Depends information; that file is also used by dh_python2 (and from dh_pysupport when implemented) to generate the same set of Depends. This script allows you to not use dh_python2 if you don't want to.
The helper script uses the information stored in /usr/share/numpy/versions, and the architecture type of the package, to generate the Depends information; for a detailed description of how the dependencies are generate, please refer to /usr/share/doc/python-numpy/README.DebianMaints .
Description: fix FTBFS with sphinx 1.1.2 because automodule is not allowed in glossary
Author: Pauli Virtanen
Forwarded: not-needed
Index: python-numpy-1.5.1/doc/source/glossary.rst
--- python-numpy-1.5.1.orig/doc/source/glossary.rst 2010-11-09 00:58:22.000000000 +0100
+++ python-numpy-1.5.1/doc/source/glossary.rst 2012-01-31 23:31:29.323501993 +0100
@@ -4,9 +4,7 @@
.. toctree::
-.. glossary::
- .. automodule:: numpy.doc.glossary
+.. automodule:: numpy.doc.glossary
......@@ -3,3 +3,4 @@
debian/dh_numpy usr/bin
debian/versions usr/share/numpy/
......@@ -66,9 +66,9 @@ override_dh_install:
rm -rf debian/python-numpy-dbg/usr/share/doc/python-numpy-dbg
dh_link usr/share/doc/python-numpy usr/share/doc/python-numpy-dbg
# create the pydist file
mkdir -p debian/python-numpy/usr/share/python/dist/
echo "numpy python-numpy (>= 1:1.6.1), python-numpy (<< 1:1.7)" > debian/python-numpy/usr/share/python/dist/python-numpy
python debian/versions.helper >> debian/python-numpy.substvars
dh_compress -X.js -Xobjects.inv -X.txt
# ABI version.
# This number must be changed every time C_ABI_VERSION changes.
# It's should be normally equal to C_ABI_VERSION - 0x1000000.
abi 9
# Minor API version.
# This number must be changed every time C_API_VERSION changes.
# It's should be normally equal to C_API_VERSION.
api 4
# Minimum version of Numpy that shares this minor API version.
# This version must be updated every time C_API_VERSION changes.
api-min-version 1:1.4.1
Check if debian/versions is sane and generate substvars for numpy:Provides.
import os
def main():
os.chdir(os.path.join(os.path.dirname(__file__), '..'))
data = {}
file = open('numpy/core/', 'r')
exec(, data)
file = open('debian/versions', 'r')
for line in file:
line = line.strip()
if not line or line.startswith('#'):
key, value = line.split(None, 1)
data[key] = value
assert data['abi'] == str(data['C_ABI_VERSION'] - 0x1000000), 'Is debian/versions up-to-date?'
assert data['api'] == str(data['C_API_VERSION']), 'Is debian/versions up-to-date?'
print 'numpy:Provides=python-numpy-abi%s, python-numpy-api%s' % (data['abi'], data['api'])
if __name__ == '__main__':
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment