Skip to content

Commit f155973

Browse files
committed
alter loading instal_rquires approach from txt
1 parent ff42ed6 commit f155973

2 files changed

Lines changed: 14 additions & 6 deletions

File tree

MANIFEST.in

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
-- ClickSQL
2+
-- ClickSQL
3+
-- __init__.py
4+
-- README.md
5+
-- requirements.txt
6+
-- LICENSE

setup.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,16 @@ def read_file(filename):
1515
return long_description
1616

1717

18+
# 获取依赖
19+
def read_requirements(filename):
20+
return [line.strip() for line in read_file(filename).splitlines()
21+
if not line.startswith('#')]
22+
23+
1824
setup(
1925
name="ClickSQL",
2026
version=__version__,
27+
python_requires='>=3.7.0', # python环境
2128
keywords=("ClickSQL", "Databases"),
2229
description="SQL programming",
2330
long_description=read_file('README.md'),
@@ -30,11 +37,6 @@ def read_file(filename):
3037

3138
packages=find_packages(exclude=['dist', 'doc', 'ClickSQL.egg-info']),
3239
include_package_data=True,
33-
install_requires=['pandas>=1.0.5',
34-
'numpy>=1.18.5',
35-
'requests>=2.20.0',
36-
'aiohttp>=3.6.2',
37-
'nest-asyncio>=1.4.1'
38-
],
40+
install_requires=read_requirements('requirements.txt'), # 指定需要安装的依赖,
3941

4042
)

0 commit comments

Comments
 (0)