1
#!/usr/bin/env python
2
3
from distutils.core import setup
4
import sys
5
import os
6
import glob
7
8
#FIXME: Ugly hack, but as I don't use Windows there's no way I can determine
9
# the right install directory
10
11
docdir = os.path.join(sys.prefix,"share/doc/datamatrix") \
12
    if "bdist_wininst" not in sys.argv else "\Data\datamatrix"
13
14
# Grab the documentation files by globbing
15
16
pdf = glob.glob("doc/*.pdf")
17
#pdf.remove("doc/html")
18
#pdf.remove("doc/_sources")
19
html_sources = glob.glob("doc/html/*")
20
html_sources.remove("doc/html/_static")
21
html_sources.remove("doc/html/_sources")
22
data_files = [
23
            (docdir,pdf),
24
            (os.path.join(docdir,"html"),html_sources),
25
            (os.path.join(docdir,"html/_static"),glob.glob("doc/html/_static/*")),
26
            (os.path.join(docdir,"html/_sources"),glob.glob("doc/html/_sources/*")),
27
            (os.path.join(docdir,"_sources"), glob.glob("doc/_sources/*"))
28
            ]
29
30
description = """A Pythonic implementation of R's ``data.frame`` structure. This
31
module allows access to comma- or other delimiter separated files as if they
32
were tables, using a dictionary-like syntax.  ``DataMatrix`` objects can be
33
manipulated, rows and columns added and removed, or even transposed."""
34
35
setup(name="datamatrix",
36
	version="0.9",
37
	description=description,
38
	author="Luca Beltrame",
39
	author_email="einar@heavensinferno.net",
40
    license="GPL",
41
	packages=["datamatrix"],
42
    package_dir={"datamatrix":"./datamatrix"},
43
    data_files=data_files,
44
	classifiers=['License :: OSI Approved :: GNU General Public License (GPL)',
45
		'Operating System :: OS Independent',
46
		'Topic :: Text Processing'],
47
    url="http://www.dennogumi.org/projects/datamatrix",
48
    provides=["DataMatrix (0.9)"]
49
	)