-
Notifications
You must be signed in to change notification settings - Fork 612
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #269 from MartinThoma/pypi-readme
Show long-description on PyPI
- Loading branch information
Showing
1 changed file
with
9 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
import glob | ||
import io | ||
import logging | ||
import os.path | ||
import platform | ||
|
@@ -123,19 +124,20 @@ def set_gcc(): | |
|
||
set_gcc() | ||
|
||
try: | ||
# if we don't have pandoc installed, don't worry about it | ||
import pypandoc | ||
long_description = pypandoc.convert_file("README.md", "rst") | ||
except ImportError: | ||
long_description = '' | ||
|
||
def read(file_name): | ||
"""Read a text file and return the content as a string.""" | ||
file_path = os.path.join(os.path.dirname(__file__), file_name) | ||
with io.open(file_path, encoding="utf-8") as f: | ||
return f.read() | ||
|
||
|
||
setup( | ||
name=NAME, | ||
version=VERSION, | ||
description='Collaborative Filtering for Implicit Datasets', | ||
long_description=long_description, | ||
long_description=read("README.md"), | ||
long_description_content_type="text/markdown", | ||
url='http://github.com/benfred/implicit/', | ||
author='Ben Frederickson', | ||
author_email='[email protected]', | ||
|