Commit 810bd00b by benjaoming

Automatically generate README.rst for PyPi

parent 0c492222
......@@ -2,6 +2,7 @@
build
dist
*.egg-info
README.rst
#Docs
docs/_build
......
include COPYING
include README.md
include README.rst
include setup.cfg
include requirements.txt
include model_chart_wiki.pdf
......
......@@ -250,6 +250,8 @@ Acknowledgements
* [django-mptt](https://github.com/django-mptt/django-mptt), a wonderful utility for inexpensively using tree structures in Django with a relational database backend.
* [jdcaballero](https://github.com/jdcaballero), [yekibud](https://github.com/yekibud), [bridger](https://github.com/bridger), [TomLottermann](https://github.com/TomLottermann), [crazyzubr](https://github.com/crazyzubr), and [everyone else](https://github.com/benjaoming/django-wiki/contributors) involved!
<!---Illegal PyPi RST data --><!---Anything that isn't validly translateable to PyPi RST goes after this line -->
Support
-------
......
[metadata]
description-file = README.md
......@@ -7,27 +7,25 @@ from setuptools import setup, find_packages
# Used for the long_description. It's nice, because now 1) we have a top level
# README file and 2) it's easier to type in the README file than to put a raw
# string in below ...
def get_path(fname):
return os.path.join(os.path.dirname(__file__), fname)
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
return open(get_path(fname)).read()
packages = find_packages()
#def build_media_pattern(base_folder, file_extension):
# return ["%s/%s*.%s" % (base_folder, "*/"*x, file_extension) if base_folder else "%s*.%s" % ("*/"*x, file_extension) for x in range(10)]
#media_patterns = ( build_media_pattern("templates", "html") +
# build_media_pattern("static", "js") +
# build_media_pattern("static", "css") +
# build_media_pattern("static", "png") +
# build_media_pattern("static", "jpeg") +
# build_media_pattern("static", "gif") +
# build_media_pattern("", "md") +
# build_media_pattern("", "requirements.txt")
#)
#package_data = dict(
# (package_name, media_patterns)
# for package_name in packages
#)
try:
import pypandoc
long_description = pypandoc.convert(get_path('README.md'), 'rst')
long_description = long_description.split('<!---Illegal PyPi RST data -->')[0]
f = open(get_path('README.rst'), 'w')
f.write(long_description)
f.close()
except (IOError, ImportError):
# No long description... but nevermind, it's only for PyPi uploads.
long_description = ""
setup(
name = "wiki",
......@@ -35,12 +33,12 @@ setup(
author = "Benjamin Bach",
author_email = "benjamin@overtag.dk",
url = "http://www.django-wiki.org",
description = ("A wiki system written for the Django framework."),
description = "A wiki system written for the Django framework.",
license = "GPLv3",
keywords = "django wiki markdown",
packages=find_packages(exclude=["testproject","testproject.*"]),
long_description=read('README.md'),
zip_safe = False,
#long_description=long_description,
zip_safe=False,
install_requires=read('requirements.txt').split("\n"),
classifiers=[
'Development Status :: 3 - Alpha',
......@@ -55,5 +53,4 @@ setup(
'Topic :: Software Development :: Libraries :: Application Frameworks',
],
include_package_data=True,
# package_data=package_data,
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment