From 5ac98faadc0ecadd08af39955b56c8f9cbf9f3da Mon Sep 17 00:00:00 2001 From: ColinDuquesnoy Date: Thu, 9 Apr 2015 16:01:51 +0200 Subject: [PATCH] Add support to stdeb to create debian package out of the qdarkstyle python package --- .gitignore | 6 ++++++ setup.py | 38 ++++++++++++++------------------------ stdeb.cfg | 2 ++ 3 files changed, 22 insertions(+), 24 deletions(-) create mode 100644 stdeb.cfg diff --git a/.gitignore b/.gitignore index 5f6453524..d3349d2c3 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,9 @@ __pycache__ *.sig pkg/ src/ + +*.tar.gz +deb_dist +*~ +*.usr + diff --git a/setup.py b/setup.py index c6c44af22..b77cafc18 100644 --- a/setup.py +++ b/setup.py @@ -27,42 +27,32 @@ QDarkStyle is a darks stylesheet for python qt applications """ from setuptools import setup, find_packages - -def read_version(): - """ - Reads the version without self importing - """ - with open("qdarkstyle/__init__.py") as f: - lines = f.read().splitlines() - for l in lines: - if "__version__" in l: - return l.split("=")[1].strip().replace('"', "") +from qdarkstyle import __version__ setup( name='QDarkStyle', - version=read_version(), + version=__version__, packages=find_packages(), url='https://github.com/ColinDuquesnoy/QDarkStyleSheet', license='MIT', author='Colin Duquesnoy', author_email='colin.duquesnoy@gmail.com', - description='A dark stylesheet for pyside/pyqt applications', + description='A dark stylesheet for PyQt/PySide applications', long_description=""" - This package provides a dark style sheet for PySide/PyQt4/PyQt5 - applications. +This package provides a dark style sheet for PySide/PyQt4/PyQt5 applications. - All you have to do is the following:: +All you have to do is the following:: - import qdarkstyle - app = QtGui.QApplication().instance() - # PySide - app.setStyleSheet(qdarkstyle.load_stylesheet()) - # PyQt4 - app.setStyleSheet(qdarkstyle.load_stylesheet(pyside=False)) - # PyQt5 - app.setStyleSheet(qdarkstyle.load_stylesheet_pyqt5()) + import qdarkstyle + app = QtGui.QApplication().instance() + # PySide + app.setStyleSheet(qdarkstyle.load_stylesheet()) + # PyQt4 + app.setStyleSheet(qdarkstyle.load_stylesheet(pyside=False)) + # PyQt5 + app.setStyleSheet(qdarkstyle.load_stylesheet_pyqt5()) - """, +""", classifiers=[ 'Development Status :: 5 - Production/Stable', 'Environment :: X11 Applications :: Qt', diff --git a/stdeb.cfg b/stdeb.cfg new file mode 100644 index 000000000..8822b8d74 --- /dev/null +++ b/stdeb.cfg @@ -0,0 +1,2 @@ +[DEFAULT] +Copyright-File: COPYING