table2ascii 1.1.1__tar.gz → 1.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {table2ascii-1.1.1/table2ascii.egg-info → table2ascii-1.1.2}/PKG-INFO +1 -1
- {table2ascii-1.1.1 → table2ascii-1.1.2}/pyproject.toml +1 -1
- table2ascii-1.1.2/setup.py +51 -0
- {table2ascii-1.1.1 → table2ascii-1.1.2/table2ascii.egg-info}/PKG-INFO +1 -1
- table2ascii-1.1.1/setup.py +0 -7
- {table2ascii-1.1.1 → table2ascii-1.1.2}/LICENSE +0 -0
- {table2ascii-1.1.1 → table2ascii-1.1.2}/README.md +0 -0
- {table2ascii-1.1.1 → table2ascii-1.1.2}/setup.cfg +0 -0
- {table2ascii-1.1.1 → table2ascii-1.1.2}/table2ascii/__init__.py +0 -0
- {table2ascii-1.1.1 → table2ascii-1.1.2}/table2ascii/alignment.py +0 -0
- {table2ascii-1.1.1 → table2ascii-1.1.2}/table2ascii/annotations.py +0 -0
- {table2ascii-1.1.1 → table2ascii-1.1.2}/table2ascii/exceptions.py +0 -0
- {table2ascii-1.1.1 → table2ascii-1.1.2}/table2ascii/merge.py +0 -0
- {table2ascii-1.1.1 → table2ascii-1.1.2}/table2ascii/options.py +0 -0
- {table2ascii-1.1.1 → table2ascii-1.1.2}/table2ascii/preset_style.py +0 -0
- {table2ascii-1.1.1 → table2ascii-1.1.2}/table2ascii/py.typed +0 -0
- {table2ascii-1.1.1 → table2ascii-1.1.2}/table2ascii/table_style.py +0 -0
- {table2ascii-1.1.1 → table2ascii-1.1.2}/table2ascii/table_to_ascii.py +0 -0
- {table2ascii-1.1.1 → table2ascii-1.1.2}/table2ascii.egg-info/SOURCES.txt +0 -0
- {table2ascii-1.1.1 → table2ascii-1.1.2}/table2ascii.egg-info/dependency_links.txt +0 -0
- {table2ascii-1.1.1 → table2ascii-1.1.2}/table2ascii.egg-info/requires.txt +0 -0
- {table2ascii-1.1.1 → table2ascii-1.1.2}/table2ascii.egg-info/top_level.txt +0 -0
- {table2ascii-1.1.1 → table2ascii-1.1.2}/tests/test_alignments.py +0 -0
- {table2ascii-1.1.1 → table2ascii-1.1.2}/tests/test_cell_padding.py +0 -0
- {table2ascii-1.1.1 → table2ascii-1.1.2}/tests/test_column_widths.py +0 -0
- {table2ascii-1.1.1 → table2ascii-1.1.2}/tests/test_convert.py +0 -0
- {table2ascii-1.1.1 → table2ascii-1.1.2}/tests/test_heading_cols.py +0 -0
- {table2ascii-1.1.1 → table2ascii-1.1.2}/tests/test_merge.py +0 -0
- {table2ascii-1.1.1 → table2ascii-1.1.2}/tests/test_styles.py +0 -0
|
@@ -5,7 +5,7 @@ build-backend = "setuptools.build_meta"
|
|
|
5
5
|
|
|
6
6
|
[project]
|
|
7
7
|
name = "table2ascii"
|
|
8
|
-
version = "1.1.
|
|
8
|
+
version = "1.1.2"
|
|
9
9
|
authors = [{name = "Jonah Lawrence", email = "jonah@freshidea.com"}]
|
|
10
10
|
description = "Convert 2D Python lists into Unicode/ASCII tables"
|
|
11
11
|
readme = "README.md"
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# /usr/bin/env python
|
|
2
|
+
import re
|
|
3
|
+
|
|
4
|
+
from setuptools import setup
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def get_name():
|
|
8
|
+
name = ""
|
|
9
|
+
with open("pyproject.toml") as f:
|
|
10
|
+
name = re.search(r'^name = ["\']([^"\']*)["\']', f.read(), re.M)
|
|
11
|
+
if not name:
|
|
12
|
+
raise RuntimeError("name is not set")
|
|
13
|
+
return name.group(1)
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
def get_version():
|
|
17
|
+
version = ""
|
|
18
|
+
with open("pyproject.toml") as f:
|
|
19
|
+
version = re.search(r'^version = ["\']([^"\']*)["\']', f.read(), re.M)
|
|
20
|
+
if not version:
|
|
21
|
+
raise RuntimeError("version is not set")
|
|
22
|
+
return version.group(1)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def get_dependencies():
|
|
26
|
+
with open("pyproject.toml") as f:
|
|
27
|
+
dependency_match = re.search(r"^dependencies = \[([\s\S]*?)\]", f.read(), re.M)
|
|
28
|
+
if not dependency_match or not dependency_match.group(1):
|
|
29
|
+
return []
|
|
30
|
+
return [
|
|
31
|
+
dependency.strip().strip(",").strip('"')
|
|
32
|
+
for dependency in dependency_match.group(1).split("\n")
|
|
33
|
+
if dependency
|
|
34
|
+
]
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
try:
|
|
38
|
+
# check if pyproject.toml can be used to install dependencies and set the version
|
|
39
|
+
setup(
|
|
40
|
+
packages=[get_name()],
|
|
41
|
+
package_data={get_name(): ["py.typed"]},
|
|
42
|
+
)
|
|
43
|
+
except Exception:
|
|
44
|
+
# fallback for old versions of pip/setuptools
|
|
45
|
+
setup(
|
|
46
|
+
name=get_name(),
|
|
47
|
+
packages=[get_name()],
|
|
48
|
+
package_data={get_name(): ["py.typed"]},
|
|
49
|
+
version=get_version(),
|
|
50
|
+
install_requires=get_dependencies(),
|
|
51
|
+
)
|
table2ascii-1.1.1/setup.py
DELETED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|