|
34 | 34 | from guidata.utils import get_subpackages, get_package_data |
35 | 35 |
|
36 | 36 |
|
37 | | -LIBNAME = 'guidata' |
| 37 | +LIBNAME = "guidata" |
38 | 38 | from guidata import __version__ as version |
39 | 39 |
|
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 | +) |
42 | 44 | LONG_DESCRIPTION = """\ |
43 | 45 | guidata: Automatic GUI generation for easy dataset editing and display with Python |
44 | 46 | ====================================================================================== |
|
95 | 97 |
|
96 | 98 | .. _README: https://github.com/PierreRaybaut/guidata/blob/master/README.md""" |
97 | 99 |
|
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"] |
104 | 106 | else: |
105 | | - CLASSIFIERS += ['Development Status :: 5 - Production/Stable'] |
| 107 | + CLASSIFIERS += ["Development Status :: 5 - Production/Stable"] |
106 | 108 |
|
107 | 109 |
|
108 | 110 | def build_chm_doc(libname): |
109 | 111 | """Return CHM documentation file (on Windows only), which is copied under |
110 | 112 | {PythonInstallDir}\Doc, hence allowing Spyder to add an entry for opening |
111 | 113 | package documentation in "Help" menu. This has no effect on a source |
112 | 114 | 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): |
115 | 117 | try: |
116 | 118 | import sphinx # analysis:ignore |
117 | 119 | 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 | + ) |
120 | 123 | 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)"): |
123 | 126 | if osp.isfile(hhc_exe): |
124 | 127 | break |
125 | 128 | 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 | + ) |
128 | 134 | 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) |
132 | 137 | 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)) |
134 | 139 | subprocess.call('"%s" %s' % (hhc_exe, fname), shell=True) |
135 | 140 | if osp.isfile(fname): |
136 | 141 | return fname |
137 | 142 | else: |
138 | | - print('Warning: CHM building process failed', file=sys.stderr) |
| 143 | + print("Warning: CHM building process failed", file=sys.stderr) |
| 144 | + |
139 | 145 |
|
140 | 146 | CHM_DOC = build_chm_doc(LIBNAME) |
141 | 147 |
|
142 | 148 |
|
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 | + |
| 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