Skip to content

Commit

Permalink
move p2pd executable to hivemind/hivemind_cli
Browse files Browse the repository at this point in the history
  • Loading branch information
dvmazur authored and Maxim Kashirin committed Apr 20, 2021
1 parent de66aca commit fa6699b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
from setuptools.command.install import install


here = os.path.abspath(os.path.dirname(__file__))


class cd:
"""Context manager for changing the current working directory"""
def __init__(self, newPath):
Expand Down Expand Up @@ -71,8 +74,8 @@ def install_libp2p_daemon():
tar.extractall(tempdir)
tar.close()

with cd(os.path.join(tempdir, 'go-libp2p-daemon-master')):
status = os.system('go install ./...')
with cd(os.path.join(tempdir, 'go-libp2p-daemon-master', 'p2pd')):
status = os.system(f'go build -o {os.path.join(here, "hivemind/hivemind_cli", "p2pd")}')
if status:
raise RuntimeError('Failed to build or install libp2p-daemon:'\
f' exited with status code :{status}')
Expand All @@ -95,7 +98,6 @@ def run(self):
install_libp2p_daemon()


here = os.path.abspath(os.path.dirname(__file__))

with open('requirements.txt') as requirements_file:
install_requires = list(map(str, parse_requirements(requirements_file)))
Expand Down

0 comments on commit fa6699b

Please sign in to comment.