mirror of
https://git.envs.net/envs/twtxt.git
synced 2024-06-28 03:37:11 +00:00
Add __version__ to twtxt, make use of it elsewhere
This commit is contained in:
parent
f5ee679e89
commit
93fa2e052f
|
@ -17,6 +17,8 @@ import sys
|
||||||
|
|
||||||
import alabaster
|
import alabaster
|
||||||
|
|
||||||
|
import twtxt
|
||||||
|
|
||||||
# If extensions (or modules to document with autodoc) are in another directory,
|
# If extensions (or modules to document with autodoc) are in another directory,
|
||||||
# add these directories to sys.path here. If the directory is relative to the
|
# add these directories to sys.path here. If the directory is relative to the
|
||||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||||
|
@ -61,9 +63,9 @@ author = u'buckket'
|
||||||
# built documents.
|
# built documents.
|
||||||
#
|
#
|
||||||
# The short X.Y version.
|
# The short X.Y version.
|
||||||
version = '1.2.0'
|
version = twtxt.__version__
|
||||||
# The full version, including alpha/beta/rc tags.
|
# The full version, including alpha/beta/rc tags.
|
||||||
release = '1.2.0'
|
release = version
|
||||||
|
|
||||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||||
# for a list of supported languages.
|
# for a list of supported languages.
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
Welcome to twtxt!
|
Welcome to twtxt!
|
||||||
=================
|
=================
|
||||||
|
|
||||||
Current release: v\ |version|.
|
Release: v\ |version|.
|
||||||
|
|
||||||
Welcome to twtxt’s documentation. This documentation is divided into multiple parts.
|
Welcome to twtxt’s documentation. This documentation is divided into multiple parts.
|
||||||
We recommend you to get started with the :ref:`installation` and then head over to the
|
We recommend you to get started with the :ref:`installation` and then head over to the
|
||||||
|
@ -40,8 +40,5 @@ This part of the documentation describes the modules, classes, functions and oth
|
||||||
|
|
||||||
api
|
api
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.. _GitHub: https://github.com/buckket/twtxt
|
.. _GitHub: https://github.com/buckket/twtxt
|
||||||
.. _irc.freenode.net: https://freenode.net/
|
.. _irc.freenode.net: https://freenode.net/
|
||||||
|
|
14
setup.py
14
setup.py
|
@ -1,14 +1,24 @@
|
||||||
|
import ast
|
||||||
|
import re
|
||||||
import sys
|
import sys
|
||||||
from setuptools import setup, find_packages
|
|
||||||
|
from setuptools import find_packages
|
||||||
|
from setuptools import setup
|
||||||
|
|
||||||
|
_version_re = re.compile(r'__version__\s+=\s+(.*)')
|
||||||
|
|
||||||
|
|
||||||
if sys.version_info < (3, 4, 1):
|
if sys.version_info < (3, 4, 1):
|
||||||
raise RuntimeError("twtxt requires Python 3.4.1+")
|
raise RuntimeError("twtxt requires Python 3.4.1+")
|
||||||
|
|
||||||
|
with open('twtxt/__init__.py', 'rb') as f:
|
||||||
|
version = str(ast.literal_eval(_version_re.search(
|
||||||
|
f.read().decode('utf-8')).group(1)))
|
||||||
|
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='twtxt',
|
name='twtxt',
|
||||||
version='1.2.0',
|
version=version,
|
||||||
|
|
||||||
url='https://github.com/buckket/twtxt',
|
url='https://github.com/buckket/twtxt',
|
||||||
|
|
||||||
|
|
|
@ -7,3 +7,6 @@
|
||||||
:copyright: (c) 2016 by buckket.
|
:copyright: (c) 2016 by buckket.
|
||||||
:license: MIT, see LICENSE for more details.
|
:license: MIT, see LICENSE for more details.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
||||||
|
__version__ = '1.2.1-dev'
|
||||||
|
|
Loading…
Reference in New Issue
Block a user