PCKG automatically generate version from git-tags

* uses setuptools_scm
This commit is contained in:
Patrick Kanzler 2016-03-09 12:01:02 +01:00
parent e49c35abc1
commit 64e63b0180
3 changed files with 10 additions and 4 deletions

View File

@ -15,11 +15,13 @@
import sys
import os
on_rtd = os.getenv('READTHEDOCS') == 'True'
from setuptools_scm import get_version
# 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
# documentation root, use os.path.abspath to make it absolute, like shown here.
sys.path.insert(0, os.path.abspath('..'))
root = os.path.relpath(os.path.join(os.path.dirname(__file__), '..'))
# -- General configuration ------------------------------------------------
@ -64,9 +66,9 @@ copyright = u'2016, Manuel F Martinez and others'
# built documents.
#
# The short X.Y version.
version = '1.0.8'
version = get_version(root=root)
# The full version, including alpha/beta/rc tags.
release = '1.0.8'
release = version
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.

View File

@ -3,3 +3,4 @@ Pillow>=2.0
qrcode>=4.0
pyserial
sphinx-rtd-theme
setuptools-scm

View File

@ -39,7 +39,7 @@ class Tox(TestCommand):
setup(
name='python-escpos',
version='1.0.9-dev',
use_scm_version=True,
url='https://github.com/python-escpos/python-escpos',
download_url='https://github.com/python-escpos/python-escpos/archive/master.zip',
description='Python library to manipulate ESC/POS Printers',
@ -72,6 +72,9 @@ setup(
'pyserial',
'six',
],
setup_requires=[
'setuptools_scm',
],
tests_require=['tox', 'nose'],
cmdclass={'test': Tox},
)