1
- from setuptools import setup , find_packages
2
- import os
1
+ from setuptools import setup
3
2
4
-
5
- def get_requirements (req_file ):
6
- reqs = []
7
- with open (req_file , "r" ) as fp :
8
- for line in fp .readlines ():
9
- if line .startswith ("#" ) or line .strip () == "" :
10
- continue
11
- else :
12
- reqs .append (line .strip ())
13
- return reqs
14
-
15
-
16
- # A trick from https://github.com/jina-ai/jina/blob/79b302c93b01689e82cf4b52f46522eb7497c404/setup.py#L20
17
- libinfo_py = os .path .join ("src" , "notion_df" , "__init__.py" )
18
- libinfo_content = open (libinfo_py , "r" , encoding = "utf8" ).readlines ()
19
- version_line = [l .strip () for l in libinfo_content if l .startswith ("__version__" )][0 ]
20
- exec (version_line ) # gives __version__
21
-
22
- setup (
23
- name = "notion-df" ,
24
- version = __version__ ,
25
- description = "Notion-DF: Seamlessly Connecting Notion Database with Pandas DataFrame" ,
26
- author = "Zejiang Shen" ,
27
-
28
- license = "MIT" ,
29
- url = "https://github.com/lolipopshock/notion-df" ,
30
- package_dir = {"" : "src" },
31
- packages = find_packages ("src" ),
32
- long_description = open ("README.md" , "r" , encoding = "utf-8" ).read (),
33
- long_description_content_type = "text/markdown" ,
34
- python_requires = ">=3.6" ,
35
- install_requires = get_requirements ("requirements.txt" ),
36
- extras_require = {
37
- "dev" : [
38
- "black==21.12b0" ,
39
- "pytest" ,
40
- ],
41
- }
42
- )
3
+ setup ()
0 commit comments