GithubHelp home page GithubHelp logo

RST vs MD about pyspf HOT 5 OPEN

sdgathman avatar sdgathman commented on July 17, 2024
RST vs MD

from pyspf.

Comments (5)

kitterma avatar kitterma commented on July 17, 2024

It's a distutils versus setuptools thing I think. You've got long_description_content_type='text/markdown', in setup.py, but it's not recognized (with twine check I get:

Checking distribution dist/pyspf-2.0.14.tar.gz: warning: long_description_content_type missing. defaulting to text/x-rst.

If I switch to setuptools, the error goes away:

diff --git a/setup.py b/setup.py
index a64521c..35843f1 100755
--- a/setup.py
+++ b/setup.py
@@ -1,6 +1,6 @@
#!/usr/bin/python

-from distutils.core import setup
+from setuptools import setup
import sys

DESC = """SPF (Sender Policy Framework) implemented in Python."""

If we change to setuptools, we can also specify dependencies in setup.py so users don't have to install them by hand. If you're OK wiith it, I'll make the change.

from pyspf.

sdgathman avatar sdgathman commented on July 17, 2024

Yes, I can change the type to rst, but github wants markdown. The setuptools aren't the issue. Unless you're saying pypi does support markdown, but twine just syntax checks as RST.

from pyspf.

sdgathman avatar sdgathman commented on July 17, 2024

Currently, the content type says markdown, and the file is named README.md - and yet pypi still interprets it as RST. So it is pretty clear that the title of this issue is accurate. We have to support two different markdown syntaxes. Or adopt a subset that works with both. Is there a preformatted syntax that works with both?

from pyspf.

kitterma avatar kitterma commented on July 17, 2024

Pypi wants rst because of the difference in the PKG-INFO file in the sdist. Here's the diff going from Pkg-Info generated by distutils and setuptools:

diff -ruN pyspf-2.0.14/PKG-INFO pyspf.egg-info/PKG-INFO
--- pyspf-2.0.14/PKG-INFO 2020-01-02 22:25:23.000000000 -0500
+++ pyspf.egg-info/PKG-INFO 2020-01-02 22:24:39.477610691 -0500
@@ -1,10 +1,12 @@
-Metadata-Version: 1.1
+Metadata-Version: 2.1
Name: pyspf
Version: 2.0.14
Summary: SPF (Sender Policy Framework) implemented in Python.
Home-page: https://github.com/sdgathman/pyspf/
-Author: Stuart D. Gathman
-Author-email: [email protected]
+Author: Terence Way
+Author-email: [email protected]
+Maintainer: Stuart D. Gathman
+Maintainer-email: [email protected]
License: Python Software Foundation License
Description: SPF
===
@@ -220,3 +222,4 @@
Classifier: Topic :: Communications :: Email :: Filters
Classifier: Topic :: Internet :: Name Service (DNS)
Classifier: Topic :: Software Development :: Libraries :: Python Modules
+Description-Content-Type: text/markdown

Note the addition of Description-Content-Type when generated with setuptools. If you want to use Markdown for both Github and Pypi, that will solve it.

from pyspf.

kitterma avatar kitterma commented on July 17, 2024

The Python community has pretty well left distutils behind and focused on setuptools, so even though there are a few things about it I find annoying, it's the future. We may as well switch and solve this.

from pyspf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.