anyvc /

from __future__ import with_statement
import os, sys
from commands import getoutput
from distutils.core import setup
import time

def read_readme():
    with open('docs/source/readme.rst') as f:

#XXX: anyvc should do that itself
def getversion():
    if not os.path.exists('.hg'):
        return None # not in a repository
        l = getoutput('hg id -it').split()
    except OSError, e:
        print "warning: could not establish Mercurial version: %s" % e

    while len(l) > 1 and l[-1][0].isalpha(): # remove non-numbered tags
    if l:
        version = l[-1] # latest tag or revision number
        if version.endswith('+'):
            version += time.strftime('%Y%m%d')
        return version

version = getversion()
if version:
    f = file("anyvc/", "w")
    f.write('# this file is autogenerated by\n')
    f.write('version = "%s"\n' % version)
    version = "unknown"

    version = version,
    name = 'anyvc',
    packages = [
    scripts = ['bin/vc'],

    description='Library to access any version control system.',
    license='GNU LGPL2 (or later) as published by the FSF',
    author='Ronny Pfannschmidt',
    classifiers = [
        'Intended Audience :: Developers',
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.