7 from distutils.core import setup
10 version = __import__('p2pool').__version__
11 im64 = '64' in platform.architecture()
13 if os.path.exists('INITBAK'):
15 os.rename(os.path.join('p2pool', '__init__.py'), 'INITBAK')
17 open(os.path.join('p2pool', '__init__.py'), 'wb').write('__version__ = %r%s%sDEBUG = False%s' % (version, os.linesep, os.linesep, os.linesep))
21 sys.argv[1:] = ['py2exe']
24 description='Peer-to-peer Bitcoin mining pool',
25 author='Forrest Voight',
26 author_email='forrest@forre.st',
27 url='http://p2pool.forre.st/',
31 'web-static/d3.v2.min.js',
32 'web-static/graphs.html',
33 'web-static/index.html',
34 'web-static/share.html',
38 console=['run_p2pool.py'],
39 options=dict(py2exe=dict(
41 dll_excludes=['w9xpopen.exe', "mswsock.dll", "MSWSOCK.dll"],
42 includes=['twisted.web.resource', 'ltc_scrypt'],
47 os.remove(os.path.join('p2pool', '__init__.py'))
48 os.rename('INITBAK', os.path.join('p2pool', '__init__.py'))
54 dir_name = 'p2pool_win' + win + '_' + version
56 if os.path.exists(dir_name):
57 shutil.rmtree(dir_name)
58 os.rename('dist', dir_name)
60 with zipfile.ZipFile(dir_name + '.zip', 'w', zipfile.ZIP_DEFLATED) as zf:
61 for dirpath, dirnames, filenames in os.walk(dir_name):
62 for filename in filenames:
63 zf.write(os.path.join(dirpath, filename))