File tree Expand file tree Collapse file tree 5 files changed +28
-5
lines changed
Expand file tree Collapse file tree 5 files changed +28
-5
lines changed Original file line number Diff line number Diff line change 66[ ![ license] ( https://img.shields.io/pypi/l/table2ascii )] ( https://github.com/DenverCoder1/table2ascii/blob/main/LICENSE )
77[ ![ Discord] ( https://img.shields.io/discord/819650821314052106?color=5865F2&logo=discord&logoColor=white " Dev Pro Tips Discussion & Support Server ")] ( https://discord.gg/fPrdqh3Zfu )
88
9- Module for converting 2D Python lists to fancy ASCII/Unicode tables
9+ Library for converting 2D Python lists to fancy ASCII/Unicode tables
1010
1111## 📥 Installation
1212
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ table2ascii
33
44|build | |version | |downloads | |license | |Discord |
55
6- Module for converting 2D Python lists to fancy ASCII/Unicode tables
6+ Library for converting 2D Python lists to fancy ASCII/Unicode tables
77
88Check out the :doc: `usage ` section for further information
99
Original file line number Diff line number Diff line change @@ -3,4 +3,9 @@ requires = [
33 " setuptools>=42" ,
44 " wheel"
55]
6- build-backend = " setuptools.build_meta"
6+ build-backend = " setuptools.build_meta"
7+
8+ [project ]
9+ name = " table2ascii"
10+ authors = [{name = " Jonah Lawrence" , email = " jonah@freshidea.com" }]
11+ dynamic = [" version" , " description" ]
Original file line number Diff line number Diff line change 11# /usr/bin/env python
22import os
3+ import re
34from setuptools import setup
4- from setuptools .command .test import test as TestCommand , Command
5+ from setuptools .command .test import test as Command
56
67
78class LintCommand (Command ):
@@ -38,6 +39,17 @@ def run(self):
3839 raise SystemExit (report .total_errors > 0 )
3940
4041
42+ def version ():
43+ version = ""
44+ with open ("table2ascii/__init__.py" ) as f :
45+ version = re .search (
46+ r'^__version__\s*=\s*[\'"]([^\'"]*)[\'"]' , f .read (), re .MULTILINE
47+ ).group (1 )
48+ if not version :
49+ raise RuntimeError ("version is not set" )
50+ return version
51+
52+
4153def long_description ():
4254 # check if README.md exists
4355 if not os .path .exists ("README.md" ):
@@ -56,7 +68,7 @@ def requirements():
5668
5769setup (
5870 name = "table2ascii" ,
59- version = "0.1.2" ,
71+ version = version () ,
6072 author = "Jonah Lawrence" ,
6173 author_email = "jonah@freshidea.com" ,
6274 description = "Convert 2D Python lists into Unicode/Ascii tables" ,
Original file line number Diff line number Diff line change 1+ """
2+ table2ascii - Library for converting 2D Python lists to fancy ASCII/Unicode tables
3+ """
4+
15from .alignment import Alignment
26from .preset_style import PresetStyle
37from .table_style import TableStyle
48from .table_to_ascii import table2ascii
59
10+ __version__ = "0.1.2"
11+
612__all__ = [
713 "table2ascii" ,
814 "Alignment" ,
You can’t perform that action at this time.
0 commit comments