-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
48 lines (40 loc) · 1.25 KB
/
setup.py
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
40
41
42
43
44
45
46
47
48
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from distutils.core import setup
import os.path
import re
me = "Morten Grunnet Buhl"
def read(fname):
with open(fname) as fd:
return fd.read()
def path(path):
if isinstance(path, list):
path = os.path.join(*path)
return os.path.realpath(os.path.join(os.path.dirname(__file__), path))
def version():
pattern = "__version__\s?=\s?.([0-9.]+)."
version, = re.findall(pattern, read(path(["di","__init__.py"])))
return version
def email(me):
return "{}(AT){}(DOT){}".format("".join([s[0].lower() for s in me.split(" ")]), "arendal", "dk")
setup(
name="python-di",
version=version(),
description="di - A Python dependency injection module",
long_description=read(path("README.rst")),
url="https:github.com/buhl/python-di",
author=me,
author_email=email(me),
license="BSD-2",
packages=["di"],
zip_safe=False,
install_requires=[],
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License :: BSD-2',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3 :: Only'
]
)