summaryrefslogtreecommitdiffstats
path: root/python/slugid/setup.py
blob: d7c8b328bd5e8070bf65fcfd95314aebcebf6d2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env python

import re

from codecs import open

try:
    from setuptools import setup
except ImportError:
    from distutils.core import setup

packages = [
    'slugid',
]

version = ''
with open('slugid/__init__.py', 'r') as fd:
    version = re.search(r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]',
                        fd.read(), re.MULTILINE).group(1)

if not version:
    raise RuntimeError('Cannot find version information')

setup(
    name='slugid',
    version=version,
    description='Base64 encoded uuid v4 slugs',
    author='Pete Moore',
    author_email='pmoore@mozilla.com',
    url='http://taskcluster.github.io/slugid.py',
    packages=packages,
    package_data={'': ['LICENSE', 'README.md']},
    license='MPL 2.0',
    classifiers=(
        'Intended Audience :: Developers',
        'Natural Language :: English',
        'Programming Language :: Python :: 2.7',
    ),
)