forked from KOliver94/django-rest-social-auth
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
70 lines (59 loc) · 2.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
import os
import sys
from setuptools import setup
from rest_social_auth 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] == 'build':
os.system('python setup.py sdist')
os.system('python setup.py bdist_wheel')
if sys.argv[-1] == 'publish':
# TODO: Need python 3.4.6+, 3.5.3+, Python 3.6+ here, add a check
# https://packaging.python.org/guides/migrating-to-pypi-org/#uploading
dists_to_upload = [
'dist/rest_social_auth-{0}.tar.gz'.format(__version__),
'dist/rest_social_auth-{0}-py2.py3-none-any.whl'.format(__version__),
]
for dist in dists_to_upload:
print('Uploading {0}'.format(dist))
os.system('twine upload -r pypi {0}'.format(dist))
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='rest_social_auth',
author=__author__,
author_email='alexevseev@gmail.com',
version=__version__,
description='Django rest framework resources for social auth',
long_description=__read('README.md') + '\n\n' + __read('RELEASE_NOTES.md'),
long_description_content_type='text/markdown; charset=UTF-8',
platforms=('Any'),
packages=['rest_social_auth'],
install_requires=install_requires,
keywords='django social auth rest login signin signup oauth'.split(),
include_package_data=True,
license='MIT license',
package_dir={'rest_social_auth': 'rest_social_auth'},
url='https://github.com/st4lk/django-rest-social-auth',
classifiers=[
'Environment :: Web Environment',
'Framework :: Django',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Topic :: Utilities',
],
)