Update TODO
[re6stnet.git] / setup.py
1 """Resilient, Scalable, IPv6 Network
2 """
3
4 from setuptools import setup, find_packages
5 from setuptools.command import sdist as _sdist, build_py as _build_py
6 from distutils import log
7 from re6st import version
8
9 version = {"__file__": "re6st/version.py"}
10 execfile(version["__file__"], version)
11
12 def copy_file(self, infile, outfile, *args, **kw):
13 if infile == version["__file__"]:
14 if not self.dry_run:
15 log.info("generating %s -> %s", infile, outfile)
16 with open(outfile, "wb") as f:
17 for x in sorted(version.iteritems()):
18 if not x[0].startswith("_"):
19 f.write("%s = %r\n" % x)
20 return outfile, 1
21 cls, = self.__class__.__bases__
22 return cls.copy_file(self, infile, outfile, *args, **kw)
23
24 class build_py(_build_py.build_py):
25 copy_file = copy_file
26
27 class sdist(_sdist.sdist):
28 copy_file = copy_file
29
30 classifiers = """\
31 Environment :: Console
32 License :: OSI Approved :: GNU General Public License (GPL)
33 Natural Language :: English
34 Operating System :: POSIX :: Linux
35 Programming Language :: Python :: 2.6
36 Programming Language :: Python :: 2.7
37 Topic :: Internet
38 Topic :: System :: Networking
39 """
40
41 setup(
42 name = 're6stnet',
43 version = version["version"],
44 description = __doc__.strip(),
45 author = 'Nexedi',
46 author_email = 're6stnet@erp5.org',
47 url = 'http://re6st.net',
48 license = 'GPL 2+',
49 platforms = ["any"],
50 classifiers=classifiers.splitlines(),
51 long_description = ".. contents::\n\n" + open('README').read()
52 + "\n" + open('CHANGES').read(),
53 packages = find_packages(),
54 scripts = [
55 're6stnet',
56 're6st-conf',
57 're6st-registry',
58 ],
59 package_data = {
60 're6st': [
61 'ovpn-server',
62 'ovpn-client',
63 ],
64 },
65 install_requires = ['pyOpenSSL >= 0.13', 'miniupnpc'],
66 #dependency_links = [
67 # "http://miniupnp.free.fr/files/download.php?file=miniupnpc-1.7.20120714.tar.gz#egg=miniupnpc-1.7",
68 # ],
69 zip_safe = False,
70 cmdclass=dict(build_py=build_py, sdist=sdist),
71 )