~ubuntu-branches/ubuntu/oneiric/python-distutils-extra/oneiric

« back to all changes in this revision

Viewing changes to DistUtilsExtra/auto.py

  • Committer: Bazaar Package Importer
  • Author(s): Martin Pitt
  • Date: 2010-05-09 11:19:47 UTC
  • Revision ID: james.westby@ubuntu.com-20100509111947-uodszo5jgfv1sit0
Tags: 2.19
* auto.py: Also recognize Qt .ui files if they start with an "<?xml..."
  first line. (LP: #543707)
* test/auto.py: Check that automatic translation extraction also works for
  extensionless files and single quotation marks. (Side discussion in
  LP #533565)
* test/auto.py: Check that scripts explicitly mentioned in "data_files" and
  "scripts" are covered by the automatic POTFILES.in generation. This
  reproduces LP #533565.
* auto.py: Include scripts in setup.py's data_files into potential
  POTFILES.in candidates. (LP: #533565)
* debian/control: Swap maintainer (me) and uploaders (Sebastian), since I'm
  the de-facto maintainer now.
* debian/control: Replace python-all-dev build dependency with python-all,
  which is enough. Also wrap build dependencies.
* Add debian/source/format: 3.0 (native).
* setup.py: Grab version from DistUtilsExtra/auto.py instead of duplicating
  and hardcoding it.
* python_mkdebian: Add --version option.
* Move primary __version__ definition to DistUtilsExtra/__init__.py, where
  it makes more sense than just in the auto module.
* Add debian/local/python-mkdebian.1. (Closes: #546266)
* Add debian/python-distutils-extra.manpages to install the new manpage.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
author, license, etc.) in ./setup.py.
35
35
'''
36
36
 
37
 
__version__ = '2.18'
38
 
 
39
37
# (c) 2009 Canonical Ltd.
40
38
# Author: Martin Pitt <martin.pitt@ubuntu.com>
41
39
 
43
41
import compiler # TODO: deprecated
44
42
import distutils.core
45
43
 
 
44
from DistUtilsExtra import __version__ as __pkgversion
46
45
from DistUtilsExtra.command import *
47
46
import distutils.dir_util
48
47
import distutils.command.clean
50
49
import distutils.command.install
51
50
import distutils.filelist
52
51
 
 
52
__version__ = __pkgversion
 
53
 
53
54
# FIXME: global variable, to share with build_i18n_auto
54
55
src = {}
55
56
src_all = {}
557
558
                # find extensionless executable scripts which are Python files, and
558
559
                # generate a temporary *.py alias, so that they get caught by
559
560
                # intltool
560
 
                for f in src_all:
 
561
                for f in reduce(lambda x, y: x.union(y[1]), self.distribution.data_files, src_all):
561
562
                    f_py = f + '.py'
562
563
                    if os.access(f, os.X_OK) and os.path.splitext(f)[1] == '' and \
563
564
                            not os.path.exists(f_py):
669
670
                    os.unlink(os.path.join(self.root, f))
670
671
                except OSError:
671
672
                    pass
672
 
 
 
673
            if not self.root:
 
674
                self.root = ''
673
675
            distutils.dir_util.copy_tree('etc', os.path.join(self.root, 'etc'),
674
676
                    preserve_times=0, preserve_symlinks=1, verbose=1)
675
677