Skip to content

Commit

Permalink
Define python package version and requirements
Browse files Browse the repository at this point in the history
- close #8
  • Loading branch information
eldond committed Apr 25, 2018
1 parent cc18300 commit 67427aa
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 0 deletions.
10 changes: 10 additions & 0 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,19 @@
# Plotting imports
import pyqtgraph as pg

# Define module
__version__ = '0.0.0'
__maintainer__ = "David Eldon"
__email__ = "[email protected]"
__status__ = "Development"

__all__ = ['figure', 'axes', 'pyplot', 'translate', 'examples']

# Setup style, etc.
pg.setConfigOption('background', 'w')
pg.setConfigOption('foreground', 'k')

# Make a QApp so that windows can be opened
if os.environ.get('PYQTMPL_DEBUG', None) is None:
os.environ['PYQTMPL_DEBUG'] = "0"
app = QtGui.QApplication(sys.argv)
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
pyqtgraph>=0.9.10
matplotlib>=1.5.3
numpy>=1.11.0
28 changes: 28 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# # -*- coding: utf-8 -*-

# Basic imports
from setuptools import setup

# pyqtmpl imports
import __init__

# http://python-packaging.readthedocs.io/en/latest/dependencies.html
# https://packaging.python.org/discussions/install-requires-vs-requirements/

# Read requirements from requirements.txt
reqs = open('requirements.txt', 'r')
rlines = [a for a in reqs.read().split('\n') if len(a)]

# Run setup
setup(
name='pyqtmpl',
version=__init__.__version__,
description='Wrapper for calling PyQtGraph with Matplotlib syntax',
url='https://github.com/eldond/pyqtmpl',
author=__init__.__maintainer__,
author_email=__init__.__email__,
packages=[
'pyqtmpl',
],
install_requires=rlines,
)

0 comments on commit 67427aa

Please sign in to comment.