pylibs provides a Python package configuration file and a script to streamline dependency management and setup using requirements.txt.
OSRB Approval: Request Open Source Review Board (OSRB) approval by creating an issue using the OSRB template to use the desired Python package and any of its dependencies. See example bug for reference.
File a Infra bug to request the import of the package and dependencies source code from its upstream repository into the Fuchsia source code. See example bug for reference
Add the package to the requirements.txt
file, including the specific version and the path within the Fuchsia repository. Example:
<package>===0.0.1 # third_party/github.com/<package>
for https://fuchsia.googlesource.com/third_party/github.com/<package>
If the package has dependencies, add those package names to requirements.txt
without specifying versions. The script will determine the correct versions. Example: <dep_package> # third_party/github.com/python/<dep_package>
Run the update-pylibs.sh
script and verify the changes in pylibs
configuration file.
Update the package version directly in the requirements.txt file and run the update-pylibs.sh
script.
Verify the pylibs
configuration file to ensure update was successful.
In the //third_party/pylibs/<package>/src
directory:
Use the git checkout command along with the commit ID found in the pylibs configuration file. For example, if the commit ID is ‘abcdef123456’, you would run:
git checkout abcdef123456
Rebuild your package to ensure everything works correctly.