3 # zfec -- fast forward error correction library with Python interface
5 # Copyright (C) 2007 Allmydata, Inc.
6 # Author: Zooko Wilcox-O'Hearn
8 # This file is part of zfec.
10 # This program is free software; you can redistribute it and/or modify it
11 # under the terms of the GNU General Public License as published by the Free
12 # Software Foundation; either version 2 of the License, or (at your option)
13 # any later version, with the added permission that, if you become obligated
14 # to release a derived work under this licence (as per section 2.b), you may
15 # delay the fulfillment of this obligation for up to 12 months. If you are
16 # obligated to release code under section 2.b of this licence, you are
17 # obligated to release it under these same terms, including the 12-month grace
18 # period clause. See the COPYING file for details.
20 # If you would like to inquire about a commercial relationship with Allmydata,
21 # Inc., please contact partnerships@allmydata.com and visit
22 # http://allmydata.com/.
24 from ez_setup import use_setuptools
26 if 'cygwin' in sys.platform.lower():
30 use_setuptools(min_version=min_version)
32 from setuptools import Extension, find_packages, setup
40 extra_compile_args.append("-std=c99")
45 extra_compile_args.append("-O0")
46 extra_compile_args.append("-g")
47 extra_compile_args.append("-Wall")
48 extra_link_args.append("-g")
49 undef_macros.append('NDEBUG')
52 "Development Status :: 5 - Production/Stable",
53 "Environment :: Console",
54 "License :: OSI Approved :: GNU General Public License (GPL)",
55 "License :: DFSG approved",
56 "Intended Audience :: Developers",
57 "Intended Audience :: End Users/Desktop",
58 "Intended Audience :: System Administrators",
59 "Operating System :: Microsoft",
60 "Operating System :: Microsoft :: Windows",
61 "Operating System :: Unix",
62 "Operating System :: POSIX :: Linux",
63 "Operating System :: POSIX",
64 "Operating System :: MacOS :: MacOS X",
65 "Operating System :: Microsoft :: Windows :: Windows NT/2000",
66 "Operating System :: OS Independent",
67 "Natural Language :: English",
68 "Programming Language :: C",
69 "Programming Language :: Python",
71 "Topic :: System :: Systems Administration",
72 "Topic :: System :: Filesystems",
73 "Topic :: System :: Distributed Computing",
74 "Topic :: Software Development :: Libraries",
75 "Topic :: Communications :: Usenet News",
76 "Topic :: System :: Archiving :: Backup",
77 "Topic :: System :: Archiving :: Mirroring",
78 "Topic :: System :: Archiving",
83 os.system("darcsver 2>/dev/null")
85 print "le: %s" % (le,)
88 VERSIONFILE = "zfec/_version.py"
90 VSRE = re.compile("^verstr = ['\"]([^'\"]*)['\"]", re.M)
92 verstrline = open(VERSIONFILE, "rt").read()
93 except EnvironmentError:
94 pass # Okay, there is no version file.
96 mo = VSRE.search(verstrline)
100 print "unable to find version in %s" % (VERSIONFILE,)
101 raise RuntimeError("if %s.py exists, it is required to be well-formed" % (VERSIONFILE,))
104 # install_requires=['pyutil>=1.0.0',], # It doesn't require pyutil yet.
106 description='a fast erasure code with command-line, C, and Python interfaces',
107 long_description='Fast, portable, programmable erasure coding a.k.a. "forward error correction": the generation of redundant blocks of information such that if some blocks are lost then the original data can be recovered from the remaining blocks.',
108 author='Zooko O\'Whielacronx',
109 author_email='zooko@zooko.com',
110 url='http://allmydata.org/source/zfec',
112 packages=find_packages(),
113 classifiers=trove_classifiers,
114 entry_points = { 'console_scripts': [ 'zfec = zfec.cmdline_zfec:main', 'zunfec = zfec.cmdline_zunfec:main' ] },
115 ext_modules=[Extension('_fec', ['zfec/fec.c', 'zfec/_fecmodule.c',], extra_link_args=extra_link_args, extra_compile_args=extra_compile_args, undef_macros=undef_macros),],
116 test_suite="zfec.test",