annotate setup.py @ 18:56596902e9ae default tip

add some setup + tests
author Jeff Hammel <k0scist@gmail.com>
date Sun, 10 Dec 2017 17:57:03 -0800
parents 9575c4a925c1
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
7a4a073ee13e initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
1 """
7a4a073ee13e initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
2 setup packaging script for Lemuriformes
7a4a073ee13e initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
3 """
7a4a073ee13e initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
4
7a4a073ee13e initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
5 import os
7a4a073ee13e initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
6
7a4a073ee13e initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
7 version = "0.0"
4
9575c4a925c1 [setup] correct various dependencies + scripts
Jeff Hammel <k0scist@gmail.com>
parents: 0
diff changeset
8 dependencies = [
9575c4a925c1 [setup] correct various dependencies + scripts
Jeff Hammel <k0scist@gmail.com>
parents: 0
diff changeset
9 "anytree",
9575c4a925c1 [setup] correct various dependencies + scripts
Jeff Hammel <k0scist@gmail.com>
parents: 0
diff changeset
10 "cssselect",
9575c4a925c1 [setup] correct various dependencies + scripts
Jeff Hammel <k0scist@gmail.com>
parents: 0
diff changeset
11 "lxml",
9575c4a925c1 [setup] correct various dependencies + scripts
Jeff Hammel <k0scist@gmail.com>
parents: 0
diff changeset
12 "PyMySQL",
9575c4a925c1 [setup] correct various dependencies + scripts
Jeff Hammel <k0scist@gmail.com>
parents: 0
diff changeset
13 "requests",
9575c4a925c1 [setup] correct various dependencies + scripts
Jeff Hammel <k0scist@gmail.com>
parents: 0
diff changeset
14 "selenium",
9575c4a925c1 [setup] correct various dependencies + scripts
Jeff Hammel <k0scist@gmail.com>
parents: 0
diff changeset
15 "Tempita",
9575c4a925c1 [setup] correct various dependencies + scripts
Jeff Hammel <k0scist@gmail.com>
parents: 0
diff changeset
16 "whichpy"
9575c4a925c1 [setup] correct various dependencies + scripts
Jeff Hammel <k0scist@gmail.com>
parents: 0
diff changeset
17 ]
0
7a4a073ee13e initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
18
7a4a073ee13e initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
19 # allow use of setuptools/distribute or distutils
7a4a073ee13e initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
20 kw = {}
7a4a073ee13e initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
21 try:
7a4a073ee13e initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
22 from setuptools import setup
4
9575c4a925c1 [setup] correct various dependencies + scripts
Jeff Hammel <k0scist@gmail.com>
parents: 0
diff changeset
23 from setuptools import find_packages
0
7a4a073ee13e initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
24 kw['entry_points'] = """
7a4a073ee13e initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
25 [console_scripts]
4
9575c4a925c1 [setup] correct various dependencies + scripts
Jeff Hammel <k0scist@gmail.com>
parents: 0
diff changeset
26 csv2sql = orion.csv2sql:main
9575c4a925c1 [setup] correct various dependencies + scripts
Jeff Hammel <k0scist@gmail.com>
parents: 0
diff changeset
27 csv2sqlite = orion.csv2sqlite:main
18
56596902e9ae add some setup + tests
Jeff Hammel <k0scist@gmail.com>
parents: 4
diff changeset
28 dedupe = orion.deduplicate:main
56596902e9ae add some setup + tests
Jeff Hammel <k0scist@gmail.com>
parents: 4
diff changeset
29 dictlist2csv = orion.serialize:main
56596902e9ae add some setup + tests
Jeff Hammel <k0scist@gmail.com>
parents: 4
diff changeset
30 freeport = orion.port:main
56596902e9ae add some setup + tests
Jeff Hammel <k0scist@gmail.com>
parents: 4
diff changeset
31 issubset = orion.issubset:main
56596902e9ae add some setup + tests
Jeff Hammel <k0scist@gmail.com>
parents: 4
diff changeset
32 json2csv = orion.json2csv:main
56596902e9ae add some setup + tests
Jeff Hammel <k0scist@gmail.com>
parents: 4
diff changeset
33 sql-count = orion.count:main
56596902e9ae add some setup + tests
Jeff Hammel <k0scist@gmail.com>
parents: 4
diff changeset
34 table-size = orion.table_size:main
56596902e9ae add some setup + tests
Jeff Hammel <k0scist@gmail.com>
parents: 4
diff changeset
35 table2csv = orion.table2csv:main
56596902e9ae add some setup + tests
Jeff Hammel <k0scist@gmail.com>
parents: 4
diff changeset
36 uniques = orion.uniques:main
0
7a4a073ee13e initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
37 """
7a4a073ee13e initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
38 kw['install_requires'] = dependencies
7a4a073ee13e initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
39 except ImportError:
7a4a073ee13e initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
40 from distutils.core import setup
7a4a073ee13e initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
41 kw['requires'] = dependencies
7a4a073ee13e initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
42
7a4a073ee13e initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
43 try:
7a4a073ee13e initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
44 here = os.path.dirname(os.path.abspath(__file__))
7a4a073ee13e initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
45 description = open(os.path.join(here, 'README.txt')).read()
7a4a073ee13e initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
46 except IOError:
7a4a073ee13e initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
47 description = ''
7a4a073ee13e initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
48
7a4a073ee13e initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
49
7a4a073ee13e initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
50 setup(name='Lemuriformes',
7a4a073ee13e initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
51 version=version,
7a4a073ee13e initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
52 description="ReSTful API consumer in python",
7a4a073ee13e initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
53 long_description=description,
7a4a073ee13e initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
54 classifiers=[], # Get strings from http://www.python.org/pypi?%3Aaction=list_classifiers
7a4a073ee13e initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
55 author='Jeff Hammel',
7a4a073ee13e initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
56 author_email='k0scist@gmail.com',
7a4a073ee13e initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
57 url='http://k0s.org/hg/Lemuriformes',
7a4a073ee13e initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
58 license='',
7a4a073ee13e initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
59 packages=['lemuriformes'],
7a4a073ee13e initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
60 include_package_data=True,
4
9575c4a925c1 [setup] correct various dependencies + scripts
Jeff Hammel <k0scist@gmail.com>
parents: 0
diff changeset
61 setup_requires=['pytest-runner'],
9575c4a925c1 [setup] correct various dependencies + scripts
Jeff Hammel <k0scist@gmail.com>
parents: 0
diff changeset
62 tests_require=['pytest', 'tox'],
0
7a4a073ee13e initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
63 zip_safe=False,
7a4a073ee13e initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
64 **kw
7a4a073ee13e initial commit
Jeff Hammel <k0scist@gmail.com>
parents:
diff changeset
65 )