-
Notifications
You must be signed in to change notification settings - Fork 1
/
setup.py
35 lines (30 loc) · 981 Bytes
/
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
from distutils.core import setup
import os
def to_include(search='.'):
"""
to_include(search='.') -> tuple(packages, files)
Generate a list of directory ``search`` packages and data files
to include in a distutils setup. "Borrowed" from Django's
distutils setup.
"""
packages, data = [], []
for path, dirs, files in os.walk(search):
for directory in dirs:
if directory.startswith('.'):
del dirs[dirs.index(directory)]
if '__init__.py' in files:
packages.append(path.replace('/', '.'))
else:
data.append((path, [os.path.join(path, item) for item in files]))
return packages, data
packages, data = to_include('visicon')
setup(
name='visicon',
version='0.1',
description='IP address visualisation',
author='Antisense',
author_email='[email protected]',
url='http://code.google.com/p/visicon',
packages=packages,
data_files=data
)