Bug#919974: NMU, patch

2019-02-12 Thread Hilko Bengen
* Nicholas D Steeves:

> Thank you for taking care of this, but what happened to this upload?
> I didn't see the updated yapf in NEW, and the upload does not appear
> in any logs (wRAR checked for me).

Apparently, I had not actually made the upload. Now I have.

Cheers,
-Hilko



Bug#919974: NMU, patch

2019-02-12 Thread Nicholas D Steeves
Hi Hilko,

On Sat, Feb 09, 2019 at 06:34:07PM +0100, Hilko Bengen wrote:
> user debian-rele...@lists.debian.org  
>   
> usertag 919974 + bsp-2019-02-de-berlin
> thank you
> 
> Dear maintainers,
> 
> Greetings from the BSP at the DCSO office in Berlin.
> 
> I have NMU'd yapf/0.25.0-2.1 to unstable, re-adding the yapf,
> python-yapf packages. I have chosen not to place it into a DELAYED
> slot:
> 
> - The upload needs to go through the NEW queue again and we are pretty
>   close to the freeze.

Thank you for taking care of this, but what happened to this upload?
I didn't see the updated yapf in NEW, and the upload does not appear
in any logs (wRAR checked for me).

Cheers,
Nicholas


signature.asc
Description: PGP signature


Bug#919974: NMU, patch

2019-02-09 Thread Hilko Bengen
user debian-rele...@lists.debian.org
usertag 919974 + bsp-2019-02-de-berlin
thank you

Dear maintainers,

Greetings from the BSP at the DCSO office in Berlin.

I have NMU'd yapf/0.25.0-2.1 to unstable, re-adding the yapf,
python-yapf packages. I have chosen not to place it into a DELAYED
slot:

- The upload needs to go through the NEW queue again and we are pretty
  close to the freeze.

- The solution to this bug seems obvious as migrating all the reverse
  dependencies to Python3-only in time for the freeze is not feasible.

- The last uploader did not act on this bug within the last 15 days.

My patches are attached.

Cheers,
-Hilko
>From 4fcac9c97186da7904f397ca84dc6cb21b89930c Mon Sep 17 00:00:00 2001
From: Hilko Bengen 
Date: Sat, 9 Feb 2019 18:11:48 +0100
Subject: [PATCH 1/3] Revert removal of Python2 support (Closes: #919974)

---
 debian/control | 32 +++-
 debian/rules   |  5 -
 2 files changed, 35 insertions(+), 2 deletions(-)

diff --git a/debian/control b/debian/control
index 6ebc357..e86d9f4 100644
--- a/debian/control
+++ b/debian/control
@@ -3,12 +3,42 @@ Section: python
 Priority: optional
 Maintainer: Ana Custura 
 Uploaders: Debian Python Modules Team 
-Build-Depends: debhelper (>=12),dh-python,python3-all,python3-setuptools,python3-nose,python3-pkg-resources
+Build-Depends: debhelper (>=12),dh-python,python-all,python-setuptools,python3-all,python3-setuptools,python-nose,python3-nose,python-pkg-resources,python3-pkg-resources
 Standards-Version: 4.3.0
 Homepage: https://github.com/google/yapf
 Vcs-Git: https://salsa.debian.org/python-team/modules/yapf.git
 Vcs-Browser: https://salsa.debian.org/python-team/modules/yapf
 
+Package: python-yapf
+Architecture: all
+Depends: ${misc:Depends},
+ ${python:Depends},
+ python-pkg-resources
+Breaks: yapf (<< 0.19.0-1~)
+Replaces: yapf (<< 0.19.0-1~)
+Description: public modules for yapf (Python 2)
+ Yapf is a tool that reformats code to the best formatting that conforms to the
+ style guide. It is not only concerned with lint errors, but also with the
+ styilistic appearance of Python code. The idea is also similar to the 'gofmt'
+ tool for the Go programming language. This package installs the tool for Python
+ 2.
+ .
+ This package provides the modules for Python 2.
+
+Package: yapf
+Architecture: all
+Depends: ${misc:Depends},
+ ${python:Depends},
+ python-yapf (= ${binary:Version})
+Description: Python code formatter for different styles (Python 2)
+ Yapf is a tool that reformats code to the best formatting that conforms to the
+ style guide. It is not only concerned with lint errors, but also with the
+ styilistic appearance of Python code. The idea is also similar to the 'gofmt'
+ tool for the Go programming language. This package installs the tool for Python
+ 2.
+ .
+ This package provides the command-line interface for Python 2.
+
 Package: python3-yapf
 Architecture: all
 Depends: ${misc:Depends},
diff --git a/debian/rules b/debian/rules
index 15ff663..b63c75a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -2,13 +2,16 @@
 #export DH_VERBOSE = 1
 
 export PYBUILD_NAME=yapf
+export PYBUILD_DESTDIR_python2=debian/python-${PYBUILD_NAME}
 export PYBUILD_DESTDIR_python3=debian/python3-${PYBUILD_NAME}
 export PYBUILD_TEST_NOSE=1
+export PYBUILD_TEST_ARGS_python2=--exclude "yapftests.pytree_unwrapper_test.MatchBracketsTest"
 export PYBUILD_TEST_ARGS_python3=-e "testStronglyConnected" -e "testAsyncAsNonKeyword" -e "testListComprehensionPreferThreeLinesForLineWrap"
 %:
-	dh $@  --with python3 --buildsystem=pybuild --verbose
+	dh $@  --with python2,python3 --buildsystem=pybuild --verbose
 
 override_dh_auto_install:
 	dh_auto_install
+	dh_movefiles --package=yapf --sourcedir=$(PYBUILD_DESTDIR_python2) usr/bin
 	dh_movefiles --package=yapf3 --sourcedir=$(PYBUILD_DESTDIR_python3) usr/bin
 	(cd $(CURDIR)/debian/yapf3 && mv ./usr/bin/yapf ./usr/bin/yapf3)
-- 
2.19.1

>From 13a56289167c9a0a21ff1a67b66cf5384b386655 Mon Sep 17 00:00:00 2001
From: Hilko Bengen 
Date: Sat, 9 Feb 2019 18:17:58 +0100
Subject: [PATCH 2/3] Re-add yapf documentation files

---
 debian/yapf.docs | 1 +
 debian/yapf.manpages | 1 +
 2 files changed, 2 insertions(+)
 create mode 100644 debian/yapf.docs
 create mode 100644 debian/yapf.manpages

diff --git a/debian/yapf.docs b/debian/yapf.docs
new file mode 100644
index 000..30d8556
--- /dev/null
+++ b/debian/yapf.docs
@@ -0,0 +1 @@
+*.rst
diff --git a/debian/yapf.manpages b/debian/yapf.manpages
new file mode 100644
index 000..fafe023
--- /dev/null
+++ b/debian/yapf.manpages
@@ -0,0 +1 @@
+debian/yapf.1
-- 
2.19.1

>From 8d666fa2b61627d2689b6cd3bddf4f23ea062cb7 Mon Sep 17 00:00:00 2001
From: Hilko Bengen 
Date: Sat, 9 Feb 2019 18:18:38 +0100
Subject: [PATCH 3/3] Debian release 0.25.0-2.1

---
 debian/changelog | 8 
 1 file changed, 8 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index