[Python-modules-commits] r25988 - in packages/python-memprof/trunk/debian (5 files)
vicho at users.alioth.debian.org
vicho at users.alioth.debian.org
Sun Sep 29 12:46:49 UTC 2013
Date: Sunday, September 29, 2013 @ 12:46:47
Author: vicho
Revision: 25988
fix build of python3 by dropping the requires on argparse
Added:
packages/python-memprof/trunk/debian/patches/deb_specific__dont_require_argparse.patch
packages/python-memprof/trunk/debian/patches/from_upstream__run_the_example_when_asked_to_run_tests.patch
packages/python-memprof/trunk/debian/patches/from_upstream__testsuite_is_now_independent.patch
Modified:
packages/python-memprof/trunk/debian/control
packages/python-memprof/trunk/debian/patches/series
Modified: packages/python-memprof/trunk/debian/control
===================================================================
--- packages/python-memprof/trunk/debian/control 2013-09-29 12:18:20 UTC (rev 25987)
+++ packages/python-memprof/trunk/debian/control 2013-09-29 12:46:47 UTC (rev 25988)
@@ -14,6 +14,8 @@
Homepage: http://jmdana.github.io/memprof/
Vcs-Svn: svn://anonscm.debian.org/python-modules/packages/python-memprof/trunk/
Vcs-Browser: http://anonscm.debian.org/viewvc/python-modules/packages/python-memprof/trunk/
+X-Python-Version: >= 2.7
+X-Python3-Version: >= 3.3
Package: python-memprof
Architecture: any
Added: packages/python-memprof/trunk/debian/patches/deb_specific__dont_require_argparse.patch
===================================================================
--- packages/python-memprof/trunk/debian/patches/deb_specific__dont_require_argparse.patch (rev 0)
+++ packages/python-memprof/trunk/debian/patches/deb_specific__dont_require_argparse.patch 2013-09-29 12:46:47 UTC (rev 25988)
@@ -0,0 +1,19 @@
+Author: Javi Merino <vicho at debian.org>
+Description: don't require argparse
+ It's included in python by default in >= 2.7 and >= 3.2 . It
+ confuses dh_python3 and it's not really needed for Debian, so just
+ drop the requiremenet.
+
+--- a/setup.py
++++ b/setup.py
+@@ -81,8 +81,8 @@ setup(
+ "License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
+ ],
+ ext_modules=[getsize],
+- requires=['argparse','matplotlib','cython'],
+- install_requires=['argparse','matplotlib','cython'],
++ requires=['matplotlib','cython'],
++ install_requires=['matplotlib','cython'],
+ provides=['memprof'],
+ )
+
Added: packages/python-memprof/trunk/debian/patches/from_upstream__run_the_example_when_asked_to_run_tests.patch
===================================================================
--- packages/python-memprof/trunk/debian/patches/from_upstream__run_the_example_when_asked_to_run_tests.patch (rev 0)
+++ packages/python-memprof/trunk/debian/patches/from_upstream__run_the_example_when_asked_to_run_tests.patch 2013-09-29 12:46:47 UTC (rev 25988)
@@ -0,0 +1,74 @@
+From 14585b8ae5a18ea3437b76de1211053e8d1f0287 Mon Sep 17 00:00:00 2001
+From: Javi Merino <cibervicho at gmail.com>
+Date: Thu, 26 Sep 2013 21:08:04 +0100
+Subject: [PATCH] run the example when asked to run tests
+
+memprof doesn't have a proper testsuite but this is at least a test.
+If you run "python setup.py test" it runs the example with the current
+code, which is handy.
+---
+ memprof/memprof.py | 1 +
+ memprof/test.py | 26 ++++++++++++++++++++++++++
+ setup.py | 1 +
+ 3 files changed, 28 insertions(+)
+ create mode 100644 memprof/test.py
+
+diff --git a/memprof/memprof.py b/memprof/memprof.py
+index 5fa00eb..ad6013f 100755
+--- a/memprof/memprof.py
++++ b/memprof/memprof.py
+@@ -25,6 +25,7 @@ import types
+
+ from .mp_utils import *
+ from .getsize import getSize, isInteresting
++from .test import Test
+
+ def memprof(*args, **kwargs):
+ def inner(func):
+diff --git a/memprof/test.py b/memprof/test.py
+new file mode 100644
+index 0000000..ddef041
+--- /dev/null
++++ b/memprof/test.py
+@@ -0,0 +1,26 @@
++# Copyright (c) 2013 Javi Merino
++#
++# This file is part of memprof.
++#
++# memprof is free software: you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation (version 3 of the License only).
++#
++# memprof is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++# GNU General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with memprof. If not, see <http://www.gnu.org/licenses/>.
++
++import unittest
++import os
++import sys
++
++class Test(unittest.TestCase):
++ # Rough test: just run the example
++ def test_demo(self):
++ examples_path = os.path.join(os.getcwd(), "examples")
++ sys.path.append(examples_path)
++ import demo
+diff --git a/setup.py b/setup.py
+index 2d7a813..998c03a 100644
+--- a/setup.py
++++ b/setup.py
+@@ -84,6 +84,7 @@ setup(
+ requires=['argparse','matplotlib','cython'],
+ install_requires=['argparse','matplotlib','cython'],
+ provides=['memprof'],
++ test_suite = "memprof.Test",
+ )
+
+ print("\n\n")
+--
+1.8.4.rc3
+
Added: packages/python-memprof/trunk/debian/patches/from_upstream__testsuite_is_now_independent.patch
===================================================================
--- packages/python-memprof/trunk/debian/patches/from_upstream__testsuite_is_now_independent.patch (rev 0)
+++ packages/python-memprof/trunk/debian/patches/from_upstream__testsuite_is_now_independent.patch 2013-09-29 12:46:47 UTC (rev 25988)
@@ -0,0 +1,115 @@
+From 8726362166733c1dc96cc0e1cd08699131626437 Mon Sep 17 00:00:00 2001
+From: "J.M. Dana" <jmdana at gmail.com>
+Date: Fri, 27 Sep 2013 00:34:30 +0100
+Subject: [PATCH] testsuite is now independent. test1 imports the demo in the
+ examples directory (and therefore generates the logfiles in there).
+
+---
+ memprof/memprof.py | 1 -
+ memprof/test.py | 26 --------------------------
+ setup.py | 2 +-
+ testsuite/__init__.py | 0
+ testsuite/test1.py | 29 +++++++++++++++++++++++++++++
+ 5 files changed, 30 insertions(+), 28 deletions(-)
+ delete mode 100644 memprof/test.py
+ create mode 100644 testsuite/__init__.py
+ create mode 100644 testsuite/test1.py
+
+diff --git a/memprof/memprof.py b/memprof/memprof.py
+index ad6013f..5fa00eb 100755
+--- a/memprof/memprof.py
++++ b/memprof/memprof.py
+@@ -25,7 +25,6 @@ import types
+
+ from .mp_utils import *
+ from .getsize import getSize, isInteresting
+-from .test import Test
+
+ def memprof(*args, **kwargs):
+ def inner(func):
+diff --git a/memprof/test.py b/memprof/test.py
+deleted file mode 100644
+index ddef041..0000000
+--- a/memprof/test.py
++++ /dev/null
+@@ -1,26 +0,0 @@
+-# Copyright (c) 2013 Javi Merino
+-#
+-# This file is part of memprof.
+-#
+-# memprof is free software: you can redistribute it and/or modify
+-# it under the terms of the GNU General Public License as published by
+-# the Free Software Foundation (version 3 of the License only).
+-#
+-# memprof is distributed in the hope that it will be useful,
+-# but WITHOUT ANY WARRANTY; without even the implied warranty of
+-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-# GNU General Public License for more details.
+-#
+-# You should have received a copy of the GNU General Public License
+-# along with memprof. If not, see <http://www.gnu.org/licenses/>.
+-
+-import unittest
+-import os
+-import sys
+-
+-class Test(unittest.TestCase):
+- # Rough test: just run the example
+- def test_demo(self):
+- examples_path = os.path.join(os.getcwd(), "examples")
+- sys.path.append(examples_path)
+- import demo
+diff --git a/setup.py b/setup.py
+index 998c03a..d95942a 100644
+--- a/setup.py
++++ b/setup.py
+@@ -84,7 +84,7 @@ setup(
+ requires=['argparse','matplotlib','cython'],
+ install_requires=['argparse','matplotlib','cython'],
+ provides=['memprof'],
+- test_suite = "memprof.Test",
++ test_suite = "testsuite",
+ )
+
+ print("\n\n")
+diff --git a/testsuite/__init__.py b/testsuite/__init__.py
+new file mode 100644
+index 0000000..e69de29
+diff --git a/testsuite/test1.py b/testsuite/test1.py
+new file mode 100644
+index 0000000..0c9787a
+--- /dev/null
++++ b/testsuite/test1.py
+@@ -0,0 +1,29 @@
++# Copyright (c) 2013 Javi Merino
++#
++# This file is part of memprof.
++#
++# memprof is free software: you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation (version 3 of the License only).
++#
++# memprof is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
++# GNU General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with memprof. If not, see <http://www.gnu.org/licenses/>.
++
++import unittest
++import os
++import sys
++
++class Test(unittest.TestCase):
++ # Rough test: just run the example
++ def test_demo(self):
++ root = os.getcwd()
++ examples_path = os.path.join(os.getcwd(), "examples")
++ sys.path.append(examples_path)
++ os.chdir(examples_path)
++ import demo
++ os.chdir(root)
+--
+1.8.4.rc3
+
Modified: packages/python-memprof/trunk/debian/patches/series
===================================================================
--- packages/python-memprof/trunk/debian/patches/series 2013-09-29 12:18:20 UTC (rev 25987)
+++ packages/python-memprof/trunk/debian/patches/series 2013-09-29 12:46:47 UTC (rev 25988)
@@ -1 +1,2 @@
from_upstream__no_tornado_nose.patch
+deb_specific__dont_require_argparse.patch
More information about the Python-modules-commits
mailing list