-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
94 lines (92 loc) · 3.13 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
#!/usr/bin/env python
import os,fnmatch
from distutils.core import setup
#
##Copy from Django setup.py
#def fullsplit(path, result=None):
# """
# Split a pathname into components (the opposite of os.path.join) in a
# platform-neutral way.
# """
# if result is None:
# result = []
# head, tail = os.path.split(path)
# if head == '':
# return [tail] + result
# if head == path:
# return result
# return fullsplit(head, [tail] + result)
## Compile the list of packages available, because distutils doesn't have
## an easy way to do this.
#packages, data_files = [], []
#root_dir = os.path.dirname(__file__)
#if root_dir != '':
# os.chdir(root_dir)
#
#
#for dirpath, dirnames, filenames in os.walk('test_tools'):
# # Ignore dirnames that start with '.'
# for i, dirname in enumerate(dirnames):
# if dirname.startswith('.'): del dirnames[i]
# if '__init__.py' in filenames:
# packages.append('.'.join(fullsplit(dirpath)))
# elif filenames:
# data_files.append([dirpath, [os.path.join(dirpath, f) for f in filenames]])
#print 'packages = ', packages
##End
#
### This is a list of files to install, and where:
### Make sure the MANIFEST.in file points to all the right
### directories too.
### Code borrowed from wxPython's setup and config files
### Thanks to Robin Dunn for the suggestion.
### I am not 100% sure what's going on, but it works!
#def opj(*args):
# path = os.path.join(*args)
# return os.path.normpath(path)
#
#def find_data_files(srcdir, *wildcards, **kw):
# # get a list of all files under the srcdir matching wildcards,
# # returned in a format to be used for install_data
# def walk_helper(arg, dirname, files):
# if '.svn' in dirname:
# return
# names = []
# lst, wildcards = arg
# for wc in wildcards:
# wc_name = opj(dirname, wc)
# for f in files:
# filename = opj(dirname, f)
#
# if fnmatch.fnmatch(filename, wc_name) and not os.path.isdir(filename):
# names.append(filename)
# if names:
# lst.append( (dirname, names ) )
#
# file_list = []
# recursive = kw.get('recursive', True)
# if recursive:
# os.path.walk(srcdir, walk_helper, (file_list, wildcards))
# else:
# walk_helper((file_list, wildcards),
# srcdir,
# [os.path.basename(f) for f in glob.glob(opj(srcdir, '*'))])
# return file_list
#
#files = find_data_files('test_tools/data/', '*.json')
#print 'files = ',files
setup(name='test_tools',
version='1.1',
description='test tools for Django',
author='Proteus Technologies',
author_email='[email protected]',
url='http://proteus-tech.com',
include_package_data = True,
#packages=packages,
#data_files = files,
packages = ['test_tools', 'test_tools.data'],
#package_dir={'test_tools': 'test_tools'},
#package_data={'test_tools': ['test_tools/data/*.json']},
#data_files = [('lib/python2.7/site-packages/test_tools/data',['test_tools/data/test_current_iteration_data.json',]),
# ]
)