Add support to stdeb

to create debian package out of the qdarkstyle python package
This commit is contained in:
ColinDuquesnoy 2015-04-09 16:01:51 +02:00
parent 44252b23db
commit 5ac98faadc
3 changed files with 22 additions and 24 deletions

6
.gitignore vendored
View File

@ -14,3 +14,9 @@ __pycache__
*.sig *.sig
pkg/ pkg/
src/ src/
*.tar.gz
deb_dist
*~
*.usr

View File

@ -27,42 +27,32 @@
QDarkStyle is a darks stylesheet for python qt applications QDarkStyle is a darks stylesheet for python qt applications
""" """
from setuptools import setup, find_packages from setuptools import setup, find_packages
from qdarkstyle import __version__
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('"', "")
setup( setup(
name='QDarkStyle', name='QDarkStyle',
version=read_version(), version=__version__,
packages=find_packages(), packages=find_packages(),
url='https://github.com/ColinDuquesnoy/QDarkStyleSheet', url='https://github.com/ColinDuquesnoy/QDarkStyleSheet',
license='MIT', license='MIT',
author='Colin Duquesnoy', author='Colin Duquesnoy',
author_email='colin.duquesnoy@gmail.com', author_email='colin.duquesnoy@gmail.com',
description='A dark stylesheet for pyside/pyqt applications', description='A dark stylesheet for PyQt/PySide applications',
long_description=""" long_description="""
This package provides a dark style sheet for PySide/PyQt4/PyQt5 This package provides a dark style sheet for PySide/PyQt4/PyQt5 applications.
applications.
All you have to do is the following:: All you have to do is the following::
import qdarkstyle import qdarkstyle
app = QtGui.QApplication().instance() app = QtGui.QApplication().instance()
# PySide # PySide
app.setStyleSheet(qdarkstyle.load_stylesheet()) app.setStyleSheet(qdarkstyle.load_stylesheet())
# PyQt4 # PyQt4
app.setStyleSheet(qdarkstyle.load_stylesheet(pyside=False)) app.setStyleSheet(qdarkstyle.load_stylesheet(pyside=False))
# PyQt5 # PyQt5
app.setStyleSheet(qdarkstyle.load_stylesheet_pyqt5()) app.setStyleSheet(qdarkstyle.load_stylesheet_pyqt5())
""", """,
classifiers=[ classifiers=[
'Development Status :: 5 - Production/Stable', 'Development Status :: 5 - Production/Stable',
'Environment :: X11 Applications :: Qt', 'Environment :: X11 Applications :: Qt',

2
stdeb.cfg Normal file
View File

@ -0,0 +1,2 @@
[DEFAULT]
Copyright-File: COPYING