Enhancements to Python's distutils

quickly fail submitubuntu and package --extras commands

Reported by Andrea De Gaetano on 2012-07-06
32
This bug affects 6 people
Affects Status Importance Assigned to Milestone
python-distutils-extra
Undecided
Didier Roche
python-distutils-extra (Ubuntu)
Undecided
Unassigned
Precise
Undecided
Unassigned

Bug Description

[Test case]
1. Install the new version from -proposed
2. run qiuckly package from it
-> no warning should appear on the command line.

[ Potential Regression ]
This is a regression from the previous -proposed version. It basically rollback the behavior for python2. Added automated test for it.

Yesterday, my quickly worked with the libglib2.0-bin bug.. the workaround was easy, editing debian/control file...

Some hours ago I saw an update for the package, that fixed this problem... but after updating quickly I got a new bug:

-Created a new project

crazycoder@VBox:~$ quickly create ubuntu-application testme
Creating project directory testme
Creating bzr repository and committing
Launching your newly created project!
/usr/lib/python2.7/dist-packages/gi/overrides/Gtk.py:391: Warning: g_object_set_property: construct property "type" for object `Window' can't be set after construction
  Gtk.Window.__init__(self, type=type, **kwds)
/usr/lib/python2.7/dist-packages/gi/overrides/Gtk.py:391: Warning: g_object_set_property: construct property "type" for object `TestmeWindow' can't be set after construction
  Gtk.Window.__init__(self, type=type, **kwds)
Congrats, your new project is setup! cd /home/crazycoder/testme/ to start hacking.
crazycoder@VBox:~$ cd testme/
crazycoder@VBox:~/testme$ ls
AUTHORS bin data help setup.py testme testme.desktop.in testme_lib tests
crazycoder@VBox:~/testme$ quickly package --extras
...
Command returned some WARNINGS:
----------------------------------
WARNING: syntax errors in bin/testme: encoding declaration in Unicode string (testme, line 0)
WARNING: syntax errors in testme/__init__.py: encoding declaration in Unicode string (__init__.py, line 0)
WARNING: syntax errors in testme_lib/Builder.py: encoding declaration in Unicode string (Builder.py, line 0)
WARNING: syntax errors in testme_lib/testmeconfig.py: encoding declaration in Unicode string (testmeconfig.py, line 0)
WARNING: syntax errors in testme_lib/helpers.py: encoding declaration in Unicode string (helpers.py, line 0)
WARNING: syntax errors in testme_lib/Window.py: encoding declaration in Unicode string (Window.py, line 0)
WARNING: syntax errors in testme/PreferencesTestmeDialog.py: encoding declaration in Unicode string (PreferencesTestmeDialog.py, line 0)
WARNING: syntax errors in testme/AboutTestmeDialog.py: encoding declaration in Unicode string (AboutTestmeDialog.py, line 0)
WARNING: syntax errors in testme_lib/AboutDialog.py: encoding declaration in Unicode string (AboutDialog.py, line 0)
WARNING: syntax errors in testme_lib/__init__.py: encoding declaration in Unicode string (__init__.py, line 0)
WARNING: syntax errors in testme_lib/PreferencesDialog.py: encoding declaration in Unicode string (PreferencesDialog.py, line 0)
WARNING: syntax errors in testme/TestmeWindow.py: encoding declaration in Unicode string (TestmeWindow.py, line 0)
----------------------------------
Do you want to continue (this is not safe!)? y/[n]: y
Traceback (most recent call last):
  File "/usr/share/quickly/templates/ubuntu-application/package.py", line 83, in <module>
    if packaging.updatepackaging(no_changelog=True, installopt=for_extras) != 0:
  File "/usr/share/quickly/templates/ubuntu-application/internal/packaging.py", line 322, in updatepackaging
    update_rules()
  File "/usr/share/quickly/templates/ubuntu-application/internal/packaging.py", line 260, in update_rules
    " debhelper (>= 6), libglib2.0-bin,")
  File "/usr/lib/python2.7/dist-packages/quickly/templatetools.py", line 137, in update_file_content
    raise CantUpdateFile(_("%s was not found in the file %s.") % (start_marker, ftarget_file_name.name))
quickly.templatetools.CantUpdateFile: debhelper (>= 6), was not found in the file /home/crazycoder/testme/debian/control.
ERROR: package command failed
Aborting

except for the encoding problem.... it looks like there is a problem in packaging.py file.
quickly submitubuntu
seems to produce the same problem.

this is my quickly version..

crazycoder@VBox:~/testme$ quickly --version
Quickly 12.04
  Python interpreter: /usr/bin/python 2.7.3
  Python standard library: /usr/lib/python2.7

  Quickly used library: /usr/lib/python2.7/dist-packages/quickly
  Quickly data path: /usr/share/quickly
  Quickly detected template directories:
          /usr/share/quickly/templates/

Copyright 2009 Rick Spencer
Copyright 2009-2011 Didier Roche
Copyright 2010-2011 Canonical Ltd
https://launchpad.net/quickly

quickly comes with ABSOLUTELY NO WARRANTY. quickly is free software, and
you may use, modify and redistribute it under the terms of the GNU
General Public License version 3 or later.

Kazade (kazade) wrote :

This is preventing competition entries being submitted as part of the Ubuntu App Showdown (which closes tomorrow)... it's pretty urgent!

Changed in quickly:
status: New → Confirmed
David Planella (dpm) wrote :

Don't worry, if a Quickly bug is preventing any entry from getting in, we'll make sure next week that they do get in, no need to panic :)

If you open a terminal, could you tell us the output of this command and paste it as a comment?

apt-cache policy python-distutils-extra

Thanks!

tags: added: arb
David Planella (dpm) wrote :

For the record, you can still use the workaround to package your app.

Also, you might find this useful: http://askubuntu.com/a/160775/9781

Changed in quickly:
status: Confirmed → Incomplete
Kazade (kazade) wrote :

@David

kazade@Hydrogen:~/Bzr/tickit$ apt-cache policy python-distutils-extra
python-distutils-extra:
  Installed: 2.33-0ubuntu0.1
  Candidate: 2.33-0ubuntu0.1
  Version table:
 *** 2.33-0ubuntu0.1 0
        500 http://archive.ubuntu.com/ubuntu/ precise-proposed/main amd64 Packages
        100 /var/lib/dpkg/status
     2.32-2 0
        500 http://archive.ubuntu.com/ubuntu/ precise/main amd64 Packages

The problem exists because the line in debian/control is actually:

Build-Depends: debhelper (>= 8),

The code is looking for debhelper (>=6)

David Planella (dpm) wrote :

It seems this is caused by the python-distutils-extra version in precise-proposed, and not due to Quickly. If you downgrade python-distutils-extra to the stable version, it should work fine. Could you please try that and report back?

Kazade (kazade) wrote :

@David That seems to have fixed it :D

fioan89@gmail.com (fioan89) wrote :

David how did you douwngraded? I tried sudo apt-get install python-distutils-extra=2.21 but it doesn't work!
Thank you!

fioan89@gmail.com (fioan89) wrote :

Doesn't matter ,I found how to do it.For anyone else having this problem just:sudo apt-get install python-distutils-extra=2.32-2 and it will be done
Thank you again!

Andrea De Gaetano (dega1999) wrote :

it works now! many thanks!

Didier Roche (didrocks) on 2012-07-09
affects: quickly → python-distutils-extra
Changed in python-distutils-extra:
assignee: nobody → Didier Roche (didrocks)
status: Incomplete → Triaged
description: updated
Didier Roche (didrocks) on 2012-07-09
Changed in python-distutils-extra:
status: Triaged → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package python-distutils-extra - 2.34-1

---------------
python-distutils-extra (2.34-1) unstable; urgency=low

  [ Martin Pitt ]
  * debian/rules: Run Python3 tests under C locale, to expose more unicode
    errors.
  * auto.py: Fix *.ui detection to be robust for non-ASCII files.
    (LP: #1017468)

  [ Didier Roche ]
  * auto.py: Fix a regression with python2 if files have some utf-8 directives
    (LP: #1021969)
 -- Martin Pitt <email address hidden> Mon, 09 Jul 2012 11:12:38 +0200

Changed in python-distutils-extra (Ubuntu):
status: New → Fix Released
Didier Roche (didrocks) wrote :

I put the quickly crash

Didier Roche (didrocks) wrote :

I put the quickly crash as a separate concern on bug #1022514. Fixing now :)

Hello Andrea, or anyone else affected,

Accepted python-distutils-extra into precise-proposed. The package will build now and be available at http://launchpad.net/ubuntu/+source/python-distutils-extra/2.34-0ubuntu0.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please change the bug tag from verification-needed to verification-done. If it does not, change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in python-distutils-extra (Ubuntu Precise):
status: New → Fix Committed
tags: added: verification-needed
tags: added: verification-done
removed: verification-needed
Andrea De Gaetano (dega1999) wrote :

I can confirm that the new update works fine!

Markus Lanner (markus-lanner) wrote :

Can confirm too, that no downgrade of python-distutils-extra is necessary no more. quickly submitubuntu works perfectly now... good work!

Launchpad Janitor (janitor) wrote :
Download full text (3.5 KiB)

This bug was fixed in the package python-distutils-extra - 2.34-0ubuntu0.1

---------------
python-distutils-extra (2.34-0ubuntu0.1) precise-proposed; urgency=low

  * Backport some fixes from latest release (and a regression fix):
    - debian/rules: Run Python3 tests under C locale, to expose more unicode
      errors.
    - auto.py: Fix *.ui detection to be robust for non-ASCII files.
      (LP: #1017468)
    - auto.py: Fix a regression with python2 if files have some utf-8 directives
      (LP: #1021969)

python-distutils-extra (2.34-1) unstable; urgency=low

  [ Martin Pitt ]
  * debian/rules: Run Python3 tests under C locale, to expose more unicode
    errors.
  * auto.py: Fix *.ui detection to be robust for non-ASCII files.
    (LP: #1017468)

  [ Didier Roche ]
  * auto.py: Fix a regression with python2 if files have some utf-8 directives
    (LP: #1021969)

python-distutils-extra (2.33-0ubuntu0.1) precise-proposed; urgency=low

  * Backport 2.33-1 to precise as an SRU (LP: #1020017):
    - auto.py: Fix crash when encountering binary files with Python 3.
      (LP: #995653)
    - auto.py: Fix crash when encountering an UTF-8 Python source code file.
    - debian/local/python-mkdebian cleanups: (LP: #706051)
      - Don't use {XS, XB}-Python-Version.
      - Generate an up to date Standards-Version.
      - Generate build dep on debhelper (>= 8) as debian/compat is set to '8'
        and debhelper overrides are used.
      - No need to generate a build dep on cdbs.
    - debian/local/python-mkdebian: For projects using --prefix, install
      binaries into a .../bin/ subdirectory instead of into the main project
      directory. This avoids potential name collisions with local Python
      modules. Thanks to Michael Terry for the patch!
    - debian/local/python-mkdebian: Create copyright format 1.0 compatible
      copyright files. Thanks Andrew Starr-Bochicchio! (LP: #1002379)
    - debian/copyright: Update to copyright 1.0 format.
    - debian/control: Bump Standards-Version to 3.9.3.
    - python-mkdebian: Fix wrong kde4 ui file detection regular expression.
      Thanks Angelo Compagnucci! (LP: #1002076)

python-distutils-extra (2.33-1) unstable; urgency=low

  * auto.py: Fix crash when encountering binary files with Python 3.
    (LP: #995653)
  * auto.py: Fix crash when encountering an UTF-8 Python source code file.

python-distutils-extra (2.32-5) unstable; urgency=low

  [ Andrew Starr-Bochicchio ]
  * debian/local/python-mkdebian cleanups: (LP: #706051)
    - Don't use {XS, XB}-Python-Version.
    - Generate an up to date Standards-Version.
    - Generate build dep on debhelper (>= 8) as debian/compat is set to '8'
      and debhelper overrides are used.
    - No need to generate a build dep on cdbs.

  [ Martin Pitt ]
  * debian/local/python-mkdebian: For projects using --prefix, install
    binaries into a .../bin/ subdirectory instead of into the main project
    directory. This avoids potential name collisions with local Python
    modules. Thanks to Michael Terry for the patch!

python-distutils-extra (2.32-4) unstable; urgency=low

  * debian/local/python-mkdebian: Create copyright format 1.0 compatible
    copyright fi...

Read more...

Changed in python-distutils-extra (Ubuntu Precise):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers