parent
f649814091
commit
6fb23d6826
29
setup.py
29
setup.py
|
@ -3,7 +3,6 @@
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
from setuptools import find_packages, setup
|
from setuptools import find_packages, setup
|
||||||
from setuptools.command.test import test as test_command
|
|
||||||
|
|
||||||
|
|
||||||
base_dir = os.path.dirname(__file__)
|
base_dir = os.path.dirname(__file__)
|
||||||
|
@ -19,33 +18,6 @@ def read(fname):
|
||||||
return open(os.path.join(os.path.dirname(__file__), fname)).read()
|
return open(os.path.join(os.path.dirname(__file__), fname)).read()
|
||||||
|
|
||||||
|
|
||||||
class Tox(test_command):
|
|
||||||
"""proxy class that enables tox to be run with setup.py test"""
|
|
||||||
user_options = [('tox-args=', 'a', "Arguments to pass to tox")]
|
|
||||||
|
|
||||||
def initialize_options(self):
|
|
||||||
"""initialize the user-options"""
|
|
||||||
test_command.initialize_options(self)
|
|
||||||
self.tox_args = None
|
|
||||||
|
|
||||||
def finalize_options(self):
|
|
||||||
"""finalize user-options"""
|
|
||||||
test_command.finalize_options(self)
|
|
||||||
self.test_args = []
|
|
||||||
self.test_suite = True
|
|
||||||
|
|
||||||
def run_tests(self):
|
|
||||||
"""run tox and pass on user-options"""
|
|
||||||
# import here, cause outside the eggs aren't loaded
|
|
||||||
import tox
|
|
||||||
import shlex
|
|
||||||
args = self.tox_args
|
|
||||||
if args:
|
|
||||||
args = shlex.split(self.tox_args)
|
|
||||||
errno = tox.cmdline(args=args)
|
|
||||||
sys.exit(errno)
|
|
||||||
|
|
||||||
|
|
||||||
setuptools_scm_template = """\
|
setuptools_scm_template = """\
|
||||||
# coding: utf-8
|
# coding: utf-8
|
||||||
# file generated by setuptools_scm
|
# file generated by setuptools_scm
|
||||||
|
@ -133,7 +105,6 @@ setup(
|
||||||
'hypothesis!=3.56.9',
|
'hypothesis!=3.56.9',
|
||||||
'flake8'
|
'flake8'
|
||||||
],
|
],
|
||||||
cmdclass={'test': Tox},
|
|
||||||
entry_points={
|
entry_points={
|
||||||
'console_scripts': [
|
'console_scripts': [
|
||||||
'python-escpos = escpos.cli:main'
|
'python-escpos = escpos.cli:main'
|
||||||
|
|
Loading…
Reference in New Issue