setup.py,setup.cfg: Windows build fixes
This commit is contained in:
parent
eccc48b37f
commit
c82eb9d149
4 changed files with 30 additions and 10 deletions
|
|
@ -1,4 +1,5 @@
|
||||||
semantic-version
|
# Install with --no-deps. Otherwise, many unneeded dependencies will be
|
||||||
pysha3
|
# installed.
|
||||||
|
|
||||||
py_ecc==1.6.0
|
py_ecc==1.6.0
|
||||||
mypy_extensions==0.4.1
|
mypy_extensions==0.4.1
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
[build-system]
|
[build-system]
|
||||||
requires = [
|
requires = [
|
||||||
"setuptools>=57",
|
"setuptools>=57",
|
||||||
"wheel>=0.37.0",
|
"wheel>=0.36.0",
|
||||||
"build>=0.7.0",
|
"build>=0.5.1",
|
||||||
]
|
]
|
||||||
build-backend = "setuptools.build_meta"
|
build-backend = "setuptools.build_meta"
|
||||||
|
|
|
||||||
12
setup.cfg
12
setup.cfg
|
|
@ -21,17 +21,23 @@ classifiers =
|
||||||
[options]
|
[options]
|
||||||
python_requires = >=3.7
|
python_requires = >=3.7
|
||||||
include_package_data = True
|
include_package_data = True
|
||||||
|
|
||||||
|
# pysha3 is used by XMR and ETH for the keccak hash function only. If the
|
||||||
|
# module is not available, the native Python implementation in mmgen.keccak
|
||||||
|
# will be used instead.
|
||||||
install_requires =
|
install_requires =
|
||||||
|
importlib-resources; python_version < "3.9"
|
||||||
gmpy2
|
gmpy2
|
||||||
cryptography
|
cryptography
|
||||||
pynacl
|
pynacl
|
||||||
ecdsa
|
ecdsa
|
||||||
requests
|
requests
|
||||||
aiohttp
|
pysocks # xmrwallet.py
|
||||||
pysocks
|
|
||||||
pexpect
|
pexpect
|
||||||
importlib-resources; python_version < "3.9"
|
|
||||||
scrypt
|
scrypt
|
||||||
|
semantic-version # scripts/create-token.py
|
||||||
|
aiohttp; platform_system != "Windows"
|
||||||
|
pysha3; platform_system != "Windows"
|
||||||
|
|
||||||
packages =
|
packages =
|
||||||
mmgen
|
mmgen
|
||||||
|
|
|
||||||
19
setup.py
19
setup.py
|
|
@ -14,9 +14,22 @@ def build_libsecp256k1():
|
||||||
if not os.path.exists(ext_path):
|
if not os.path.exists(ext_path):
|
||||||
run(['git','clone','https://github.com/bitcoin-core/secp256k1.git'],check=True,cwd=cache_path)
|
run(['git','clone','https://github.com/bitcoin-core/secp256k1.git'],check=True,cwd=cache_path)
|
||||||
if not os.path.exists(os.path.join(ext_path,'.libs/libsecp256k1.a')):
|
if not os.path.exists(os.path.join(ext_path,'.libs/libsecp256k1.a')):
|
||||||
run(['./autogen.sh'],check=True,cwd=ext_path)
|
import platform
|
||||||
run(['./configure','CFLAGS=-g -O2 -fPIC'],check=True,cwd=ext_path)
|
cmds = {
|
||||||
run(['make','-j4'],check=True,cwd=ext_path)
|
'Windows': (
|
||||||
|
['sh','./autogen.sh'],
|
||||||
|
['sh','./configure','CFLAGS=-g -O2 -fPIC','--disable-dependency-tracking'],
|
||||||
|
['mingw32-make','MAKE=mingw32-make','LIBTOOL=/mingw64/bin/libtool']
|
||||||
|
),
|
||||||
|
'Linux': (
|
||||||
|
['./autogen.sh'],
|
||||||
|
['./configure','CFLAGS=-g -O2 -fPIC'],
|
||||||
|
['make','-j4']
|
||||||
|
),
|
||||||
|
}[platform.system()]
|
||||||
|
for cmd in cmds:
|
||||||
|
print('Executing {}'.format(' '.join(cmd)))
|
||||||
|
run(cmd,check=True,cwd=ext_path)
|
||||||
|
|
||||||
have_msys2 = run(['uname','-s'],stdout=PIPE,check=True).stdout.startswith(b'MSYS_NT')
|
have_msys2 = run(['uname','-s'],stdout=PIPE,check=True).stdout.startswith(b'MSYS_NT')
|
||||||
if have_msys2:
|
if have_msys2:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue