setup.py
author Simon Heimberg <simohe@besonet.ch>
Mon, 15 Oct 2012 23:28:45 +0200
branchstable
changeset 1216 192cebcd59a0
parent 238 e4a389eca1b9
permissions -rw-r--r--
tests: inform on Windows about unnecessary glob lines When glob lines directly match on windows, "/" (and not "\") was output in the path on the line. No glob matching is necessary in this case. The test output will look like this (when 5 tests have passed and no 4 has an unnecessary glob): ... Info, unnecessary glob: info about some/thing (glob) .. [ original upstream message ]

#!/usr/bin/env python
# $Id$

from distutils.core import setup
import os, time

# specify version, Mercurial version otherwise
version = ''

unknown_version = 'unknown'

def getversion():
    global version, unknown_version
    if not version and os.path.isdir('.hg'):
        p = os.popen('hg --quiet identify 2> %s' % os.devnull)
        ident = p.read()[:-1]
        if not p.close() and ident:
            if ident[-1] != '+':
                version = ident
            else:
                version = ident[:-1]
                version += time.strftime('+%Y%m%d')
    return version or unknown_version

setup(name='hgkw',
      version=getversion(),
      description='Mercurial keyword extension (standalone)',
      author='Christian Ebert',
      author_email='blacktrash@gmx.net',
      url='http://www.blacktrash.org/hg/hgkeyword/',
      license='GNU GPL',
      packages=['hgkw'])