From 95d5e864f44ec28d010546b3b11c225aeb34e235 Mon Sep 17 00:00:00 2001 From: liyp Date: Sun, 27 Mar 2022 22:42:41 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96setup.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- setup.py | 41 ++++++++++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 15 deletions(-) diff --git a/setup.py b/setup.py index f028a64..8f36878 100644 --- a/setup.py +++ b/setup.py @@ -2,11 +2,10 @@ This is a setup.py script """ from setuptools import setup, find_packages +from glob import glob VERSION = "0.1" INSTALL = ["oss2", "notify2", "dbus-python", "PyQt5", "json"] -PACKAGES = find_packages() - setup( name="PyQtPicUpload", version=VERSION, @@ -14,22 +13,34 @@ setup( author_email="my@liyp.cc", description="a OSS Image Upload Tool", license="GPL3", - include_package_data=True, + url="https://git.liyp.cc/xmengnet/PyQtPicUpload", classifiers=[ - 'Programming Language :: Python :: 3', - 'Programming Language :: Python :: 3.6', - 'Programming Language :: Python :: 3.7', - 'Programming Language :: Python :: 3.8', - 'Programming Language :: Python :: 3.9', - 'Programming Language :: Python :: 3.10', - 'Operating System :: POSIX', - ], + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'Programming Language :: Python :: 3.8', + 'Programming Language :: Python :: 3.9', + 'Programming Language :: Python :: 3.10', + 'Operating System :: POSIX', + ], platforms=["POSIX"], - keywords=["IMAGE","OSS"], - exclude_package_date={'test':['']}, + keywords=["IMAGE", "OSS"], install_requires=INSTALL, - packages=PACKAGES, + packages=find_packages(), + # 安装过程中,需要安装的静态文件,如配置文件、service文件、图片等 + data_files=[ + ('resource', ['resource/current.qss']), + ('image', ['images/up.png', 'images/upload.png', 'images/setting_icon.png', 'images/icon.svg']) + ], + include_package_data=True, + # 用来支持自动生成脚本,安装后会自动生成 /usr/bin/foo 的可执行文件 + # 该文件入口指向 foo/main.py 的main 函数 + entry_points={ + 'console_scripts': [ + 'picupload = main.main:main' + ] + }, python_requires=">=3.6", -) \ No newline at end of file +)