Skip to content

Commit

Permalink
Don't install tensorflow-text on M1 OSX.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 617139667
Change-Id: I6ce040d143c312550c7983f0f50c4f334499ad93
  • Loading branch information
jagapiou authored and copybara-github committed Mar 19, 2024
1 parent b9af3a5 commit cb505d3
Showing 1 changed file with 26 additions and 19 deletions.
45 changes: 26 additions & 19 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,33 @@

"""Install script for setuptools."""

import platform
import setuptools

IS_M1_OSX = platform.system() == 'Darwin' and platform.machine() == 'arm64'

REQUIREMENTS = (
# TODO: b/312199199 - remove some requirements.
'absl-py',
'google-cloud-aiplatform',
'ipython',
'matplotlib',
'numpy',
'openai>=1.3.0',
'pandas<=2.0.3',
'python-dateutil',
'reactivex',
'retry',
'scipy',
'tensorflow',
'tensorflow-hub',
'tensorflow-text',
'termcolor',
'typing-extensions',
)
M1_OSX_REQUIREMENTS = tuple(set(REQUIREMENTS) - {'tensorflow-text'})


setuptools.setup(
name='gdm-concordia',
version='1.2.0',
Expand Down Expand Up @@ -49,25 +74,7 @@
packages=setuptools.find_packages(include=['concordia', 'concordia.*']),
package_data={},
python_requires='>=3.11',
install_requires=[
# TODO: b/312199199 - remove some requirements.
'absl-py',
'google-cloud-aiplatform',
'ipython',
'matplotlib',
'numpy',
'openai>=1.3.0',
'pandas<=2.0.3',
'python-dateutil',
'reactivex',
'retry',
'scipy',
'tensorflow',
'tensorflow-hub',
'tensorflow-text',
'termcolor',
'typing-extensions',
],
install_requires=M1_OSX_REQUIREMENTS if IS_M1_OSX else REQUIREMENTS,
extras_require={
# Used in development.
'dev': [
Expand Down

0 comments on commit cb505d3

Please sign in to comment.