forked from openwisp/openwisp-utils
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
74 lines (70 loc) · 2.42 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
71
72
73
74
#!/usr/bin/env python
import os
import sys
from openwisp_utils import get_version
from setuptools import find_packages, setup
if sys.argv[-1] == 'publish':
# delete any *.pyc, *.pyo and __pycache__
os.system('find . | grep -E "(__pycache__|\.pyc|\.pyo$)" | xargs rm -rf')
os.system("python setup.py sdist bdist_wheel")
os.system("twine upload -s dist/*")
os.system("rm -rf dist build")
args = {'version': get_version()}
print("You probably want to also tag the version now:")
print(" git tag -a %(version)s -m 'version %(version)s'" % args)
print(" git push --tags")
sys.exit()
setup(
name='openwisp-utils',
version=get_version(),
license='BSD-3-Clause',
author='Rohith Asrk',
author_email='[email protected]',
description='OpenWISP 2 Utilities',
long_description=open('README.rst').read(),
url='http://openwisp.org',
download_url='https://github.com/openwisp/openwisp-utils/releases',
platforms=['Platform Independent'],
keywords=['django', 'netjson', 'openwrt', 'networking', 'openwisp'],
packages=find_packages(exclude=['tests*', 'docs*']),
include_package_data=True,
entry_points={
'console_scripts': [
'checkmigrations = openwisp_utils.qa:check_migration_name',
'checkcommit = openwisp_utils.qa:check_commit_message',
'checkrst = openwisp_utils.qa:check_rst_files',
]
},
scripts=['openwisp-qa-check', 'openwisp-qa-format', 'openwisp-pre-push-hook'],
zip_safe=False,
install_requires=[
'django-model-utils~=4.2.0',
'django-compress-staticfiles~=1.0.1b',
'swapper>=1.1.2,<1.3.0',
],
extras_require={
'qa': [
'black<=21.10b0',
'flake8<=3.9',
'isort~=5.0',
'readme-renderer~=28.0',
'coveralls~=3.0.0', # depends on coverage as well
],
'rest': [
'djangorestframework~=3.12.0',
'django-filter>=2.2.0<2.4.0',
'drf-yasg~=1.20.0',
],
},
classifiers=[
'Development Status :: 3 - Alpha',
'Environment :: Web Environment',
'Topic :: Internet :: WWW/HTTP',
'Topic :: System :: Networking',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Operating System :: OS Independent',
'Framework :: Django',
'Programming Language :: Python :: 3',
],
)