|
1
|
|
|
#! /usr/bin/env python |
|
2
|
|
|
# |
|
3
|
|
|
# Copyright (C) 2007-2009 Rich Lewis <[email protected]> |
|
4
|
|
|
# License: 3-clause BSD |
|
5
|
|
|
|
|
6
|
|
|
from setuptools.command.test import test as TestCommand |
|
7
|
|
|
from setuptools import setup, find_packages |
|
8
|
|
|
import sys |
|
9
|
|
|
|
|
10
|
|
|
DISTNAME = 'scikit-chem' |
|
11
|
|
|
DESCRIPTION = 'A set of python modules for cheminformatics' |
|
12
|
|
|
with open('README.md') as f: |
|
13
|
|
|
LONG_DESCRIPTION = f.read() |
|
14
|
|
|
MAINTAINER = 'Richard Lewis' |
|
15
|
|
|
MAINTAINER_EMAIL = '[email protected]' |
|
16
|
|
|
URL = 'http://github.com/richlewis42/scikit-chem' |
|
17
|
|
|
LICENSE = 'new BSD' |
|
18
|
|
|
DOWNLOAD_URL = 'https://github.com/richlewis42/scikit-chem/archive/master.zip' |
|
19
|
|
|
CLASSIFIERS = [ |
|
20
|
|
|
'Development Status:: 2 - Pre - Alpha', |
|
21
|
|
|
'Intended Audience :: Science/Research', |
|
22
|
|
|
'Intended Audience :: Developers', |
|
23
|
|
|
'License :: OSI Approved :: BSD License', |
|
24
|
|
|
'Natural Language :: English', |
|
25
|
|
|
'Programming Language :: Python', |
|
26
|
|
|
'Programming Language :: Python :: 2', |
|
27
|
|
|
'Programming Language :: Python :: 2.7', |
|
28
|
|
|
'Programming Language :: Python :: 3', |
|
29
|
|
|
'Programming Language :: Python :: 3.5', |
|
30
|
|
|
'Operating System :: Microsoft :: Windows', |
|
31
|
|
|
'Operating System :: POSIX', |
|
32
|
|
|
'Operating System :: Unix', |
|
33
|
|
|
'Operating System :: MacOS', |
|
34
|
|
|
'Topic :: Software Development', |
|
35
|
|
|
'Topic :: Scientific/Engineering :: Chemistry' |
|
36
|
|
|
] |
|
37
|
|
|
MAJOR = 0 |
|
38
|
|
|
MINOR = 0 |
|
39
|
|
|
MICRO = 6 |
|
40
|
|
|
VERSION = '{major}.{minor}.{micro}'.format(major=MAJOR, minor=MINOR, micro=MICRO) |
|
41
|
|
|
|
|
42
|
|
|
with open('requirements.txt') as f: |
|
43
|
|
|
REQUIREMENTS = [l.strip() for l in f] |
|
44
|
|
|
REQUIREMENTS.remove('rdkit') |
|
45
|
|
|
|
|
46
|
|
|
with open('test_requirements.txt') as f: |
|
47
|
|
|
TEST_REQUIREMENTS = [l.strip() for l in f] |
|
48
|
|
|
|
|
49
|
|
|
|
|
50
|
|
|
class PyTest(TestCommand): |
|
51
|
|
|
user_options = [('pytest-args=', 'a', "Arguments to pass to py.test")] |
|
52
|
|
|
|
|
53
|
|
|
def initialize_options(self): |
|
54
|
|
|
TestCommand.initialize_options(self) |
|
55
|
|
|
self.pytest_args = [] |
|
56
|
|
|
|
|
57
|
|
|
def run_tests(self): |
|
58
|
|
|
# import here, cause outside the eggs aren't loaded |
|
59
|
|
|
import pytest |
|
60
|
|
|
errno = pytest.main(self.pytest_args) |
|
61
|
|
|
sys.exit(errno) |
|
62
|
|
|
|
|
63
|
|
|
def setup_package(): |
|
64
|
|
|
|
|
65
|
|
|
metadata = dict(name=DISTNAME, |
|
66
|
|
|
maintainer=MAINTAINER, |
|
67
|
|
|
maintainer_email=MAINTAINER_EMAIL, |
|
68
|
|
|
description=DESCRIPTION, |
|
69
|
|
|
license=LICENSE, |
|
70
|
|
|
url=URL, |
|
71
|
|
|
version=VERSION, |
|
72
|
|
|
download_url=DOWNLOAD_URL, |
|
73
|
|
|
long_description=LONG_DESCRIPTION, |
|
74
|
|
|
classifiers=CLASSIFIERS |
|
75
|
|
|
) |
|
76
|
|
|
|
|
77
|
|
|
setup( |
|
78
|
|
|
packages=find_packages(), |
|
79
|
|
|
cmdclass={'test': PyTest}, |
|
80
|
|
|
package_data = { |
|
81
|
|
|
'skchem.target_prediction': ['data/PIDGIN_models.pkl.gz'], |
|
82
|
|
|
'skchem.resource': ['atom_data.csv'], |
|
83
|
|
|
'skchem.standardizers': ['default_config.xml']}, |
|
84
|
|
|
include_package_data=True, |
|
85
|
|
|
install_requires=REQUIREMENTS, |
|
86
|
|
|
tests_require=TEST_REQUIREMENTS, |
|
87
|
|
|
zip_safe=False, |
|
88
|
|
|
**metadata |
|
89
|
|
|
) |
|
90
|
|
|
|
|
91
|
|
|
|
|
92
|
|
|
if __name__ == "__main__": |
|
93
|
|
|
setup_package() |
|
94
|
|
|
|