Move py-cachetools to src folder When soong packages python files into a zip file, it will take their path relative to the Android.bp file and preserve that relative path in the zip file. Then the root directory of the zip file is added to the PYTHONPATH. Currently, all subdirectories of the top level zip directory are also added to the PYTHONPATH, but we want to remove this. Since cachetools was being added to the zip file under src/cachetools, "import cachetools" works currectly, but won't work after the PYTHONPATH changes (you'd have to say "import src.cachetools"). To fix this, move the Android.bp file for py-cachetools into the src folder, so the relative paths don't contain src/. Soong python modules do have a pkg_path attribute, which essentially adds more folders to the relative path, but we would need an attribute that removes them, which doesn't exist. This could also be done with a filegroup with the "path" attribute, but bp2build doesn't support that, so I opted to go with this option instead. Bug: 245583294 Test: Presubmits Change-Id: I47d3e743d91f8ac4506ce2f7395ed8c5905d988a 
2 files changed