优化包结构!
This commit is contained in:
parent
d88249e4cf
commit
28e4fbcfcc
6 changed files with 44 additions and 2 deletions
5
MANIFEST.in
Normal file
5
MANIFEST.in
Normal file
|
@ -0,0 +1,5 @@
|
|||
include MANIFEST.in
|
||||
include README.md
|
||||
include images/*
|
||||
include resource/*
|
||||
exclude test/*
|
0
main/__init__.py
Normal file
0
main/__init__.py
Normal file
|
@ -11,6 +11,7 @@ from tool import QSSLoader
|
|||
class MainWindow(QWidget):
|
||||
def __init__(self):
|
||||
super(MainWindow, self).__init__()
|
||||
self.setWindowTitle("OSS图床上传")
|
||||
layout = QHBoxLayout(self, spacing=0)
|
||||
self.listWidget = QListWidget()
|
||||
self.resize(800, 600)
|
||||
|
@ -62,10 +63,10 @@ class MainWindow(QWidget):
|
|||
if __name__ == '__main__':
|
||||
app = QApplication(sys.argv)
|
||||
main = MainWindow()
|
||||
style_file = 'resource/current.qss'
|
||||
style_file = os.getcwd()+'/resource/current.qss'
|
||||
style_sheet = QSSLoader.QSSLoader.read_qss_file(style_file)
|
||||
# apply_stylesheet(app, theme='light_blue.xml')
|
||||
app.setWindowIcon(QIcon('./images/icon.svg'))
|
||||
app.setWindowIcon(QIcon(os.getcwd()+'/images/icon.svg'))
|
||||
main.setStyleSheet(style_sheet)
|
||||
|
||||
main.show()
|
35
setup.py
Normal file
35
setup.py
Normal file
|
@ -0,0 +1,35 @@
|
|||
"""
|
||||
This is a setup.py script
|
||||
"""
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
VERSION = "0.1"
|
||||
INSTALL = ["oss2", "notify2", "dbus-python", "PyQt5", "json"]
|
||||
PACKAGES = find_packages()
|
||||
|
||||
setup(
|
||||
name="PyQtPicUpload",
|
||||
version=VERSION,
|
||||
author="liyp",
|
||||
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',
|
||||
],
|
||||
|
||||
platforms=["POSIX"],
|
||||
keywords=["IMAGE","OSS"],
|
||||
exclude_package_date={'test':['']},
|
||||
install_requires=INSTALL,
|
||||
packages=PACKAGES,
|
||||
python_requires=">=3.6",
|
||||
)
|
|
@ -4,5 +4,6 @@ class QSSLoader:
|
|||
|
||||
@staticmethod
|
||||
def read_qss_file(qss_file_name):
|
||||
# print(qss_file_name)
|
||||
with open(qss_file_name, 'r', encoding='UTF-8') as file:
|
||||
return file.read()
|
||||
|
|
0
tool/__init__.py
Normal file
0
tool/__init__.py
Normal file
Loading…
Reference in a new issue