annotate setup.py @ 93:36c141f0f0bd default tip

add tensorflow dependency + console scripts
author Jeff Hammel <k0scist@gmail.com>
date Sun, 17 Dec 2017 14:31:35 -0800
parents a7d8583f7482
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a70bd2cd508b initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
1 """
a70bd2cd508b initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
2 setup packaging script for tvii
a70bd2cd508b initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
3 """
a70bd2cd508b initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
4
a70bd2cd508b initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
5 import os
a70bd2cd508b initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
6
a70bd2cd508b initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
7 version = "0.0"
26
d945a862617c note dependencies; need wheels
Jeff Hammel <k0scist@gmail.com>
parents: 9
diff changeset
8 dependencies = ['h5py',
d945a862617c note dependencies; need wheels
Jeff Hammel <k0scist@gmail.com>
parents: 9
diff changeset
9 'matplotlib',
d945a862617c note dependencies; need wheels
Jeff Hammel <k0scist@gmail.com>
parents: 9
diff changeset
10 'numerics',
d945a862617c note dependencies; need wheels
Jeff Hammel <k0scist@gmail.com>
parents: 9
diff changeset
11 'numpy',
d945a862617c note dependencies; need wheels
Jeff Hammel <k0scist@gmail.com>
parents: 9
diff changeset
12 'Pillow',
40
a7d8583f7482 [packaging] lets try out scikit learn
Jeff Hammel <k0scist@gmail.com>
parents: 26
diff changeset
13 'scikit-learn',
93
36c141f0f0bd add tensorflow dependency + console scripts
Jeff Hammel <k0scist@gmail.com>
parents: 40
diff changeset
14 'scipy',
36c141f0f0bd add tensorflow dependency + console scripts
Jeff Hammel <k0scist@gmail.com>
parents: 40
diff changeset
15 'tensorflow']
0
a70bd2cd508b initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
16
a70bd2cd508b initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
17 # allow use of setuptools/distribute or distutils
a70bd2cd508b initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
18 kw = {}
a70bd2cd508b initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
19 try:
a70bd2cd508b initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
20 from setuptools import setup
a70bd2cd508b initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
21 kw['entry_points'] = """
40
a7d8583f7482 [packaging] lets try out scikit learn
Jeff Hammel <k0scist@gmail.com>
parents: 26
diff changeset
22 [console_scripts]
93
36c141f0f0bd add tensorflow dependency + console scripts
Jeff Hammel <k0scist@gmail.com>
parents: 40
diff changeset
23 centroid = nettwerk.centroid:main
36c141f0f0bd add tensorflow dependency + console scripts
Jeff Hammel <k0scist@gmail.com>
parents: 40
diff changeset
24 gaussian = nettwerk.dataset.gauss:main
36c141f0f0bd add tensorflow dependency + console scripts
Jeff Hammel <k0scist@gmail.com>
parents: 40
diff changeset
25 k-means = nettwerk.kmeans:main
36c141f0f0bd add tensorflow dependency + console scripts
Jeff Hammel <k0scist@gmail.com>
parents: 40
diff changeset
26 line = nettwerk.dataset.line:main
36c141f0f0bd add tensorflow dependency + console scripts
Jeff Hammel <k0scist@gmail.com>
parents: 40
diff changeset
27 linear-regression = nettwerk.linear_regression:main
36c141f0f0bd add tensorflow dependency + console scripts
Jeff Hammel <k0scist@gmail.com>
parents: 40
diff changeset
28 nettwerk-mnist = nettwerk.mnist:main
36c141f0f0bd add tensorflow dependency + console scripts
Jeff Hammel <k0scist@gmail.com>
parents: 40
diff changeset
29 random-circle = nettwerk.dataset.circle:main
36c141f0f0bd add tensorflow dependency + console scripts
Jeff Hammel <k0scist@gmail.com>
parents: 40
diff changeset
30 random-data = nettwerk.dataset.rand:main
36c141f0f0bd add tensorflow dependency + console scripts
Jeff Hammel <k0scist@gmail.com>
parents: 40
diff changeset
31 sigmoid = nettwerk.sigmoid:main
0
a70bd2cd508b initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
32 """
a70bd2cd508b initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
33 kw['install_requires'] = dependencies
a70bd2cd508b initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
34 except ImportError:
a70bd2cd508b initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
35 from distutils.core import setup
a70bd2cd508b initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
36 kw['requires'] = dependencies
a70bd2cd508b initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
37
40
a7d8583f7482 [packaging] lets try out scikit learn
Jeff Hammel <k0scist@gmail.com>
parents: 26
diff changeset
38
0
a70bd2cd508b initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
39 try:
a70bd2cd508b initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
40 here = os.path.dirname(os.path.abspath(__file__))
a70bd2cd508b initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
41 description = open(os.path.join(here, 'README.txt')).read()
a70bd2cd508b initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
42 except IOError:
a70bd2cd508b initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
43 description = ''
a70bd2cd508b initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
44
a70bd2cd508b initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
45
a70bd2cd508b initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
46 setup(name='tvii',
a70bd2cd508b initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
47 version=version,
a70bd2cd508b initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
48 description="TV2",
a70bd2cd508b initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
49 long_description=description,
a70bd2cd508b initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
50 classifiers=[], # Get strings from http://www.python.org/pypi?%3Aaction=list_classifiers
a70bd2cd508b initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
51 author='Jeff Hammel',
a70bd2cd508b initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
52 author_email='k0scist@gmail.com',
a70bd2cd508b initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
53 url='http://k0s.org/hg/tvii',
a70bd2cd508b initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
54 license='',
a70bd2cd508b initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
55 packages=['tvii'],
a70bd2cd508b initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
56 include_package_data=True,
9
064e936c7257 pytest integration
Jeff Hammel <k0scist@gmail.com>
parents: 7
diff changeset
57 setup_requires=['pytest-runner'],
064e936c7257 pytest integration
Jeff Hammel <k0scist@gmail.com>
parents: 7
diff changeset
58 tests_require=['tox', 'pytest'],
0
a70bd2cd508b initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
59 zip_safe=False,
a70bd2cd508b initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
60 **kw
a70bd2cd508b initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
61 )