pytest-falcon icon indicating copy to clipboard operation
pytest-falcon copied to clipboard

Fix pypi description

Open brianbruggeman opened this issue 8 years ago • 15 comments

The pypi description (here) is not properly being rendered.

brianbruggeman avatar Oct 31 '17 16:10 brianbruggeman

Pypi only supports ReStructuredText :/

yohanboniface avatar Oct 31 '17 17:10 yohanboniface

Ah, should be fixed in Warehouse soon: https://github.com/pypa/readme_renderer

yohanboniface avatar Oct 31 '17 18:10 yohanboniface

Easy to fix with pandoc; struggling with High Sierra upgrade issues today.

brianbruggeman avatar Oct 31 '17 18:10 brianbruggeman

Easy to fix with pandoc

If you mean to swtich from Markdown to RST, even by hand it's easy to fix ;) But I don't this is the best idea, imho the issue is on pypi side.

yohanboniface avatar Oct 31 '17 18:10 yohanboniface

Oh: https://github.com/pypa/pypi-legacy/commit/c7dfc6b961da4f56fb8c4dc41f96a94230d84d06 I wonder why md is not supported then.

yohanboniface avatar Oct 31 '17 18:10 yohanboniface

But I don't this is the best idea,

Github will render rst files... why not move to rst?

imho the issue is on pypi side.

Agreed.

brianbruggeman avatar Oct 31 '17 19:10 brianbruggeman

Github will render rst files... why not move to rst?

Because I feel Markdown is easier, and going that way would mean migrating all python projects to rst, which is not a path I want to take :p

yohanboniface avatar Oct 31 '17 19:10 yohanboniface

I feel Markdown is easier

Markdown is also my first choice.

Another option is to automate the conversion of markdown to rst within setup.py. And then when it is pushed, it will always be rst on the backside (rendering properly), but we can still maintain with markdown. Not quite as easy a fix, but still pretty straight-forward.

brianbruggeman avatar Oct 31 '17 20:10 brianbruggeman

Another option is to automate the conversion of markdown to rst within setup.py

KISS warning ;) I think I prefer no fix than a workaround in this case.

yohanboniface avatar Oct 31 '17 20:10 yohanboniface

Ah, after a bit of searching, maybe we have the proper fix here:

https://packaging.python.org/specifications/core-metadata/#description-content-type-optional

yohanboniface avatar Oct 31 '17 20:10 yohanboniface

So something like... (from here)?

# setup.py
...
setup(
    ...
    long_description=long_description,
    long_description_content_type='text/markdown',
    ...
    )

brianbruggeman avatar Oct 31 '17 20:10 brianbruggeman

I think so. This needs a setuptools up to date though. Also, I'd add the charset=utf-8.

yohanboniface avatar Oct 31 '17 20:10 yohanboniface

This needs a setuptools up to date though.

According to https://github.com/pypa/setuptools/commit/4fc60ed1e47f725a833dd63656ceec981a58e1a0 it seems the minimal setuptools version needed is 36.4.0.

yohanboniface avatar Oct 31 '17 20:10 yohanboniface

From what I can tell, I've set everything up correctly, but the website is still not rendering properly.

Note: the legacy pypitest has been sunset. If we want to actually test a build on the test site, we have to bump the version each time.

Metadata-Version: 1.1
Name: pytest-falcon
Version: 0.4.2.dev1
Summary: Pytest helpers for Falcon.
Home-page: https://github.com/yohanboniface/pytest-falcon
Author: Yohan Boniface
Author-email: [email protected]
License: WTFPL
Description-Content-Type: text/markdown; charset=UTF-8; variant=CommonMark
Description: [![Build Status](https://travis-ci.org/yohanboniface/pytest-falcon.svg?branch=master)](https://travis-ci.org/yohanboniface/pytest-falcon) [![Pypi version](https://img.shields.io/pypi/v/pytest-falcon.svg)](https://pypi.python.org/pypi/pytest-falcon)

        # Pytest-Falcon

        Pytest helpers for the Falcon framework.


        ## Install

        ```
        pip install pytest-falcon
        ```


        ## Usage
        ...

Pypi Test site: here or Legacy: here

brianbruggeman avatar Oct 31 '17 21:10 brianbruggeman

Erf, seems we are stuck on https://github.com/pypa/warehouse/issues/869 :(

Let's see if we can help there. Bed time for me, though ;)

yohanboniface avatar Oct 31 '17 22:10 yohanboniface