我写了一个Python库,这是我的第一个Python库,已经发布在PyPI和GitHub上。
这个库运行得非常好,但是setup()
却不起作用。
当我通过pip install
安装它时,它会下载appfly包但不会安装所需的依赖项:Flask,flask_cors, Flask-SocketIO和jsonmerge
。因此,我需要自己安装它们。
如果我自己安装依赖项,它就可以正常工作,但我认为这不是使用Python库的正确方法,对吗?
这是我的setup.py
文件,我做错了什么吗?
from setuptools import setup, find_packages
from appfly import __version__ as version
with open('README.md') as readme_file:
readme = readme_file.read()
# with open('HISTORY.md') as history_file:
# history = history_file.read()
requirements = [
'Flask==1.0.2',
'flask_cors==3.0.6',
'Flask-SocketIO==3.0.2',
'jsonmerge==1.5.2'
]
setup(
author="Italo José G. de Oliveira",
author_email='italo.i@live.com',
classifiers=[
'Natural Language :: English',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
],
description="This pkg encapsulate the base flask server configurations",
install_requires=requirements,
license="MIT license",
long_description=readme,
include_package_data=True,
keywords='appfly',
name='appfly',
packages=find_packages(),
url='https://github.com/italojs/appfly',
version=version,
zip_safe=False,
)