Skip to content

Commit

Permalink
try fix bitarray on pypy
Browse files Browse the repository at this point in the history
  • Loading branch information
oberstet committed Apr 28, 2023
1 parent ac3f4a7 commit c8ae82a
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
from setuptools.command.test import test as test_command

CPY = platform.python_implementation() == 'CPython'
PYPY = platform.python_implementation() == 'PyPy'

# read version string
with open('autobahn/_version.py') as f:
Expand Down Expand Up @@ -112,9 +113,22 @@
if 'AUTOBAHN_USE_NVX' not in os.environ or os.environ['AUTOBAHN_USE_NVX'] not in ['0', 'false']:
cffi_modules.append('autobahn/nvx/_utf8validator.py:ffi')

if PYPY:
# bitarray is required by eth-account, but on pypy:
#
# https://github.com/crossbario/autobahn-python/pull/1617#issuecomment-1492005329
# https://github.com/ilanschnell/bitarray/issues/188
#
# us bitarray upstream master until next upstream release
# {package-name}[flavor] @ git+https://github.com/{user|org}/{repository}.git@{tag}#egg={package-name}
# https://peps.python.org/pep-0508/
extras_require_xbr = ["bitarray @ git+https://github.com/ilanschnell/bitarray.git@master#bitarray"]
else:
extras_require_xbr = ["bitarray>=2.7.3"]

# https://peps.python.org/pep-0440/#direct-references
# https://stackoverflow.com/a/63688209/884770
extras_require_xbr = [
extras_require_xbr.extend([
# XBR contracts and ABI file bundle
'xbr>=21.2.1', # Apache 2.0

Expand Down Expand Up @@ -151,7 +165,7 @@
# the following is needed for XBR account synch and device pairing
'spake2>=0.8', # MIT license (https://github.com/warner/python-spake2/blob/master/LICENSE)
'hkdf>=0.0.3', # BSD 2-Clause "Simplified" License
]
])

# required for UI based tools, e.g. xbrnetwork-ui (autobahn.xbr._gui:_main)
extras_require_ui = [
Expand Down

0 comments on commit c8ae82a

Please sign in to comment.