forked from pipermerriam/django-emailtools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
52 lines (40 loc) · 1.21 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
49
50
51
52
#!/usr/bin/env python
from setuptools import setup, find_packages
import subprocess
import os
import sys
__doc__ = """
App for Django featuring class based email sending
"""
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
install_requires = [
'Django>=2.0',
'markdown',
]
if sys.version.startswith("2.6"):
install_requires.append("importlib")
STAGE = 'final'
version = (0, 3, 1, STAGE)
def get_version():
number = '.'.join(map(str, version[:3]))
stage = version[3]
if stage == 'final':
return number
elif stage == 'alpha':
process = subprocess.Popen('git rev-parse HEAD'.split(), stdout=subprocess.PIPE)
stdout, stderr = process.communicate()
return number + '-' + stdout.strip()[:8]
setup(
name='django-emailtools',
version=get_version(),
description=__doc__,
long_description=read('README.rst'),
packages=[package for package in find_packages() if package.startswith('emailtools')],
url="https://django-emailtools.readthedocs.org/en/latest/",
author="Fusionbox",
author_email='[email protected]',
install_requires=install_requires,
zip_safe=False,
include_package_data=True,
)