PCKG automatically generate version from git-tags
* uses setuptools_scm
This commit is contained in:
parent
e49c35abc1
commit
64e63b0180
|
@ -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.
|
||||
|
|
|
@ -3,3 +3,4 @@ Pillow>=2.0
|
|||
qrcode>=4.0
|
||||
pyserial
|
||||
sphinx-rtd-theme
|
||||
setuptools-scm
|
5
setup.py
5
setup.py
|
@ -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},
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue