Skip to content

Commit 002076b

Browse files
committed
Documented new QtPy requirement
1 parent bb4bdc8 commit 002076b

File tree

3 files changed

+63
-51
lines changed

3 files changed

+63
-51
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ Application development tools:
4545
- Python 2.6+ or Python 3.2+
4646
- [PyQt4](https://pypi.python.org/pypi/PyQt4) 4.3+ or [PyQt5](https://pypi.python.org/pypi/PyQt5) 5.5+
4747
- [spyder](https://pypi.python.org/pypi/spyder) 2.1+ (test launcher and array/dictionnary editors)
48+
- [QtPy](https://pypi.org/project/QtPy/) >= 1.3
4849

4950
### Optional Python modules
5051

doc/installation.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Requirements:
88

99
* Python 2.x (x>=6) or 3.x (x>=2)
1010
* `PyQt4`_ 4.x (x>=3 ; recommended x>=4) or `PyQt5`_ 5.x (x>=5)
11+
* `QtPy`_ >= 1.3
1112

1213
Optional Python modules:
1314

@@ -17,6 +18,7 @@ Optional Python modules:
1718

1819
.. _PyQt4: https://pypi.python.org/pypi/PyQt4
1920
.. _PyQt5: https://pypi.python.org/pypi/PyQt5
21+
.. _qtpy: https://pypi.org/project/QtPy/
2022
.. _spyder: https://pypi.python.org/pypi/Spyder
2123
.. _h5py: https://pypi.python.org/pypi/h5py
2224
.. _cx_Freeze: https://pypi.python.org/pypi/cx_Freeze

setup.py

Lines changed: 60 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,13 @@
3434
from guidata.utils import get_subpackages, get_package_data
3535

3636

37-
LIBNAME = 'guidata'
37+
LIBNAME = "guidata"
3838
from guidata import __version__ as version
3939

40-
DESCRIPTION = 'Automatic graphical user interfaces generation for easy '\
41-
'dataset editing and display'
40+
DESCRIPTION = (
41+
"Automatic graphical user interfaces generation for easy "
42+
"dataset editing and display"
43+
)
4244
LONG_DESCRIPTION = """\
4345
guidata: Automatic GUI generation for easy dataset editing and display with Python
4446
======================================================================================
@@ -95,76 +97,83 @@
9597
9698
.. _README: https://github.com/PierreRaybaut/guidata/blob/master/README.md"""
9799

98-
KEYWORDS = ''
99-
CLASSIFIERS = ['Topic :: Scientific/Engineering']
100-
if 'beta' in version or 'b' in version:
101-
CLASSIFIERS += ['Development Status :: 4 - Beta']
102-
elif 'alpha' in version or 'a' in version:
103-
CLASSIFIERS += ['Development Status :: 3 - Alpha']
100+
KEYWORDS = ""
101+
CLASSIFIERS = ["Topic :: Scientific/Engineering"]
102+
if "beta" in version or "b" in version:
103+
CLASSIFIERS += ["Development Status :: 4 - Beta"]
104+
elif "alpha" in version or "a" in version:
105+
CLASSIFIERS += ["Development Status :: 3 - Alpha"]
104106
else:
105-
CLASSIFIERS += ['Development Status :: 5 - Production/Stable']
107+
CLASSIFIERS += ["Development Status :: 5 - Production/Stable"]
106108

107109

108110
def build_chm_doc(libname):
109111
"""Return CHM documentation file (on Windows only), which is copied under
110112
{PythonInstallDir}\Doc, hence allowing Spyder to add an entry for opening
111113
package documentation in "Help" menu. This has no effect on a source
112114
distribution."""
113-
args = ''.join(sys.argv)
114-
if os.name == 'nt' and ('bdist' in args or 'build' in args):
115+
args = "".join(sys.argv)
116+
if os.name == "nt" and ("bdist" in args or "build" in args):
115117
try:
116118
import sphinx # analysis:ignore
117119
except ImportError:
118-
print('Warning: `sphinx` is required to build documentation',
119-
file=sys.stderr)
120+
print(
121+
"Warning: `sphinx` is required to build documentation", file=sys.stderr
122+
)
120123
return
121-
hhc_base = r'C:\Program Files%s\HTML Help Workshop\hhc.exe'
122-
for hhc_exe in (hhc_base % '', hhc_base % ' (x86)'):
124+
hhc_base = r"C:\Program Files%s\HTML Help Workshop\hhc.exe"
125+
for hhc_exe in (hhc_base % "", hhc_base % " (x86)"):
123126
if osp.isfile(hhc_exe):
124127
break
125128
else:
126-
print('Warning: `HTML Help Workshop` is required to build CHM '\
127-
'documentation file', file=sys.stderr)
129+
print(
130+
"Warning: `HTML Help Workshop` is required to build CHM "
131+
"documentation file",
132+
file=sys.stderr,
133+
)
128134
return
129-
doctmp_dir = 'doctmp'
130-
subprocess.call('sphinx-build -b htmlhelp doc %s' % doctmp_dir,
131-
shell=True)
135+
doctmp_dir = "doctmp"
136+
subprocess.call("sphinx-build -b htmlhelp doc %s" % doctmp_dir, shell=True)
132137
atexit.register(shutil.rmtree, osp.abspath(doctmp_dir))
133-
fname = osp.abspath(osp.join(doctmp_dir, '%s.chm' % libname))
138+
fname = osp.abspath(osp.join(doctmp_dir, "%s.chm" % libname))
134139
subprocess.call('"%s" %s' % (hhc_exe, fname), shell=True)
135140
if osp.isfile(fname):
136141
return fname
137142
else:
138-
print('Warning: CHM building process failed', file=sys.stderr)
143+
print("Warning: CHM building process failed", file=sys.stderr)
144+
139145

140146
CHM_DOC = build_chm_doc(LIBNAME)
141147

142148

143-
setup(name=LIBNAME, version=version,
144-
description=DESCRIPTION, long_description=LONG_DESCRIPTION,
145-
packages=get_subpackages(LIBNAME),
146-
package_data={LIBNAME:
147-
get_package_data(LIBNAME, ('.png', '.svg', '.mo'))},
148-
data_files=[(r'Doc', [CHM_DOC])] if CHM_DOC else [],
149-
install_requires=["QtPy"],
150-
entry_points={'gui_scripts':
151-
['guidata-tests-py%d = guidata.tests:run'\
152-
% sys.version_info.major,]},
153-
extras_require = {
154-
'Doc': ["Sphinx>=1.1"],
155-
},
156-
author = "Pierre Raybaut",
157-
author_email = '[email protected]',
158-
url = 'https://github.com/PierreRaybaut/%s' % LIBNAME,
159-
license = 'CeCILL V2',
160-
classifiers=CLASSIFIERS + [
161-
'Operating System :: MacOS',
162-
'Operating System :: Microsoft :: Windows',
163-
'Operating System :: OS Independent',
164-
'Operating System :: POSIX',
165-
'Operating System :: Unix',
166-
'Programming Language :: Python :: 2.6',
167-
'Programming Language :: Python :: 2.7',
168-
'Programming Language :: Python :: 3',
169-
],
170-
)
149+
setup(
150+
name=LIBNAME,
151+
version=version,
152+
description=DESCRIPTION,
153+
long_description=LONG_DESCRIPTION,
154+
packages=get_subpackages(LIBNAME),
155+
package_data={LIBNAME: get_package_data(LIBNAME, (".png", ".svg", ".mo"))},
156+
data_files=[(r"Doc", [CHM_DOC])] if CHM_DOC else [],
157+
install_requires=["QtPy>=1.3"],
158+
entry_points={
159+
"gui_scripts": [
160+
"guidata-tests-py%d = guidata.tests:run" % sys.version_info.major,
161+
]
162+
},
163+
extras_require={"Doc": ["Sphinx>=1.1"],},
164+
author="Pierre Raybaut",
165+
author_email="[email protected]",
166+
url="https://github.com/PierreRaybaut/%s" % LIBNAME,
167+
license="CeCILL V2",
168+
classifiers=CLASSIFIERS
169+
+ [
170+
"Operating System :: MacOS",
171+
"Operating System :: Microsoft :: Windows",
172+
"Operating System :: OS Independent",
173+
"Operating System :: POSIX",
174+
"Operating System :: Unix",
175+
"Programming Language :: Python :: 2.6",
176+
"Programming Language :: Python :: 2.7",
177+
"Programming Language :: Python :: 3",
178+
],
179+
)

0 commit comments

Comments
 (0)