forked from pydanny/django-wysiwyg
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
executable file
·68 lines (60 loc) · 2.35 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
#!/usr/bin/env python
from setuptools import setup, find_packages
from os import path
import codecs
import os
import re
import sys
def read(*parts):
file_path = path.join(path.dirname(__file__), *parts)
return codecs.open(file_path, encoding='utf-8').read()
def find_variable(variable, *parts):
version_file = read(*parts)
version_match = re.search(r"^{0} = ['\"]([^'\"]*)['\"]".format(variable), version_file, re.M)
if version_match:
return str(version_match.group(1))
raise RuntimeError("Unable to find version string.")
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
os.system('python setup.py bdist_wheel upload')
sys.exit()
if sys.argv[-1] == 'tag':
print("Tagging the version on github:")
os.system("git tag -a %s -m 'version %s'" % (version, version))
os.system("git push --tags")
sys.exit()
setup(
name='django-wysiwyg',
version=find_variable('__version__', 'django_wysiwyg', '__init__.py'),
description="django-wysiwyg",
long_description=read('README.rst'),
classifiers=[
"Development Status :: 7 - Inactive",
"Environment :: Web Environment",
"Framework :: Django",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: JavaScript",
"Programming Language :: Python",
"Programming Language :: Python :: 2.6",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Topic :: Internet :: WWW/HTTP :: Browsers",
"Topic :: Internet :: WWW/HTTP :: Site Management",
"Topic :: Office/Business :: Office Suites",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Software Development :: User Interfaces",
"Topic :: Text Editors :: Word Processors",
"Topic :: Text Processing :: Fonts",
"Topic :: Text Processing :: Markup :: HTML"
],
keywords='django,wysiwyg,redactor,ckeditor,tinymce,froala',
author=find_variable('__author__', 'django_wysiwyg', '__init__.py'),
author_email='[email protected]',
url='https://github.com/pydanny/django-wysiwyg',
license='MIT',
packages=find_packages(exclude=('test_project*',)),
include_package_data=True,
zip_safe=False
)