From f2e660b603d7c16aedd7a02ba296f054baebb2be Mon Sep 17 00:00:00 2001 From: Dave Bort Date: Thu, 18 Apr 2024 10:54:04 -0700 Subject: [PATCH] cherry-pick: Add required deps to pyproject.toml (#3117) Summary: Cherry-pick 28f1c8cb54cbd0faa2e80660d809d53edb014dcc from release/0.2 into main These pip dependencies need to be present to build the pip wheel. Also, change the version to a stub that looks less like a real version, until we can hook up the logic to get the version from the git repo state. Pull Request resolved: https://github.com/pytorch/executorch/pull/3117 Test Plan: Ran `./install_requirements.sh` in a new conda environment on my mac M1, and it built/installed the pip package successfully. Reviewed By: tugsbayasgalan Differential Revision: D56282487 Pulled By: dbort fbshipit-source-id: 81e575957ca4d1262eecb4dd5b480a88942371f6 --- install_requirements.sh | 1 + pyproject.toml | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/install_requirements.sh b/install_requirements.sh index c0f71b51b4d..2e6cb9f2dfe 100755 --- a/install_requirements.sh +++ b/install_requirements.sh @@ -75,6 +75,7 @@ EXIR_REQUIREMENTS=( # pip packages needed for development. DEVEL_REQUIREMENTS=( cmake # For building binary targets. + pyyaml # Imported by the kernel codegen tools. setuptools # For building the pip package. tomli # Imported by extract_sources.py when using python < 3.11. wheel # For building the pip package archive. diff --git a/pyproject.toml b/pyproject.toml index ddd7bb0914c..fc597331fd7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,10 +1,20 @@ [build-system] -requires = ["setuptools", "wheel"] +requires = [ + "cmake", # For building binary targets in the wheel. + "pyyaml", # Imported by the kernel codegen tools. + "setuptools", # For building the pip package contents. + "tomli", # Imported by extract_sources.py when using python < 3.11. + "wheel", # For building the pip package archive. + "zstd", # Imported by resolve_buck.py. +] build-backend = "setuptools.build_meta" [project] name = "executorch" -version = "0.1.0" +# TODO(dbort): Use setuptools-git-versioning or setuptools-scm to get the +# version from the git branch state. For now, use a version that doesn't look +# like a real release. +version = "0.2.1.dev0+unknown" # Python dependencies required for development dependencies=[ "expecttest",