-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
60 lines (47 loc) · 1.63 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
# -*- coding: UTF-8 -*-
from distutils.command.install import INSTALL_SCHEMES
from distutils.core import setup
from setuptools import find_packages
import time
import os
import re
_version = "0.%s.dev" % int(time.time())
_packages = find_packages(exclude=["*.tests", "*.tests.*", "tests.*", "tests"])
# find any static content such as HTML files or CSS
_INCLUDE = re.compile("^.*\.(html|css|js|png|gif|jpg|xml|mo|po|conf|dat|txt)$")
_root_package='pihub'
_data_files = []
for dirpath, dirnames, filenames in os.walk(_root_package):
# ignore directories starting with a ".", eg .hg or .env
for i, dirname in enumerate(dirnames):
if dirname.startswith('.'):
del dirnames[i]
if any([_INCLUDE.match(filename) for filename in filenames]):
_data_files.append([dirpath, [os.path.join(dirpath, f) for f in filenames]])
# make sure that data files go into the right place
# see http://groups.google.com/group/comp.lang.python/browse_thread/thread/35ec7b2fed36eaec/2105ee4d9e8042cb
for scheme in INSTALL_SCHEMES.values():
scheme['data'] = scheme['purelib']
# common dependencies
_install_requires = [
'celery',
'django',
'django-annoying',
'django-gubbins',
'django-haystack',
'django-celery',
'docutils',
'pyquery',
'pytz',
'requests',
'south',
]
setup( name='pi-hub',
version=_version,
packages=_packages,
install_requires=_install_requires,
scripts=[
# 'scripts/manage',
],
data_files=_data_files,
)