This repository has been archived by the owner on Aug 17, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
72 lines (63 loc) · 1.86 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
from distutils.command.build_py import build_py
import os
import sys
from setuptools import setup
sys.path.append('src')
from eulcore import __version__
# fullsplit and packages calculation inspired by django setup.py
def fullsplit(path):
result = []
while path:
path, tail = os.path.split(path)
result.append(tail)
result.reverse()
return result
srcdir = 'src' + os.path.sep
packages = []
for path, dirs, files in os.walk(srcdir):
if path.startswith(srcdir): # it does
path = path[len(srcdir):]
if '.svn' in dirs:
dirs.remove('.svn')
if '__init__.py' in files:
packages.append(path.replace(os.path.sep, '.'))
themedir = 'themes' + os.path.sep
data_files = []
for path, dirs, files in os.walk(themedir):
if '.svn' in dirs:
dirs.remove('.svn')
if files:
targetfiles = [os.path.join(path, f) for f in files]
data_files.append((path, targetfiles))
class build_py_with_ply(build_py):
def run(self, *args, **kwargs):
# importing this forces ply to generate parsetab/lextab
import eulcore.xpath.core
build_py.run(self, *args, **kwargs)
setup(
cmdclass={'build_py': build_py_with_ply},
name='eulcore',
version=__version__,
author='Emory University Libraries',
author_email='[email protected]',
packages=packages,
package_dir={'': 'src'},
package_data={
'eulcore.django.existdb': ['exist_fixtures/*'],
},
data_files=data_files,
install_requires=[
'ply',
'lxml',
'django',
'mimeparse',
'rdflib>=3.0',
'python-dateutil',
'soaplib==0.8.1',
# pypi soaplib links are dead as of 20101201. use direct link for
# now: https://github.com/downloads/arskom/rpclib/soaplib-0.8.1.tar
'python-ldap',
'poster',
'pycrypto',
],
)