-
-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Rui Chen <[email protected]> arcade-learning-environment: patch to use system pybind11 Signed-off-by: Rui Chen <[email protected]>
- Loading branch information
1 parent
4bf912c
commit 6977d56
Showing
2 changed files
with
35 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,6 +73,7 @@ apr | |
apt | ||
aravis | ||
arb | ||
arcade-learning-environment | ||
archi-steam-farm | ||
argc | ||
argo | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,11 +2,11 @@ class ArcadeLearningEnvironment < Formula | |
include Language::Python::Virtualenv | ||
|
||
desc "Platform for AI research" | ||
homepage "https://github.com/mgbellemare/Arcade-Learning-Environment" | ||
url "https://github.com/mgbellemare/Arcade-Learning-Environment/archive/refs/tags/v0.8.1.tar.gz" | ||
sha256 "28960616cd89c18925ced7bbdeec01ab0b2ebd2d8ce5b7c88930e97381b4c3b5" | ||
homepage "https://github.com/Farama-Foundation/Arcade-Learning-Environment" | ||
url "https://github.com/Farama-Foundation/Arcade-Learning-Environment/archive/refs/tags/v0.9.0.tar.gz" | ||
sha256 "7625ffbb9eb6c0efc6716f34b93bc8339f2396ea5e31191a251cb31bdd363f80" | ||
license "GPL-2.0-only" | ||
head "https://github.com/mgbellemare/Arcade-Learning-Environment.git", branch: "master" | ||
head "https://github.com/Farama-Foundation/Arcade-Learning-Environment.git", branch: "master" | ||
|
||
bottle do | ||
rebuild 2 | ||
|
@@ -23,26 +23,16 @@ class ArcadeLearningEnvironment < Formula | |
depends_on "python-setuptools" => :build | ||
depends_on macos: :catalina # requires std::filesystem | ||
depends_on "numpy" | ||
depends_on "pybind11" | ||
depends_on "[email protected]" | ||
depends_on "sdl2" | ||
|
||
uses_from_macos "zlib" | ||
|
||
fails_with gcc: "5" | ||
|
||
# Don't require importlib-resources for recent pythons | ||
# https://github.com/mgbellemare/Arcade-Learning-Environment/pull/491 | ||
patch do | ||
url "https://github.com/mgbellemare/Arcade-Learning-Environment/commit/61da474b8e3b3993969c9e4de3933559598613e1.patch?full_index=1" | ||
sha256 "72baf458430b81a6b8e56f1fc8edde732ba210c3540a6775000d6393dbcb73dd" | ||
end | ||
|
||
# Allow building from tarball | ||
# https://github.com/mgbellemare/Arcade-Learning-Environment/pull/492 | ||
patch do | ||
url "https://github.com/mgbellemare/Arcade-Learning-Environment/commit/7e3d9ffbca6d97b49f48e46c030b4236eb09019b.patch?full_index=1" | ||
sha256 "64cf83625fe19bc32097b34853db6752fcf835a3d42909a9ac88315dfca2b85f" | ||
end | ||
# patch to use system pybind11 | ||
patch :DATA | ||
|
||
def python3 | ||
"python3.12" | ||
|
@@ -103,3 +93,30 @@ def install | |
EOS | ||
end | ||
end | ||
|
||
__END__ | ||
diff --git a/src/python/CMakeLists.txt b/src/python/CMakeLists.txt | ||
index 911e280..720b1d3 100644 | ||
--- a/src/python/CMakeLists.txt | ||
+++ b/src/python/CMakeLists.txt | ||
@@ -1,11 +1,15 @@ | ||
find_package(Python3 COMPONENTS Interpreter Development.Module REQUIRED) | ||
|
||
include(FetchContent) | ||
-FetchContent_Declare( | ||
- pybind11 | ||
- GIT_REPOSITORY https://github.com/pybind/pybind11 | ||
- GIT_TAG v2.10.0) | ||
-FetchContent_MakeAvailable(pybind11) | ||
+find_package(pybind11 QUIET) | ||
+ | ||
+if(NOT pybind11_FOUND) | ||
+ FetchContent_Declare( | ||
+ pybind11 | ||
+ GIT_REPOSITORY https://github.com/pybind/pybind11 | ||
+ GIT_TAG v2.10.0) | ||
+ FetchContent_MakeAvailable(pybind11) | ||
+endif() | ||
|
||
add_library(ale-py MODULE ale_python_interface.cpp) | ||
# Depend on the ALE and pybind11 module |