Skip to content

Commit 959022d

Browse files
committed
Render long description as rst to make it look good at PyPI
1 parent b9fb920 commit 959022d

File tree

2 files changed

+36
-27
lines changed

2 files changed

+36
-27
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Thumbs.db
66
*.orig
77
dist
88
build
9-
django_datatable_view.egg-info
9+
*.egg-info
1010
.tm_properties
1111
db.sqlite3
1212
appengine

setup.py

Lines changed: 35 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,39 @@
33

44
from setuptools import setup, find_packages
55

6-
setup(name='django-datatable-view-compat',
7-
version='0.8.3',
8-
description='This package is used in conjunction with the jQuery plugin '
9-
'(http://http://datatables.net/), and supports state-saving detection'
10-
' with (http://datatables.net/plug-ins/api). The package consists of '
11-
'a class-based view, and a small collection of utilities for rendering'
12-
' table data from models.',
13-
author='utapyngo',
14-
author_email='ut@pyngo.tom.ru',
15-
url='https://github.com/utapyngo/django-datatable-view',
16-
download_url='https://github.com/utapyngo/django-datatable-view/tarball/django20',
17-
license='Apache License (2.0)',
18-
classifiers=[
19-
'Development Status :: 2 - Pre-Alpha',
20-
'Environment :: Web Environment',
21-
'Framework :: Django',
22-
'Intended Audience :: Developers',
23-
'License :: OSI Approved :: Apache Software License',
24-
'Operating System :: OS Independent',
25-
'Programming Language :: Python',
26-
'Topic :: Software Development',
27-
],
28-
packages=find_packages(exclude=['tests', 'tests.*']),
29-
package_data={'datatableview': ['static/js/*.js', 'templates/datatableview/*.html']},
30-
include_package_data=True,
31-
install_requires=['django>=2.0', 'python-dateutil>=2.1'],
6+
try:
7+
import pypandoc
8+
long_description = pypandoc.convert('README.md', 'rst')
9+
except (IOError, ImportError, OSError):
10+
long_description = open('README.md').read()
11+
12+
setup(
13+
name='django-datatable-view-compat',
14+
version='0.8.3',
15+
description='This package is used in conjunction with the jQuery plugin '
16+
'(http://http://datatables.net/), and supports state-saving detection'
17+
' with (http://datatables.net/plug-ins/api). The package consists of '
18+
'a class-based view, and a small collection of utilities for rendering'
19+
' table data from models.',
20+
long_description=long_description,
21+
author='utapyngo',
22+
author_email='ut@pyngo.tom.ru',
23+
url='https://github.com/utapyngo/django-datatable-view',
24+
download_url='https://github.com/utapyngo/django-datatable-view/tarball/django20',
25+
license='Apache License (2.0)',
26+
classifiers=[
27+
'Development Status :: 2 - Pre-Alpha',
28+
'Environment :: Web Environment',
29+
'Framework :: Django',
30+
'Intended Audience :: Developers',
31+
'License :: OSI Approved :: Apache Software License',
32+
'Operating System :: OS Independent',
33+
'Programming Language :: Python',
34+
'Topic :: Software Development',
35+
],
36+
packages=find_packages(exclude=['tests', 'tests.*']),
37+
package_data={'datatableview': ['static/js/*.js', 'templates/datatableview/*.html']},
38+
include_package_data=True,
39+
setup_requires=['pypandoc==1.4'],
40+
install_requires=['django>=2.0', 'python-dateutil>=2.1'],
3241
)

0 commit comments

Comments
 (0)