Skip to content

Commit

Permalink
Add badges
Browse files Browse the repository at this point in the history
In order to provide badges, a new README.rst had to be created, as
until then the `long_description` was generated by DateTime.txt, which
was used for doctests, and could not be easily moved.

Then, badges for Travis build, current version and supported Python
versions were added.

new file:   README.rst
deleted:    README.txt
modified:   setup.py
  • Loading branch information
jugmac00 committed May 15, 2020
1 parent ca6cede commit b0c1e8e
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 2 deletions.
21 changes: 21 additions & 0 deletions README.rst
@@ -0,0 +1,21 @@
.. image:: https://travis-ci.org/zopefoundation/DateTime.svg?branch=master
:target: https://travis-ci.org/zopefoundation/DateTime

.. image:: https://img.shields.io/pypi/v/DateTime.svg
:target: https://pypi.org/project/DateTime/
:alt: Current version on PyPI

.. image:: https://img.shields.io/pypi/pyversions/DateTime.svg
:target: https://pypi.org/project/DateTime/
:alt: Supported Python versions


DateTime
========

This package provides a DateTime data type, as known from Zope.

Unless you need to communicate with Zope APIs, you're probably better
off using Python's built-in datetime module.

For further documentation, please have a look at `src/DateTime/DateTime.txt`.
1 change: 0 additions & 1 deletion README.txt

This file was deleted.

9 changes: 8 additions & 1 deletion setup.py
Expand Up @@ -16,6 +16,8 @@
from setuptools import setup, find_packages

here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, 'README.rst')) as f:
HEADER = f.read()
with open(os.path.join(here, 'src', 'DateTime', 'DateTime.txt')) as f:
README = f.read()
with open(os.path.join(here, 'CHANGES.rst')) as f:
Expand All @@ -34,7 +36,12 @@
better off using Python's built-in datetime module.""".replace('\n', ' '),
author='Zope Foundation and Contributors',
author_email='zope-dev@zope.org',
long_description=README + '\n\n' + CHANGES,
long_description = '\n\n'.join([
HEADER,
'.. contents::',
README,
CHANGES,
]),
packages=find_packages('src'),
package_dir={'': 'src'},
classifiers=[
Expand Down

0 comments on commit b0c1e8e

Please sign in to comment.