bugfixes for new package structure
This commit is contained in:
commit
fa21cd4b7e
@ -2,10 +2,10 @@
|
|||||||
import sys, os
|
import sys, os
|
||||||
path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
|
path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
|
||||||
path.rstrip(os.path.sep)
|
path.rstrip(os.path.sep)
|
||||||
if path.endswith('pyqtgraph'):
|
if 'pyqtgraph' in os.listdir(path):
|
||||||
sys.path.insert(0, os.path.join(path, '..')) ## examples installed inside pyqtgraph package
|
|
||||||
elif 'pyqtgraph' in os.listdir(path):
|
|
||||||
sys.path.insert(0, path) ## examples adjacent to pyqtgraph (as in source)
|
sys.path.insert(0, path) ## examples adjacent to pyqtgraph (as in source)
|
||||||
|
elif path.endswith('pyqtgraph'):
|
||||||
|
sys.path.insert(0, os.path.abspath(os.path.join(path, '..'))) ## examples installed inside pyqtgraph package
|
||||||
|
|
||||||
## should force example to use PySide instead of PyQt
|
## should force example to use PySide instead of PyQt
|
||||||
if 'pyside' in sys.argv:
|
if 'pyside' in sys.argv:
|
||||||
|
15
setup.py
15
setup.py
@ -1,11 +1,19 @@
|
|||||||
from distutils.core import setup
|
from distutils.core import setup
|
||||||
|
import distutils.dir_util
|
||||||
import os
|
import os
|
||||||
|
|
||||||
## generate list of all sub-packages
|
## generate list of all sub-packages
|
||||||
subdirs = [i[0].split(os.path.sep)[1:] for i in os.walk('./pyqtgraph') if '__init__.py' in i[2]]
|
path = os.path.abspath(os.path.dirname(__file__))
|
||||||
subdirs = filter(lambda p: len(p) == 1 or p[1] != 'build', subdirs)
|
n = len(path.split(os.path.sep))
|
||||||
|
subdirs = [i[0].split(os.path.sep)[n:] for i in os.walk(os.path.join(path, 'pyqtgraph')) if '__init__.py' in i[2]]
|
||||||
all_packages = ['.'.join(p) for p in subdirs] + ['pyqtgraph.examples']
|
all_packages = ['.'.join(p) for p in subdirs] + ['pyqtgraph.examples']
|
||||||
|
|
||||||
|
|
||||||
|
## Make sure build directory is clean before installing
|
||||||
|
buildPath = os.path.join(path, 'build')
|
||||||
|
if os.path.isdir(buildPath):
|
||||||
|
distutils.dir_util.remove_tree(buildPath)
|
||||||
|
|
||||||
setup(name='pyqtgraph',
|
setup(name='pyqtgraph',
|
||||||
version='',
|
version='',
|
||||||
description='Scientific Graphics and GUI Library for Python',
|
description='Scientific Graphics and GUI Library for Python',
|
||||||
@ -23,6 +31,9 @@ It is intended for use in mathematics / scientific / engineering applications. D
|
|||||||
#package_data={'pyqtgraph': ['graphicsItems/PlotItem/*.png']},
|
#package_data={'pyqtgraph': ['graphicsItems/PlotItem/*.png']},
|
||||||
classifiers = [
|
classifiers = [
|
||||||
"Programming Language :: Python",
|
"Programming Language :: Python",
|
||||||
|
"Programming Language :: Python :: 2",
|
||||||
|
"Programming Language :: Python :: 2.6",
|
||||||
|
"Programming Language :: Python :: 2.7",
|
||||||
"Programming Language :: Python :: 3",
|
"Programming Language :: Python :: 3",
|
||||||
"Development Status :: 4 - Beta",
|
"Development Status :: 4 - Beta",
|
||||||
"Environment :: Other Environment",
|
"Environment :: Other Environment",
|
||||||
|
Loading…
Reference in New Issue
Block a user