Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dnsviz/dnsviz.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCasey Deccio <casey@deccio.net>2014-10-30 21:13:38 +0300
committerCasey Deccio <casey@deccio.net>2014-10-30 21:13:38 +0300
commit764932dab35f39158f6eeb9e47aa36947f8c09da (patch)
treedcf4535d4d6f34d216dee1a90c14c3e6d2c383cf /setup.py
parente2bc109cbb066fc434fbebc785dcb7aed6718382 (diff)
Modify directory structure0.1.0
Diffstat (limited to 'setup.py')
-rw-r--r--setup.py56
1 files changed, 56 insertions, 0 deletions
diff --git a/setup.py b/setup.py
new file mode 100644
index 0000000..5a1a75e
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,56 @@
+#!/usr/bin/env python
+
+import glob
+import os
+import stat
+import sys
+
+from distutils.core import setup
+from distutils.dist import Distribution
+from distutils.command.install import install
+
+_install = install(Distribution())
+_install.finalize_options()
+INSTALL_DATA = _install.install_data
+
+def apply_install_prefix(filename):
+ assert filename.endswith('.in'), 'Filename supplied for customization must end with \'.in\': %s' % (filename)
+
+ filename_out = filename[:-3]
+
+ if os.path.exists(filename_out) and os.path.getctime(filename_out) > os.path.getctime(filename):
+ return
+
+ in_fh = open(filename, 'r')
+ out_fh = open(filename_out, 'w')
+ out_fh.write(in_fh.read().replace('DNSVIZ_INSTALL_PREFIX', INSTALL_DATA))
+ in_fh.close()
+ out_fh.close()
+
+apply_install_prefix(os.path.join('dnsviz','config.py.in'))
+
+setup(name='dnsviz',
+ version='0.1.0',
+ author='Casey Deccio',
+ author_email='casey@deccio.net',
+ url='http://dnsviz.net/',
+ description='DNS analysis and visualization tool suite',
+ long_description=open('README', 'r').read(),
+ license='LICENSE',
+ packages=['dnsviz','dnsviz.viz'],
+ scripts=['bin/dnsget', 'bin/dnsviz', 'bin/dnsgrok'],
+ data_files=[
+ ('share/doc/dnsviz', ['README', 'COPYING']),
+ ('share/dnsviz/icons', glob.glob(os.path.join('share', 'icons', '*.png'))),
+ ('share/dnsviz/css', ['share/css/dnsviz.css']),
+ ('share/dnsviz/css/redmond', ['share/css/redmond/jquery-ui-1.10.4.custom.min.css']),
+ ('share/dnsviz/css/redmond/images', glob.glob(os.path.join('share', 'css', 'redmond', 'images', '*.png')) + glob.glob(os.path.join('share', 'css', 'redmond', 'images', '*.gif'))),
+ ('share/dnsviz/js', glob.glob(os.path.join('share', 'js', '*.js'))),
+ ('share/dnsviz/html', glob.glob(os.path.join('share', 'html', '*.html'))),
+ ],
+ requires=[
+ 'pygraphviz (==1.1)',
+ 'm2crypto (>=0.21.1)',
+ 'dnspython (==1.10)',
+ ],
+)