Skip to content

Commit fdc069c

Browse files
Partially modernize build system (#943)
* Add pyproject.toml This also removes `setup_requires`, which is no longer necessary. * Use enviroment markers for enum34 * Use whitelist in find_packages Without this, `openhtf` was shipping a top-level package called "pylint_plugins". This makes it so other directories in the repo root won't be automatically released as top-level packages if an `__init__.py` is added to them. * Move [wheel] to [bdist_wheel] * Add python_requires * Remove maximum version for pandas
1 parent 0668e88 commit fdc069c

File tree

3 files changed

+8
-11
lines changed

3 files changed

+8
-11
lines changed

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[build-system]
2+
requires = ["setuptools>=40.8.0", "wheel>=0.29.0"]
3+
build-backend = "setuptools.build_meta"

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
[wheel]
1+
[bdist_wheel]
22
universal = 1

setup.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ def run(self):
128128
'attrs>=19.3.0',
129129
'colorama>=0.3.9,<1.0',
130130
'contextlib2>=0.5.1,<1.0',
131+
'enum34>=1.1.2,<2.0 ; python_version<"3.4"',
131132
'future>=0.16.0',
132133
'mutablerecords>=0.4.1,<2.0',
133134
'oauth2client>=1.5.2,<2.0',
@@ -138,11 +139,6 @@ def run(self):
138139
'tornado>=4.3,<5.0',
139140
'six>=1.12.0',
140141
]
141-
# Not all versions of setuptools support semicolon syntax for specifying
142-
# platform-specific dependencies, so we do it the old school way.
143-
if sys.version_info < (3,4):
144-
INSTALL_REQUIRES.append('enum34>=1.1.2,<2.0')
145-
146142

147143

148144
class PyTestCommand(test):
@@ -188,13 +184,14 @@ def run_tests(self):
188184
author_email='[email protected]',
189185
maintainer='Joe Ethier',
190186
maintainer_email='[email protected]',
191-
packages=find_packages(exclude='examples'),
187+
packages=find_packages(include=['openhtf.*']),
192188
package_data={'openhtf': ['output/proto/*.proto',
193189
'output/web_gui/dist/*.*',
194190
'output/web_gui/dist/css/*',
195191
'output/web_gui/dist/js/*',
196192
'output/web_gui/dist/img/*',
197193
'output/web_gui/*.*']},
194+
python_requires='>=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*',
198195
cmdclass={
199196
'build_proto': BuildProtoCommand,
200197
'clean': CleanCommand,
@@ -213,12 +210,9 @@ def run_tests(self):
213210
'pyserial>=3.3.0,<4.0',
214211
],
215212
'examples': [
216-
'pandas>=0.22.0,<0.25.0',
213+
'pandas>=0.22.0',
217214
],
218215
},
219-
setup_requires=[
220-
'wheel>=0.29.0,<1.0',
221-
],
222216
tests_require=[
223217
'mock>=2.0.0',
224218
# Remove max version here after we drop Python 2 support.

0 commit comments

Comments
 (0)