This repository has been archived by the owner on Nov 19, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
/
setup.py
72 lines (55 loc) · 2.16 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
""" Setup Django-Markdown. """
import os
from setuptools import setup, find_packages
import re
MODULE_NAME = 'django_markdown'
PACKAGE_DATA = list()
for directory in ['templates', 'static']:
for root, dirs, files in os.walk(os.path.join(MODULE_NAME, directory)):
for filename in files:
PACKAGE_DATA.append("%s/%s" %
(root[len(MODULE_NAME) + 1:], filename))
def _read(fname):
try:
return open(os.path.join(os.path.dirname(__file__), fname)).read()
except IOError:
return ''
_meta = _read('django_markdown/__init__.py')
_license = re.search(r'^__license__\s*=\s*"(.*)"', _meta, re.M).group(1)
_project = re.search(r'^__project__\s*=\s*"(.*)"', _meta, re.M).group(1)
_version = re.search(r'^__version__\s*=\s*"(.*)"', _meta, re.M).group(1)
download_url = "https://github.com/sv0/django-markdown-app/archive/%s.tar.gz" \
% _version
install_requires = [l for l in _read('requirements.txt').split('\n')
if l and not l.startswith('#')]
setup(
name=_project,
version=_version,
description=_read('DESCRIPTION'),
long_description=_read('README.rst'),
license=_license,
author="Kirill Klenov",
author_email="[email protected]",
maintainer="Slavik Svyrydiuk",
maintainer_email="[email protected]",
url="https://github.com/sv0/django-markdown-app",
download_url=download_url,
keywords='html markdown django',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Framework :: Django :: 2.0',
'Intended Audience :: Developers',
'Natural Language :: English',
'License :: OSI Approved :: GNU Library or Lesser General Public License (LGPL)', # noqa
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.9',
'Topic :: Software Development :: Code Generators',
'Topic :: Text Processing :: Markup',
],
packages=find_packages(),
package_data={'': PACKAGE_DATA, },
install_requires=install_requires,
)
# pylama:ignore=C0111