forked from MikeDacre/fyrd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·99 lines (83 loc) · 3.41 KB
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
# -*- coding: utf-8 -*-
"""
Setup Script for Fyrd
"""
import os
import codecs
import setuptools
from setuptools import setup
from setuptools.command.test import test as TestCommand
log = setuptools.distutils.log
###############################################################################
# A class to run tests #
###############################################################################
class TestRunner(TestCommand):
"""Run script in tests directory with py.test and without.
The local queue can't be tested with py.test, so we run it outside of
py.test, we also skip remote tests here because they require some config
before being able to successfully execute.
"""
def run_tests(self):
"""Run the test script, skip remote tests here."""
import sys
from subprocess import check_call
# The remote queue testing can fail for a variety of config reasons
# so we won't run it here
check_call([sys.executable, 'tests/run_tests.py', '-l'])
###############################################################################
# Build the things we need for setup #
###############################################################################
# Get the long description from the README file
here = os.path.abspath(os.path.dirname(__file__))
with codecs.open(os.path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()
# Generate a list of python scripts
scpts = []
scpt_dir = os.listdir(os.path.join(here, 'bin'))
for scpt in scpt_dir:
scpts.append(os.path.join('bin', scpt))
###############################################################################
# Setup Options #
###############################################################################
setup(
name='fyrd',
version='0.6.1-beta.6',
description=('Submit functions and shell scripts to torque, slurm, ' +
'or local machines'),
long_description=long_description,
url='https://github.com/MikeDacre/fyrd',
author='Michael Dacre',
author_email='mike.dacre@gmail.com',
license='MIT',
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Science/Research',
'Environment :: Console',
'Operating System :: Linux',
'Natural Language :: English',
'Topic :: System :: Clustering',
'Topic :: System :: Monitoring',
'Topic :: Software Development :: Libraries',
'Topic :: Software Development :: Libraries :: Python Modules',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
],
keywords='slurm torque multiprocessing cluster job_management',
install_requires=['dill', 'tabulate'],
tests_require=['pytest'],
packages=['fyrd'],
cmdclass={'test': TestRunner},
scripts=scpts,
entry_points={
'console_scripts': [
'fyrd = fyrd.__main__:main',
]
},
)