forked from QuarkChain/pyquarkchain
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
49 lines (39 loc) · 1.4 KB
/
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import os
from setuptools import setup
from setuptools.command.develop import develop
install_requires = set(x.strip() for x in open("requirements.txt"))
install_requires_replacements = {}
install_requires = [install_requires_replacements.get(r, r) for r in install_requires]
PTH = "pypy-fix-cython-warning.pth"
# Utility function to read the README file.
# Used for the long_description. It's nice, because now 1) we have a top level
# README file and 2) it's easier to type in the README file than to put a raw
# string in below ...
class custom_develop(develop):
@property
def target(self):
return os.path.join(self.install_dir, PTH)
def run(self):
print(self.install_dir)
with open("quarkchain/tools/" + PTH) as infp:
with open(self.target, "w") as outfp:
outfp.write(infp.read())
develop.run(self)
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name="quarkchain",
version="0.0",
author="QuarkChain",
author_email="",
description=("QuarkChain"),
license="MIT",
keywords="QuarkChain,blockchain",
url="",
packages=["quarkchain"],
long_description=read("README.md"),
classifiers=["Development Status :: 0 - Development", "License :: MIT License"],
install_requires=install_requires,
python_requires=">=3.5",
cmdclass={"develop": custom_develop},
)