Skip to content

Commit

Permalink
Only specify protobuf version on x86
Browse files Browse the repository at this point in the history
Change-Id: I71f9f68a37d52bad4ebc34c02f048cdba825eec9
  • Loading branch information
Jeffwhen committed Aug 26, 2022
1 parent c7b9edc commit 6611f1b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ def iter_shared_objects():
packages = ['tpu_perf']
so_list = list(iter_shared_objects())

if_x86 = any(('x86_64' in arg) for arg in sys.argv)
protobuf = 'protobuf==3.19.*' if if_x86 else 'protobuf'

setup(
version=get_version_from_tag(),
author='sophgo',
Expand All @@ -40,7 +43,7 @@ def iter_shared_objects():
license='Apache',
name='tpu_perf',
url='https://www.sophgo.com/',
install_requires=['numpy', 'lmdb', 'protobuf==3.19.*', 'psutil', 'pyyaml'],
install_requires=['numpy', 'lmdb', protobuf, 'psutil', 'pyyaml'],
packages=find_packages(),
include_package_data=True,
package_data={'tpu_perf': so_list})

0 comments on commit 6611f1b

Please sign in to comment.