forked from Rav3nPL/p2pool-rav
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
35 lines (30 loc) · 1021 Bytes
/
setup.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import os
import sys
from distutils.core import setup
import py2exe
def get_version():
root_dir = os.path.abspath(os.path.dirname(sys.argv[0]))
git_dir = os.path.join(root_dir, '.git')
head = open(os.path.join(git_dir, 'HEAD')).read().strip()
prefix = 'ref: '
if head.startswith(prefix):
path = head[len(prefix):].split('/')
return open(os.path.join(git_dir, *path)).read().strip()[:7]
else:
return head[:7]
open('p2pool/__init__.py', 'wb').write('__version__ = %r\r\n\r\nDEBUG = False\r\n' % get_version())
setup(name='p2pool',
version='1.0',
description='Peer-to-peer Bitcoin mining pool',
author='Forrest Voight',
author_email='[email protected]',
url='http://p2pool.forre.st/',
data_files=[('', ['README', 'README-Litecoin'])],
console=['run_p2pool.py'],
options=dict(py2exe=dict(
bundle_files=1,
dll_excludes=['w9xpopen.exe'],
includes=['twisted.web.resource', 'ltc_scrypt'],
)),
zipfile=None,
)