forked from MikeDacre/fyrd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
executable file
·116 lines (98 loc) · 3.91 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# -*- 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
import versioneer
log = setuptools.distutils.log
VERSION=versioneer.get_version()
GITHUB='https://github.com/MikeDacre/fyrd'
###############################################################################
# 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))
# Set command class
cmdclass = versioneer.get_cmdclass()
tcmdclss = {'test': TestRunner}
for k, v in cmdclass.items():
tcmdclss[k] = v
cmdclass = tcmdclss
###############################################################################
# Setup Options #
###############################################################################
setup(
name='fyrd',
version=VERSION,
description=('Submit functions and shell scripts to torque, slurm, ' +
'or local machines'),
long_description=long_description,
url='https://fyrd.science',
download_url='{}/archive/v{}.tar.gz'.format(
GITHUB, VERSION
),
author='Michael Dacre',
author_email='[email protected]',
license='MIT',
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Science/Research',
'Environment :: Console',
'Operating System :: POSIX :: 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',
requires=['dill', 'tabulate', 'six', 'tblib', 'psutil'
'tqdm', 'Pyro4', 'sqlalchemy'],
install_requires=['dill', 'tabulate', 'six', 'Pyro4', 'psutil',
'tblib', 'tqdm', 'sqlalchemy'],
tests_require=['pytest'],
packages=['fyrd', 'fyrd/batch_systems'],
cmdclass=cmdclass,
scripts=scpts,
entry_points={
'console_scripts': [
'fyrd = fyrd.__main__:main',
]
},
)