Package: patsy
Version: 0.5.0+git13-g54dcf7b-1
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu eoan ubuntu-patch

Dear maintainers,

As you know, we are in the process of deprecating python2 in Debian for the
next release.  In Ubuntu, I've identified that it may be useful to
accelerate this deprecation for pandas and its reverse-dependencies, because
the pandas tests appear to have bit-rotted for python2 on one architecture,
and it would be better to remove the python2 bits rather than invest in
fixing them.

patsy is a package that build-depends on python-pandas, so I've gone ahead
and uploaded the attached patch to Ubuntu which drops the python2 module. 
python-patsy has reverse-(build-)depends of seaborn and statsmodels, whose
python2 removal bugs are filed as bug #934852 and bug #934870.  Upload of
this change to Debian should probably wait for resolution of those two bugs.

Thanks for considering,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                   https://www.debian.org/
slanga...@ubuntu.com                                     vor...@debian.org
diff -Nru patsy-0.5.0+git13-g54dcf7b/debian/compat 
patsy-0.5.0+git13-g54dcf7b/debian/compat
--- patsy-0.5.0+git13-g54dcf7b/debian/compat    2018-10-27 20:16:29.000000000 
-0700
+++ patsy-0.5.0+git13-g54dcf7b/debian/compat    2019-08-15 21:24:18.000000000 
-0700
@@ -1 +1 @@
-7
+9
diff -Nru patsy-0.5.0+git13-g54dcf7b/debian/control 
patsy-0.5.0+git13-g54dcf7b/debian/control
--- patsy-0.5.0+git13-g54dcf7b/debian/control   2018-10-27 20:16:29.000000000 
-0700
+++ patsy-0.5.0+git13-g54dcf7b/debian/control   2019-08-15 21:24:18.000000000 
-0700
@@ -4,24 +4,17 @@
 Maintainer: NeuroDebian Team <t...@neuro.debian.net>
 Uploaders: Yaroslav Halchenko <deb...@onerussian.com>, Michael Hanke 
<michael.ha...@gmail.com>
 Build-Depends: debhelper (>= 7.0.50),
-               python-all (>= 2.5),
-               python-setuptools,
-               python-numpy,
-               python-pandas,
-               python-nose,
-               python-six,
-               python-openpyxl,
+               dh-python,
                python3-all,
                python3-setuptools,
                python3-numpy,
                python3-pandas,
                python3-nose,
                python3-six,
-               python-matplotlib,
-               python-sphinx,
-               ipython,
-               ipython (>= 1.0) | ipython1x,
-X-Python-Version: >= 2.6
+               python3-matplotlib,
+               python3-sphinx,
+               ipython3,
+               ipython3 (>= 1.0) | ipython1x,
 X-Python3-Version: >= 3.2
 Standards-Version: 3.9.4
 Homepage: http://github.com/pydata/patsy
@@ -29,25 +22,10 @@
 Vcs-Git: git://github.com/neurodebian/patsy.git
 XS-Testsuite: autopkgtest
 
-Package: python-patsy
-Architecture: all
-Depends: ${misc:Depends}, ${python:Depends},
-         python-numpy,
-         python-patsy,
-Recommends: python-pandas, python-openpyxl,
-Suggests: python-patsy-doc
-Description: statistical models in Python using symbolic formulas
- patsy is a Python library for describing statistical models
- (especially linear models, or models that have a linear component)
- and building design matrices.
- .
- This package contains the Python 2 version.
-
 Package: python3-patsy
 Architecture: all
 Depends: ${misc:Depends}, ${python3:Depends},
          python3-numpy,
-         python3-patsy,
 Recommends: python3-pandas,
 Suggests: python-patsy-doc
 Description: statistical models in Python using symbolic formulas
@@ -61,7 +39,7 @@
 Architecture: all
 Section: doc
 Depends: ${misc:Depends}, libjs-jquery, libjs-underscore
-Suggests: python-patsy
+Suggests: python3-patsy
 Description: documentation and examples for patsy
  This package contains documentation and example scripts for
- python-patsy.
+ python3-patsy.
diff -Nru patsy-0.5.0+git13-g54dcf7b/debian/pycompat 
patsy-0.5.0+git13-g54dcf7b/debian/pycompat
--- patsy-0.5.0+git13-g54dcf7b/debian/pycompat  2018-10-27 20:16:29.000000000 
-0700
+++ patsy-0.5.0+git13-g54dcf7b/debian/pycompat  1969-12-31 16:00:00.000000000 
-0800
@@ -1 +0,0 @@
-2
diff -Nru patsy-0.5.0+git13-g54dcf7b/debian/python-patsy.install 
patsy-0.5.0+git13-g54dcf7b/debian/python-patsy.install
--- patsy-0.5.0+git13-g54dcf7b/debian/python-patsy.install      2018-10-27 
20:16:29.000000000 -0700
+++ patsy-0.5.0+git13-g54dcf7b/debian/python-patsy.install      1969-12-31 
16:00:00.000000000 -0800
@@ -1 +0,0 @@
-usr/lib/python2*/
diff -Nru patsy-0.5.0+git13-g54dcf7b/debian/rules 
patsy-0.5.0+git13-g54dcf7b/debian/rules
--- patsy-0.5.0+git13-g54dcf7b/debian/rules     2018-10-27 20:16:29.000000000 
-0700
+++ patsy-0.5.0+git13-g54dcf7b/debian/rules     2019-08-15 21:24:18.000000000 
-0700
@@ -4,9 +4,7 @@
 export DH_VERBOSE=1
 export http_proxy=http://127.0.0.1:9/
 
-PACKAGE2_NAME = python-patsy
 PACKAGE3_NAME = python3-patsy
-PACKAGE2_ROOT_DIR = debian/${PACKAGE2_NAME}
 PACKAGE3_ROOT_DIR = debian/${PACKAGE3_NAME}
 
 PYVERS = $(shell pyversions -vr)
@@ -17,7 +15,6 @@
 UVER := $(shell LC_ALL=C dpkg-parsechangelog | awk '/^Version:/{print $$2;}' | 
sed -e 's,-[^-]*$$,,g')
 
 # Some unittests might need to be excluded for different Python versions
-EXCLUDE_TESTS2 := 
 EXCLUDE_TESTS3.2 := 
 #--exclude "test_bootstrap_plot"
 EXCLUDE_TESTS3.3 := 
@@ -31,7 +28,7 @@
 # Mega rule
 %:
        : # Explicit build system to avoid use of all-in-1 Makefile
-       dh $@ --buildsystem=python_distutils --with python2,python3
+       dh $@ --buildsystem=pybuild --with python3
 
 python-build%:
        python$* setup.py build
@@ -43,8 +40,8 @@
        python$* setup.py install --root=$(CURDIR)/debian/tmp \
                --force --install-layout=deb
 
-override_dh_auto_install: $(PYVERS:%=python-install%) 
$(PY3VERS:%=python-install%) \
-                          ${PYVERS:%=python-test%}    ${PY3VERS:%=python-test%}
+override_dh_auto_install: $(PY3VERS:%=python-install%) \
+                          ${PY3VERS:%=python-test%}
        : # nothing more to do
 
 override_dh_clean:
@@ -56,10 +53,10 @@
        echo "backend : Agg" >| $(CURDIR)/build/matplotlibrc
        : # Run unittests here against installed patsy
        echo "$*" | grep -q '^3' && PY=3 || PY=$*; \
-       export PYTHONPATH=`/bin/ls -d $$PWD/debian/tmp/usr/lib/python$$PY/*/`; \
+       export PYTHONPATH=`/bin/ls -d $$PWD/debian/tmp/usr/lib/python3/*/`; \
        export MPLCONFIGDIR=$(CURDIR)/build HOME=$(CURDIR)/build; \
        mkdir -p build/tmp; cd build/tmp; \
-       python$* /usr/bin/nosetests -s -v $(EXCLUDE_TESTS$*) patsy;
+       python$* /usr/bin/nosetests3 -s -v $(EXCLUDE_TESTS$*) patsy;
 else
        : # Skip unittests due to nocheck
 endif
@@ -70,7 +67,7 @@
 ifneq (,$(findstring -a,$(DH_INTERNAL_OPTIONS)))
        : # not building documentation in -a
 else
-       export PYTHONPATH=`/bin/ls -d 
$$PWD/$(PACKAGE2_ROOT_DIR)/usr/lib/python$(PYVER)/*`$(IPYTHONPATH); \
+       export PYTHONPATH=`/bin/ls -d 
$$PWD/$(PACKAGE3_ROOT_DIR)/usr/lib/python$(PY3VER)/*`$(IPYTHONPATH); \
        export MPLCONFIGDIR=$(CURDIR)/build HOME=$(CURDIR)/build; \
         make -C doc html
        : # Use jquery from Debian package, so prune shipped one
diff -Nru patsy-0.5.0+git13-g54dcf7b/debian/tests/control 
patsy-0.5.0+git13-g54dcf7b/debian/tests/control
--- patsy-0.5.0+git13-g54dcf7b/debian/tests/control     2018-10-27 
20:16:29.000000000 -0700
+++ patsy-0.5.0+git13-g54dcf7b/debian/tests/control     2019-08-15 
21:24:18.000000000 -0700
@@ -1,5 +1,2 @@
-Tests: nosetests2
-Depends: python-all, python-nose, python-numpy, python-patsy, python-openpyxl, 
python-six
-
 Tests: nosetests3
 Depends: python3-all, python3-nose, python3-numpy, python3-patsy, python3-six
diff -Nru patsy-0.5.0+git13-g54dcf7b/debian/tests/nosetests2 
patsy-0.5.0+git13-g54dcf7b/debian/tests/nosetests2
--- patsy-0.5.0+git13-g54dcf7b/debian/tests/nosetests2  2018-10-27 
20:16:29.000000000 -0700
+++ patsy-0.5.0+git13-g54dcf7b/debian/tests/nosetests2  1969-12-31 
16:00:00.000000000 -0800
@@ -1,33 +0,0 @@
-#!/bin/bash
-#
-# ADT test executioner for python-* packages.
-# Should be usable with any module which uses nosetests and packaged
-# as python-MODULENAME.  To use for Python3, just symlink as nosetests3
-#
-# Version: 1.1
-#
-set -efu
-
-test_exec="$0"
-test_name=$(basename "$test_exec")
-test_path=$(readlink -f $0 | xargs dirname)
-
-# which tester to use is defined by the name
-tester=${test_name%%[0-9]}
-# Figure out for which version of Python this test runner was intended
-py_series=$(echo $test_exec | sed -e 's,.*\([0-9]\)$,\1,g')
-# Construct optional PY suffix which is empty for good old python2
-[ $py_series = '2' ] && PY='' || PY=$py_series
-
-# Figure out what is the name of the module we are testing
-py_module=$(sed -ne '/^Package: python/s,.*python-\(.*\),\1,gp' 
$test_path/../control \
-            | grep -v -e '-\(doc\|dbg\|lib\)' | head -n 1)
-
-pys="$(eval py${PY}versions -rv 2>/dev/null)"
-
-cd "$ADTTMP"
-
-for py in $pys; do
-       echo "=== python$py ==="
-    python$py /usr/bin/$tester$PY ${TESTER_ARGS:-} $py_module  2>&1
-done

Reply via email to