python-escpos/setup.py

112 lines
3.1 KiB
Python
Raw Normal View History

#!/usr/bin/env python
2013-03-14 06:22:43 +00:00
import os
import sys
from setuptools import find_packages, setup
base_dir = os.path.dirname(__file__)
src_dir = os.path.join(base_dir, "src")
# When executing the setup.py, we need to be able to import ourselves, this
# means that we need to add the src/ directory to the sys.path.
sys.path.insert(0, src_dir)
def read(fname):
"""read file from same path as setup.py"""
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setuptools_scm_template = """\
# coding: utf-8
# file generated by setuptools_scm
# don't change, don't track in version control
2017-01-30 01:29:08 +00:00
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
version = '{version}'
"""
2013-03-14 06:22:43 +00:00
setup(
2016-02-11 17:37:13 +00:00
name='python-escpos',
use_scm_version={
'write_to': 'src/escpos/version.py',
'write_to_template': setuptools_scm_template,
},
2016-02-11 17:37:13 +00:00
url='https://github.com/python-escpos/python-escpos',
download_url='https://github.com/python-escpos/python-escpos/archive/master.zip',
2013-03-14 06:22:43 +00:00
description='Python library to manipulate ESC/POS Printers',
2017-01-29 23:39:43 +00:00
license='MIT',
2016-03-08 17:26:23 +00:00
long_description=read('README.rst'),
author='Manuel F Martinez and others',
2013-03-14 06:22:43 +00:00
author_email='manpaz@bashlinux.com',
maintainer='Patrick Kanzler',
maintainer_email='dev@pkanzler.de',
keywords=[
'ESC/POS',
'thermoprinter',
'voucher printer',
'printing',
'receipt,',
],
platforms='any',
package_dir={"": "src"},
packages=find_packages(where="src", exclude=["tests", "tests.*"]),
package_data={'escpos': ['capabilities.json']},
2016-08-30 10:26:09 +00:00
include_package_data=True,
2013-03-14 06:22:43 +00:00
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Console',
2013-03-14 06:22:43 +00:00
'Intended Audience :: Developers',
2017-01-29 23:39:43 +00:00
'License :: OSI Approved :: MIT License',
2016-06-24 09:52:10 +00:00
'Operating System :: OS Independent',
2013-03-14 06:22:43 +00:00
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
2017-05-24 08:58:55 +00:00
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
2020-05-08 21:50:28 +00:00
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: Implementation :: CPython',
2013-03-14 06:22:43 +00:00
'Topic :: Software Development :: Libraries :: Python Modules',
'Topic :: Office/Business :: Financial :: Point-Of-Sale',
2013-03-14 06:22:43 +00:00
],
2020-05-09 00:15:13 +00:00
python_requires='>=3.5',
install_requires=[
'pyusb>=1.0.0',
'Pillow>=2.0',
'qrcode>=4.0',
'pyserial',
'six',
'appdirs',
2017-08-09 08:41:25 +00:00
'PyYAML',
2016-07-23 08:00:40 +00:00
'argparse',
'argcomplete',
'future',
2017-06-11 08:06:57 +00:00
'viivakoodi>=0.8'
],
setup_requires=[
'setuptools_scm',
],
2017-01-30 00:26:50 +00:00
tests_require=[
'jaconv',
'tox',
'pytest!=3.2.0,!=3.3.0',
2017-01-30 00:26:50 +00:00
'pytest-cov',
'pytest-mock',
'nose',
'scripttest',
'mock',
2020-05-08 22:39:41 +00:00
'hypothesis>4',
2017-01-30 00:26:50 +00:00
'flake8'
],
entry_points={
'console_scripts': [
'python-escpos = escpos.cli:main'
]
},
2013-03-14 06:22:43 +00:00
)