| ... |
... |
@@ -25,10 +25,6 @@ import subprocess |
|
25
|
25
|
import sys
|
|
26
|
26
|
import versioneer
|
|
27
|
27
|
|
|
28
|
|
-if sys.version_info[0] != 3 or sys.version_info[1] < 5:
|
|
29
|
|
- print("BuildStream requires Python >= 3.5")
|
|
30
|
|
- sys.exit(1)
|
|
31
|
|
-
|
|
32
|
28
|
try:
|
|
33
|
29
|
from setuptools import setup, find_packages, Command
|
|
34
|
30
|
from setuptools.command.easy_install import ScriptWriter
|
| ... |
... |
@@ -218,6 +214,15 @@ def get_cmdclass(): |
|
218
|
214
|
return cmdclass
|
|
219
|
215
|
|
|
220
|
216
|
|
|
|
217
|
+#####################################################
|
|
|
218
|
+# Gather requirements #
|
|
|
219
|
+#####################################################
|
|
|
220
|
+setup_requires = set(['pytest-runner'])
|
|
|
221
|
+with open('dev-requirements.txt') as dev_reqs:
|
|
|
222
|
+ dev_requires = set([line for line in dev_reqs.read().split('\n')
|
|
|
223
|
+ if not line.strip().startswith('#')])
|
|
|
224
|
+
|
|
|
225
|
+
|
|
221
|
226
|
#####################################################
|
|
222
|
227
|
# Main setup() Invocation #
|
|
223
|
228
|
#####################################################
|
| ... |
... |
@@ -248,6 +253,7 @@ setup(name='BuildStream', |
|
248
|
253
|
os.path.join('buildstream', 'data', 'bst')
|
|
249
|
254
|
])
|
|
250
|
255
|
],
|
|
|
256
|
+ python_requires='>=3.5',
|
|
251
|
257
|
install_requires=[
|
|
252
|
258
|
'setuptools',
|
|
253
|
259
|
'psutil',
|
| ... |
... |
@@ -260,17 +266,6 @@ setup(name='BuildStream', |
|
260
|
266
|
'grpcio >= 1.10',
|
|
261
|
267
|
],
|
|
262
|
268
|
entry_points=bst_install_entry_points,
|
|
263
|
|
- setup_requires=['pytest-runner'],
|
|
264
|
|
- tests_require=['pep8',
|
|
265
|
|
- # Pin coverage to 4.2 for now, we're experiencing
|
|
266
|
|
- # random crashes with 4.4.2
|
|
267
|
|
- 'coverage == 4.4.0',
|
|
268
|
|
- 'pytest-datafiles',
|
|
269
|
|
- 'pytest-env',
|
|
270
|
|
- 'pytest-pep8',
|
|
271
|
|
- 'pytest-pylint',
|
|
272
|
|
- 'pytest-cov >= 2.5.0',
|
|
273
|
|
- # Provide option to run tests in parallel, less reliable
|
|
274
|
|
- 'pytest-xdist',
|
|
275
|
|
- 'pytest >= 3.1.0'],
|
|
|
269
|
+ setup_requires=list(setup_requires),
|
|
|
270
|
+ tests_require=list(dev_requires - setup_requires),
|
|
276
|
271
|
zip_safe=False)
|