mirror of
https://github.com/pacnpal/django-anymail.git
synced 2025-12-20 11:51:05 -05:00
Clean up version numbering and readme/description/docs sharing
This commit is contained in:
26
README.rst
26
README.rst
@@ -7,27 +7,14 @@
|
|||||||
(see long_description_from_readme in setup.py)
|
(see long_description_from_readme in setup.py)
|
||||||
You can use docutils 1.0 markup, but *not* any Sphinx additions.
|
You can use docutils 1.0 markup, but *not* any Sphinx additions.
|
||||||
|
|
||||||
.. These substitution definitions apply in the readme (github) only;
|
|
||||||
they're altered by setup.py for the long_description,
|
|
||||||
and defined differently for the docs includes
|
|
||||||
|
|
||||||
.. |release| replace:: (source)
|
|
||||||
|
|
||||||
.. |version| replace:: |release|
|
|
||||||
|
|
||||||
.. |buildstatus| image:: https://secure.travis-ci.org/brack3t/Djrill.png?branch=master
|
|
||||||
:target: https://travis-ci.org/brack3t/Djrill
|
|
||||||
|
|
||||||
.. default-role:: literal
|
.. default-role:: literal
|
||||||
|
|
||||||
|
|
||||||
.. _shared-intro:
|
|
||||||
.. This shared-intro section is also included in docs/index.rst
|
|
||||||
|
|
||||||
Djrill: Mandrill Transactional Email for Django
|
Djrill: Mandrill Transactional Email for Django
|
||||||
===============================================
|
===============================================
|
||||||
|
|
||||||
Release |release|
|
.. _shared-intro:
|
||||||
|
.. This shared-intro section is also included in docs/index.rst
|
||||||
|
|
||||||
Djrill integrates the `Mandrill <http://mandrill.com>`_ transactional
|
Djrill integrates the `Mandrill <http://mandrill.com>`_ transactional
|
||||||
email service into Django.
|
email service into Django.
|
||||||
@@ -41,11 +28,16 @@ package. It includes:
|
|||||||
* An optional Django admin interface
|
* An optional Django admin interface
|
||||||
|
|
||||||
Djrill is released under the BSD license. It is tested against Django 1.3, 1.4, and 1.5
|
Djrill is released under the BSD license. It is tested against Django 1.3, 1.4, and 1.5
|
||||||
(including Python 3 support with Django 1.5). |buildstatus|
|
(including Python 3 support with Django 1.5).
|
||||||
|
|
||||||
.. END shared-intro
|
.. END shared-intro
|
||||||
|
|
||||||
Resources:
|
.. image:: https://secure.travis-ci.org/brack3t/Djrill.png?branch=master
|
||||||
|
:target: https://travis-ci.org/brack3t/Djrill
|
||||||
|
:alt: build status on Travis-CI
|
||||||
|
|
||||||
|
|
||||||
|
**Resources**
|
||||||
|
|
||||||
* Full documentation: https://djrill.readthedocs.org/en/latest/
|
* Full documentation: https://djrill.readthedocs.org/en/latest/
|
||||||
* Package on PyPI: https://pypi.python.org/pypi/djrill
|
* Package on PyPI: https://pypi.python.org/pypi/djrill
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
VERSION = (0, 3, 9)
|
VERSION = (0, 4, 0, 'dev1') # Remove the 'dev1' component in release branches
|
||||||
__version__ = '.'.join([str(x) for x in VERSION])
|
__version__ = '.'.join([str(x) for x in VERSION])
|
||||||
__minor_version__ = '.'.join([str(x) for x in VERSION[:2]]) # Sphinx's X.Y "version"
|
__minor_version__ = '.'.join([str(x) for x in VERSION[:2]]) # Sphinx's X.Y "version"
|
||||||
|
|||||||
@@ -3,20 +3,17 @@
|
|||||||
You can adapt this file completely to your liking, but it should at least
|
You can adapt this file completely to your liking, but it should at least
|
||||||
contain the root `toctree` directive.
|
contain the root `toctree` directive.
|
||||||
|
|
||||||
|
Djrill: Mandrill Transactional Email for Django
|
||||||
|
===============================================
|
||||||
|
|
||||||
|
Version |release|
|
||||||
|
|
||||||
.. Incorporate the shared-intro section from the root README:
|
.. Incorporate the shared-intro section from the root README:
|
||||||
|
|
||||||
.. include:: ../README.rst
|
.. include:: ../README.rst
|
||||||
:start-after: _shared-intro:
|
:start-after: _shared-intro:
|
||||||
:end-before: END shared-intro
|
:end-before: END shared-intro
|
||||||
|
|
||||||
.. Eliminate the README's Travis build status indicator.
|
|
||||||
(Is there some way we could link to Travis status for the
|
|
||||||
specific |VERSION| of the app being documented here???)
|
|
||||||
|
|
||||||
.. |buildstatus| replace:: \
|
|
||||||
|
|
||||||
|
|
||||||
.. _toc:
|
|
||||||
|
|
||||||
Documentation
|
Documentation
|
||||||
-------------
|
-------------
|
||||||
|
|||||||
10
setup.py
10
setup.py
@@ -9,12 +9,10 @@ with open("djrill/_version.py") as f:
|
|||||||
|
|
||||||
|
|
||||||
def long_description_from_readme(rst):
|
def long_description_from_readme(rst):
|
||||||
# Patch up some rest substitution variables (references only - not definitions):
|
# In release branches, freeze some external links to refer to this X.Y version:
|
||||||
rst = re.sub(r'(?<!\.\. )\|release\|', __version__, rst)
|
if not "dev" in __version__:
|
||||||
rst = re.sub(r'(?<!\.\. )\|version\|', __minor_version__, rst)
|
rst = re.sub(r'branch=master', 'branch=v' + __minor_version__, rst) # Travis build status
|
||||||
rst = re.sub(r'(?<!\.\. )\|buildstatus\|', "", rst) # hide latest-code Travis status indicator
|
rst = re.sub(r'/latest', '/v' + __minor_version__, rst) # ReadTheDocs
|
||||||
rst = re.sub(r'(djrill\.readthedocs\.org/\w+)/latest',
|
|
||||||
r'\1/' + __version__, rst) # freeze docs link to this version
|
|
||||||
return rst
|
return rst
|
||||||
|
|
||||||
with open('LICENSE') as f:
|
with open('LICENSE') as f:
|
||||||
|
|||||||
Reference in New Issue
Block a user