Skip to content

Commit

Permalink
Merge pull request #269 from MartinThoma/pypi-readme
Browse files Browse the repository at this point in the history
Show long-description on PyPI
  • Loading branch information
ita9naiwa authored Sep 27, 2019
2 parents 999a63c + 41e1565 commit a749cb4
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions setup.py
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
Expand Down Expand Up @@ -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]',
Expand Down

0 comments on commit a749cb4

Please sign in to comment.