-
Notifications
You must be signed in to change notification settings - Fork 39
/
setup.py
58 lines (50 loc) · 1.84 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
53
54
55
56
57
58
import os
import sys
from setuptools import setup, find_packages
from affiliate import __author__, __version__
def __read(fname):
try:
return open(os.path.join(os.path.dirname(__file__), fname)).read()
except IOError:
return ''
if sys.argv[-1] == 'publish':
os.system('pandoc --from=markdown --to=rst --output=README.rst README.md')
os.system('pandoc --from=markdown --to=rst --output=HISTORY.rst HISTORY.md')
os.system('python setup.py sdist upload')
os.system('python setup.py bdist_wheel upload')
sys.exit()
if sys.argv[-1] == 'generate_rst':
os.system('pandoc --from=markdown --to=rst --output=README.rst README.md')
os.system('pandoc --from=markdown --to=rst --output=HISTORY.rst HISTORY.md')
sys.exit()
if sys.argv[-1] == 'tag':
print("Tagging the version on github:")
os.system("git tag -a v%s -m 'version %s'" % (__version__, __version__))
os.system("git push --tags")
sys.exit()
install_requires = __read('requirements.txt').split()
setup(
name='django-affiliate',
author=__author__,
author_email='[email protected]',
version=__version__,
description='Affiliate system for django',
long_description=__read('README.rst') + '\n\n' + __read('HISTORY.rst'),
platforms=('Any'),
packages=find_packages(),
install_requires=install_requires,
keywords='django affiliate urls track'.split(),
include_package_data=True,
license='BSD License',
package_dir={'affiliate': 'affiliate'},
url='https://github.com/st4lk/django-affiliate',
classifiers=[
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Topic :: Utilities',
],
)