Skip to content

Commit 89fda1c

Browse files
committed
main branch merged rel branch
2 parents 7db38df + d6ef848 commit 89fda1c

File tree

2 files changed

+50
-2
lines changed

2 files changed

+50
-2
lines changed

lyc_pyutils/libs/pack_info.py

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
"""Package information.
2+
3+
Information items initially set to unknown and will update at runtime.
4+
"""
5+
6+
# Copyright 2022 Yucheng Liu. GNU LGPL3 license.
7+
# GNU LGPL3 license copy: https://www.gnu.org/licenses/lgpl-3.0.txt
8+
# GNU LGPL3 is based on GNU GPL3, GNU GPL3 copy: https://www.gnu.org/licenses/gpl-3.0.txt
9+
# First added by username: liu-yucheng
10+
# Last updated by username: liu-yucheng
11+
12+
from importlib import metadata
13+
14+
# Aliases
15+
16+
_metadata = metadata.metadata
17+
18+
# -
19+
20+
pack_name = "lyc-pyutils"
21+
"""Package name."""
22+
ver = "<unknown version>"
23+
"""Version."""
24+
author = "<unknown author>"
25+
"""Author."""
26+
cr = "<unknown copyright>"
27+
"""Copyright."""
28+
desc = "<unknown description>"
29+
"""Description."""
30+
31+
_ver_key = "Version"
32+
_author_key = "Author"
33+
_cr_key = "License"
34+
_desc_key = "Summary"
35+
36+
try:
37+
_pack_data = _metadata(pack_name)
38+
_pack_data = dict(_pack_data)
39+
40+
ver = _pack_data[_ver_key]
41+
author = _pack_data[_author_key]
42+
cr = _pack_data[_cr_key]
43+
desc = _pack_data[_desc_key]
44+
except Exception as _:
45+
pass
46+
# end try

setup.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@
2222
def main():
2323
_setup(
2424
name="lyc-pyutils",
25-
version="1.1.4",
26-
description="LYC's personal Python utilities.",
25+
version="1.2.0",
2726
author="Yucheng Liu",
27+
license="Copyright (C) 2022 Yucheng Liu. GNU LGPL3 license.",
28+
description="LYC's personal Python utilities.",
29+
# ----
2830
packages=_find_packages(),
2931
entry_points={
3032
"console_scripts": []

0 commit comments

Comments
 (0)