From 66efe2efaa3225062f6cdb89c6f5885ef3d58a47 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Thu, 5 Mar 2020 01:02:44 -0500 Subject: [PATCH 1/4] Use utf-8 when reading README for package description. This otherwise will fail in non-UTF8 locales, and Python 3.6 (which doesn't coerce back to UTF8.) Fixes #16670. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 16149e83af89..7e9c6610b3fb 100644 --- a/setup.py +++ b/setup.py @@ -224,7 +224,7 @@ def run(self): fd.write(''.join(template_lines)) # Use Readme as long description - with open('README.rst') as fd: + with open('README.rst', encoding='utf-8') as fd: long_description = fd.read() # Finally, pass this all along to distutils to do the heavy lifting. From db7492fca1b2c7168ff374118ab9afc9e75488e2 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Thu, 5 Mar 2020 01:06:18 -0500 Subject: [PATCH 2/4] doc: Use https links in project readme. --- README.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.rst b/README.rst index 000d916be2b9..6251c5a91f89 100644 --- a/README.rst +++ b/README.rst @@ -38,13 +38,13 @@ .. _Downloads: https://pepy.tech/project/matplotlib/month .. |NUMFocus| image:: https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat&colorA=E1523D&colorB=007D8A -.. _NUMFocus: http://www.numfocus.org +.. _NUMFocus: https://www.numfocus.org .. image:: doc/_static/logo2.png Matplotlib is a comprehensive library for creating static, animated, and interactive visualizations in Python. -Check out our `home page `_ for more information. +Check out our `home page `_ for more information. .. image:: doc/_static/readme_preview.png @@ -58,7 +58,7 @@ Install ======= For installation instructions and requirements, see `INSTALL.rst `_ or the -`install `_ documentation. +`install `_ documentation. Test ==== @@ -77,7 +77,7 @@ You've worked out a way to fix it – even better! You want to tell us about it – best of all! -Start at the `contributing guide `_! +Start at the `contributing guide `_! Contact ======= From 087c74faf03f030ef177fd920b3d4c0432819a19 Mon Sep 17 00:00:00 2001 From: Elliott Sales de Andrade Date: Thu, 5 Mar 2020 01:11:35 -0500 Subject: [PATCH 3/4] doc: Use absolute links for readme images. PyPI doesn't have our whole repo, so a relative link doesn't work. --- README.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 6251c5a91f89..f8b22889d386 100644 --- a/README.rst +++ b/README.rst @@ -40,13 +40,13 @@ .. |NUMFocus| image:: https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat&colorA=E1523D&colorB=007D8A .. _NUMFocus: https://www.numfocus.org -.. image:: doc/_static/logo2.png +.. image:: https://matplotlib.org/_static/logo2.svg Matplotlib is a comprehensive library for creating static, animated, and interactive visualizations in Python. Check out our `home page `_ for more information. -.. image:: doc/_static/readme_preview.png +.. image:: https://matplotlib.org/_static/readme_preview.png Matplotlib produces publication-quality figures in a variety of hardcopy formats and interactive environments across platforms. Matplotlib can be used in Python scripts, From 95904d2c4710382cfac9ac27fc9dadaa5abd986d Mon Sep 17 00:00:00 2001 From: Sandro Tosi Date: Sat, 7 Mar 2020 04:57:42 -0500 Subject: [PATCH 4/4] Fix undefined variable when using setup.py clean. --- setup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 7e9c6610b3fb..872fe0672223 100644 --- a/setup.py +++ b/setup.py @@ -223,9 +223,9 @@ def run(self): with open('lib/matplotlib/mpl-data/matplotlibrc', 'w') as fd: fd.write(''.join(template_lines)) - # Use Readme as long description - with open('README.rst', encoding='utf-8') as fd: - long_description = fd.read() + # Use Readme as long description + with open('README.rst', encoding='utf-8') as fd: + long_description = fd.read() # Finally, pass this all along to distutils to do the heavy lifting. setup(