mirror of
				https://github.com/KevinMidboe/tableprint.git
				synced 2025-10-29 18:00:16 +00:00 
			
		
		
		
	Using metadata.py to manage version number and other metadata
This commit is contained in:
		
							
								
								
									
										18
									
								
								metadata.py
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								metadata.py
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,18 @@ | ||||
| # Version info | ||||
| __name__ = 'tableprint' | ||||
| __version__ = '0.6.1' | ||||
| __license__ = 'MIT' | ||||
|  | ||||
| # Project description(s) | ||||
| __description__ = 'Pretty console printing of tabular data' | ||||
| __long_description__ = '''Formatted console printing of tabular data. | ||||
|                           tableprint lets you easily print formatted tables of data. | ||||
|                           Unlike other modules, you can print single rows of data at a time | ||||
|                           (useful for printing ongoing computation results).''' | ||||
|  | ||||
| # The project's main homepage. | ||||
| __url__ = 'https://github.com/nirum/tableprint' | ||||
|  | ||||
| # Author details | ||||
| __author__ = 'Niru Maheswaranathan' | ||||
| __author_email__ = 'niru@fastmail.com' | ||||
							
								
								
									
										30
									
								
								setup.py
									
									
									
									
									
								
							
							
						
						
									
										30
									
								
								setup.py
									
									
									
									
									
								
							| @@ -1,28 +1,13 @@ | ||||
| import re | ||||
| from setuptools import setup | ||||
|  | ||||
|  | ||||
| with open('metadata.py', 'r') as f: | ||||
|     metadata = dict(re.findall("", f.read())) | ||||
|  | ||||
|  | ||||
| setup( | ||||
|     name='tableprint', | ||||
|  | ||||
|     # Versions should comply with PEP440.  For a discussion on single-sourcing | ||||
|     # the version across setup.py and the project code, see | ||||
|     # https://packaging.python.org/en/latest/single_source_version.html | ||||
|     version='0.6.1', | ||||
|  | ||||
|     description='Pretty console printing of tabular data', | ||||
|     long_description='''Formatted console printing of tabular data. | ||||
|                         tableprint lets you easily print formatted tables of data. | ||||
|                         Unlike other modules, you can print single rows of data at a time | ||||
|                         (useful for printing ongoing computation results).''', | ||||
|  | ||||
|     # The project's main homepage. | ||||
|     url='https://github.com/nirum/tableprint', | ||||
|  | ||||
|     # Author details | ||||
|     author='Niru Maheswaranathan', | ||||
|     author_email='niru@fastmail.com', | ||||
|  | ||||
|     # Choose your license | ||||
|     license='MIT', | ||||
|     **metadata, | ||||
|  | ||||
|     # See https://pypi.python.org/pypi?%3Aaction=list_classifiers | ||||
|     classifiers=[ | ||||
| @@ -44,6 +29,7 @@ setup( | ||||
|         'Programming Language :: Python :: 2.7', | ||||
|         'Programming Language :: Python :: 3.4', | ||||
|         'Programming Language :: Python :: 3.5', | ||||
|         'Programming Language :: Python :: 3.6', | ||||
|     ], | ||||
|  | ||||
|     # What does your project relate to? | ||||
|   | ||||
| @@ -11,6 +11,7 @@ Usage | ||||
| >>> tableprint.table(data, headers) | ||||
| """ | ||||
| from __future__ import print_function, unicode_literals | ||||
| from metadata import __version__ | ||||
| from six import string_types | ||||
| from collections import namedtuple | ||||
| from numbers import Number | ||||
| @@ -20,7 +21,6 @@ import numpy as np | ||||
|  | ||||
| __all__ = ('table', 'header', 'row', 'hr', 'top', 'bottom', | ||||
|            'banner', 'dataframe', 'humantime', 'styles') | ||||
| __version__ = '0.5.4' | ||||
|  | ||||
| # set up table styles | ||||
| LineStyle = namedtuple('LineStyle', ('begin', 'hline', 'sep', 'end')) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user