mirror of
				https://github.com/python-escpos/python-escpos
				synced 2025-10-23 09:30:00 +00:00 
			
		
		
		
	 cb30d7a881
			
		
	
	cb30d7a881
	
	
	
		
			
			Python 2.7 EOL is arriving on 2020-01-01: https://pythonclock.org/ This will allow us to use Python 3 only libraries, like python-barcode, which can maintain a reduced, simpler codebase, due to only one version to support. Closes #371. Signed-off-by: Romain Porte <microjoe@microjoe.org>
		
			
				
	
	
		
			41 lines
		
	
	
		
			1018 B
		
	
	
	
		
			Python
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			41 lines
		
	
	
		
			1018 B
		
	
	
	
		
			Python
		
	
	
		
			Executable File
		
	
	
	
	
| #!/usr/bin/env python
 | |
| 
 | |
| 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
 | |
| 
 | |
| version = '{version}'
 | |
| """
 | |
| 
 | |
| 
 | |
| setup(
 | |
|     use_scm_version={
 | |
|         "write_to": "src/escpos/version.py",
 | |
|         "write_to_template": setuptools_scm_template,
 | |
|     },
 | |
|     platforms="any",
 | |
|     package_dir={"": "src"},
 | |
|     packages=find_packages(where="src", exclude=["tests", "tests.*"]),
 | |
|     package_data={"escpos": ["capabilities.json"]},
 | |
|     entry_points={"console_scripts": ["python-escpos = escpos.cli:main"]},
 | |
| )
 |