Trying to upload a package to pypi and it's all working except my long_description. It's meant to read through my README.rst but it is just blank on pypi. docutils rst2html isn't throwing any errors, setup.py --long-description prints out my readme, setup.py -check isn't producing errors either.
https://pypi.python.org/pypi/cryptocli
Setup.py:
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
with open('README.rst') as f:
readme = f.read()
with open('LICENSE') as f:
license = f.read()
setup(
name='cryptocli',
version='0.1.3',
description='CLI to query cryptocurrency value',
long_description=readme,
author='huwwp',
author_email='hpigott@gmail.com',
url='https://github.com/huwwp/cryptocli',
license=license,
keywords='crypto cli query cryptocurrency bitcoin',
packages=find_packages(exclude=('tests', 'docs')),
install_requires=['requests'],
py_modules=['cryptocli'],
entry_points = {
'console_scripts': ['cryptocli = cryptocli:main'],
}
)
README.rst:
cryptocli
=========
Command line interface for querying current value of cryptocurrenies in
given fiat.
Usage
-----
Simple query
.. code:: bash
cryptocli BTC
2332.1
Accepts a comma seperated list of coins
.. code:: bash
cryptocli BTC,ETH,XMR
2404.39
218.53
40
Query with conversion to a given currency.
.. code:: bash
cryptocli BTC,ETH,XMR -c JPY
269731.76
24712.42
4563.86
Query with conversion and outputting a formatted string
.. code:: bash
cryptocli BTC,ETH,XMR -c JPY -f
BTCJPY:269679.75
ETHJPY:24718.85
XMRJPY:4562.29
Credits
-------
Uses the cryptocompare.com API
Tipjar
------
BTC: 15wNW29q7XAEbC8yus49CWvt91JkhcdkoW
Disclosure
----------
I am not liable for the accuracy of this program’s output nor actions
performed based upon it.
The license
argument is for supplying the name of the software license you're using (e.g., 'MIT'
or 'GPLv2'
), not for supplying the entire text of the license. Apparently, whatever version of setuptools you used to build your sdist couldn't handle a multi-line license, as the PKG-INFO
file in the sdist looks like this:
Metadata-Version: 1.0
Name: cryptocli
Version: 0.1.3
Summary: CLI to query cryptocurrency value
Home-page: https://github.com/huwwp/cryptocli
Author: huwwp
Author-email: hpigott@gmail.com
License: MIT License
Copyright (c) 2017 huwwp
Permission is hereby granted, ...
Description: cryptocli
=========
Command line interface for querying current value of cryptocurrenies in
given fiat.
...
setuptools' failure to indent the license text causes all subsequent fields of the PKG-INFO
(including the long description and keywords) to not be parsed, hence why they don't show up on PyPI. You should just write license='MIT'
in your setup.py
instead.
(Incidentally, your LICENSE
file is not automatically included in your sdist unless you list it in a MANIFEST.in
file, and the absence of a LICENSE
causes your setup.py
to fail, so no one can currently install your package as-is!)