Skip to content

Commit 990e040

Browse files
committed
ger description from readme
1 parent 8d3cd5a commit 990e040

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

setup.py

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,22 @@
66

77
AK_VERSION = '1.0.7'
88

9-
def get_long_description() -> str:
10-
return '''The ArrayKit library provides utilities for creating and transforming NumPy arrays, implementing performance-critical StaticFrame operations as Python C extensions.
9+
ROOT_DIR_FP = path.abspath(path.dirname(__file__))
1110

12-
Code: https://github.com/static-frame/arraykit
11+
def get_long_description() -> str:
12+
with open(path.join(ROOT_DIR_FP, 'README.rst'), encoding='utf-8') as f:
13+
msg = []
14+
collect = False
15+
start = -1
16+
for i, line in enumerate(f):
17+
if line.startswith('arraykit'):
18+
start = i + 2 # skip this line and the next
19+
if i == start:
20+
collect = True
21+
if collect:
22+
msg.append(line)
23+
return ''.join(msg).strip()
1324

14-
Packages: https://pypi.org/project/arraykit
15-
'''
1625

1726
# NOTE: we do this to avoid importing numpy: https://stackoverflow.com/questions/54117786/add-numpy-get-include-argument-to-setuptools-without-preinstalled-numpy
1827
# we used to import the following to get directories:

0 commit comments

Comments
 (0)