Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions conda-build/habitat-sim/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ requirements:
- numba
- numpy>=1.13
- gitpython
- pybind11-stubgen
- quaternion
- pillow
- scipy>=1.3.0
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ numba
numpy==1.26.4
numpy-quaternion
pillow==10.4.0
pybind11-stubgen
scipy>=1.10.1
tqdm
21 changes: 19 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,16 @@ def run(self):
for ext in self.extensions:
self.build_extension(ext)

# Build stubs for 'habitat_sim_bindings' to provide type information.
subprocess.run(
[
"pybind11-stubgen",
"habitat_sim._ext.habitat_sim_bindings",
"-o",
"src_python",
]
)

def build_extension(self, ext):
extdir = os.path.abspath(os.path.dirname(self.get_ext_fullpath(ext.name)))

Expand Down Expand Up @@ -441,21 +451,28 @@ def load(filename):
setup(
name="habitat_sim",
version=habitat_sim.__version__,
author="FAIR A-STAR",
author="Meta",
description="A high performance simulator for training embodied agents",
long_description="",
packages=find_packages(where="src_python"),
package_dir={"": "src_python"},
install_requires=requirements,
tests_require=["hypothesis", "pytest-benchmark", "pytest"],
setup_requires=["pybind11-stubgen"],
python_requires=">=3.9",
# add extension module
ext_modules=[CMakeExtension("habitat_sim._ext.habitat_sim_bindings", "src")],
# add custom build_ext command
cmdclass=dict(build_ext=CMakeBuild),
cmdclass={
"build_ext": CMakeBuild,
},
zip_safe=False,
include_package_data=True,
package_data={
"habitat_sim": ["py.typed", "**/*.pyi"],
},
)

pymagnum_build_dir = osp.join(
_cmake_build_dir, "deps", "magnum-bindings", "src", "python"
)
Expand Down
Empty file added src_python/habitat_sim/py.typed
Empty file.