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 sys
|
||||||
import os
|
import os
|
||||||
on_rtd = os.getenv('READTHEDOCS') == 'True'
|
on_rtd = os.getenv('READTHEDOCS') == 'True'
|
||||||
|
from setuptools_scm import get_version
|
||||||
|
|
||||||
# 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.
|
||||||
sys.path.insert(0, os.path.abspath('..'))
|
sys.path.insert(0, os.path.abspath('..'))
|
||||||
|
root = os.path.relpath(os.path.join(os.path.dirname(__file__), '..'))
|
||||||
|
|
||||||
# -- General configuration ------------------------------------------------
|
# -- General configuration ------------------------------------------------
|
||||||
|
|
||||||
|
@ -64,9 +66,9 @@ copyright = u'2016, Manuel F Martinez and others'
|
||||||
# built documents.
|
# built documents.
|
||||||
#
|
#
|
||||||
# The short X.Y version.
|
# The short X.Y version.
|
||||||
version = '1.0.8'
|
version = get_version(root=root)
|
||||||
# The full version, including alpha/beta/rc tags.
|
# The full version, including alpha/beta/rc tags.
|
||||||
release = '1.0.8'
|
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.
|
||||||
|
|
|
@ -2,4 +2,5 @@ pyusb
|
||||||
Pillow>=2.0
|
Pillow>=2.0
|
||||||
qrcode>=4.0
|
qrcode>=4.0
|
||||||
pyserial
|
pyserial
|
||||||
sphinx-rtd-theme
|
sphinx-rtd-theme
|
||||||
|
setuptools-scm
|
5
setup.py
5
setup.py
|
@ -39,7 +39,7 @@ class Tox(TestCommand):
|
||||||
|
|
||||||
setup(
|
setup(
|
||||||
name='python-escpos',
|
name='python-escpos',
|
||||||
version='1.0.9-dev',
|
use_scm_version=True,
|
||||||
url='https://github.com/python-escpos/python-escpos',
|
url='https://github.com/python-escpos/python-escpos',
|
||||||
download_url='https://github.com/python-escpos/python-escpos/archive/master.zip',
|
download_url='https://github.com/python-escpos/python-escpos/archive/master.zip',
|
||||||
description='Python library to manipulate ESC/POS Printers',
|
description='Python library to manipulate ESC/POS Printers',
|
||||||
|
@ -72,6 +72,9 @@ setup(
|
||||||
'pyserial',
|
'pyserial',
|
||||||
'six',
|
'six',
|
||||||
],
|
],
|
||||||
|
setup_requires=[
|
||||||
|
'setuptools_scm',
|
||||||
|
],
|
||||||
tests_require=['tox', 'nose'],
|
tests_require=['tox', 'nose'],
|
||||||
cmdclass={'test': Tox},
|
cmdclass={'test': Tox},
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue