Skip to content

Commit

Permalink
Version 0.7.46
Browse files Browse the repository at this point in the history
  • Loading branch information
mpenning committed Apr 20, 2024
1 parent bc09c22 commit d2aca11
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 11 deletions.
6 changes: 6 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@
- Summary:
- Insert something here

## Version: 0.7.46

- Released: 2024-04-20
- Summary:
- Dynamic version rendering in the sphinx installation documentation

## Version: 0.7.45

- Released: 2024-04-16
Expand Down
2 changes: 1 addition & 1 deletion ciscoconfparse2/__about__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.7.45'
__version__ = '0.7.46'
14 changes: 11 additions & 3 deletions sphinx-doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@

from ciscoconfparse2.ciscoconfparse2 import __author_email__
from ciscoconfparse2.ciscoconfparse2 import __author__
from ciscoconfparse2.__about__ import __version__

import toml

Expand Down Expand Up @@ -114,12 +115,19 @@
# built documents.
#
# The short X.Y version.
with open("../pyproject.toml") as fh:
long_version = toml.load(fh)["project"].get("version", "0.0")
version = ".".join(long_version.split(".")[0:2])
long_version = __version__
version = __version__
# The full version, including alpha/beta/rc tags.
release = long_version

# Prepend these replacements to all files... you can't use |version| in an rst
# monospaced block... See https://stackoverflow.com/a/78358662/667301
rst_prolog = f"""
.. |my_monospace_version| replace:: ``{version}``
.. |my_pip_install_version| replace:: ``pip install ciscoconfparse2=={version}``
.. |my_git_url_version| replace:: ``git+https://github.com/mpenning/ciscoconfparse2.git@{version}``
"""

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
# language = None
Expand Down
17 changes: 10 additions & 7 deletions sphinx-doc/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,30 @@ Installation
pip
---

``pip install -U ciscoconfparse2 >= 0.7.39``
|my_pip_install_version|

requirements.txt: pypi
----------------------

If you need a direct ``pypi`` dependency entry in your ``requirements.txt``
file, you can include an entry like this.

``ciscoconfparse2 == 0.7.39``
``ciscoconfparse2 ==`` |my_monospace_version|

``0.7.39`` is used only as a reference; choose the correct release for your
|version| is used only as a reference; choose the correct release for your
project.

requirements.txt: github
------------------------

If you need a direct ``git`` dependency entry in your ``requirements.txt``
file, you can include an entry like this (where ``0.7.39`` is a specific
file, you can include an entry like this (where |version| is a specific
``git tag`` that you want to reference).

``git+https://github.com/mpenning/[email protected]``
|my_git_url_version|

``0.7.39`` is used only as a reference; choose the correct release for your
project.
Footnote
--------

Throughout this installation document, |version| is used only as a
reference; choose the correct release for your project.

0 comments on commit d2aca11

Please sign in to comment.