Skip to content

Commit

Permalink
update to setup.py for CI to pass
Browse files Browse the repository at this point in the history
  • Loading branch information
juliaputko committed Aug 20, 2024
1 parent 37533ab commit c17d404
Showing 1 changed file with 1 addition and 36 deletions.
37 changes: 1 addition & 36 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,41 +119,6 @@
class BuildError(Exception):
pass


# Hacky workaround for solving CI build "purelib" issue
# see https://github.com/google/or-tools/issues/616
class InstallPlatlib(install):
def finalize_options(self):
super().finalize_options()
if self.distribution.has_ext_modules():
self.install_lib = self.install_platlib


class SmartSimBuild(build_py):
def run(self):
feature_store_builder = builder.FeatureStoreBuilder(
build_env(), build_env.MALLOC, build_env.JOBS
)
if not feature_store_builder.is_built:
feature_store_builder.build_from_git(versions.REDIS_URL, versions.REDIS)

feature_store_builder.cleanup()

# run original build_py command
super().run()


# Tested with wheel v0.29.0
class BinaryDistribution(Distribution):
"""Distribution which always forces a binary package with platform name
We use this because we want to pre-package Redis for certain
platforms to use.
"""

def has_ext_modules(_placeholder):
return True

# Define needed dependencies for the installation

extras_require = {
Expand All @@ -174,6 +139,7 @@ def has_ext_modules(_placeholder):
"types-tqdm",
"types-tensorflow==2.12.0.9",
"types-setuptools",
"typing_extensions>=4.1.0",
],
"docs": [
"Sphinx==6.2.1",
Expand Down Expand Up @@ -217,7 +183,6 @@ def has_ext_modules(_placeholder):
"pygithub>=2.3.0",
"numpy<2",
"smartredis>=0.5,<0.6",
"typing_extensions>=4.1.0,<4.6",
],
zip_safe=False,
extras_require=extras_require,
Expand Down

0 comments on commit c17d404

Please sign in to comment.