use Protobuf library for Python from PyPI
Even with fairly up-to-date packages, many Linux distributions have not recent enough Python Protobuf packages. It's better to use the PyPI package, which is published by Google, rather than the distribution packages. Ideally, adevtool could handle this (with pinned package version and hash, and hash-checking), but due to many users encountering this issue, this change should be reasonable for now.
This commit is contained in:
parent
993cba2865
commit
f6d32808f8
@ -250,6 +250,7 @@
|
||||
<p>Additional dependencies for extracting vendor files with adevtool:</p>
|
||||
|
||||
<ul>
|
||||
<li>Optional: venv module for Python 3</li>
|
||||
<li>protobuf library for Python 3</li>
|
||||
<li>Node.js 18 LTS</li>
|
||||
<li>yarn</li>
|
||||
@ -382,11 +383,44 @@ source build/envsetup.sh
|
||||
lunch sdk_phone64_x86_64-ap2a-user
|
||||
m aapt2</pre>
|
||||
|
||||
<div class="notice">
|
||||
<p class="notice-heading">Optional</p>
|
||||
|
||||
<p>Run the following additional commands once to create a working
|
||||
environment if your Linux distribution (such as Debian bookworm) doesn't
|
||||
have the Protobuf library for Python 3 package version (5.)27.2 or later.
|
||||
This installs the latest library version in a Python 3 virtual
|
||||
environment.</p>
|
||||
|
||||
<pre>python3 -m venv venv
|
||||
source venv/bin/activate
|
||||
pip install protobuf
|
||||
deactivate</pre>
|
||||
</div>
|
||||
|
||||
<div class="notice">
|
||||
<p class="notice-heading">Optional</p>
|
||||
|
||||
<p>If you have installed the Protobuf library in the Python 3 virtual
|
||||
environment, activate the environment:</p>
|
||||
|
||||
<pre>source venv/bin/activate</pre>
|
||||
</div>
|
||||
|
||||
<p>Download, extract and prepare the vendor files:</p>
|
||||
|
||||
<pre>adevtool generate-all -d <var>PIXEL_CODENAME</var></pre>
|
||||
|
||||
<p>Replace <code><var>PIXEL_CODENAME</var></code> with Pixel device codename, which is the same as <a href="#build-targets">build target name</a>.</p>
|
||||
|
||||
<div class="notice">
|
||||
<p class="notice-heading">Optional</p>
|
||||
|
||||
<p>If you have installed the Protobuf library in the Python 3 virtual
|
||||
environment, deactivate the environment:</p>
|
||||
|
||||
<pre>deactivate</pre>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section id="setting-up-the-os-build-environment">
|
||||
|
@ -329,6 +329,27 @@ main.normalize {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.notice {
|
||||
border-radius: 12px;
|
||||
border: 1px solid #74777f /* outline */;
|
||||
background-color: #dae2f9 /* secondary container */;
|
||||
color: #121c2b /* on secondary container */;
|
||||
padding: 1em;
|
||||
margin-block: 1em;
|
||||
}
|
||||
|
||||
.notice-heading {
|
||||
margin-block-start: 0;
|
||||
}
|
||||
|
||||
.notice-heading::before {
|
||||
content: "ⓘ ";
|
||||
}
|
||||
|
||||
.notice pre {
|
||||
margin-block-end: 0;
|
||||
}
|
||||
|
||||
/* latin */
|
||||
@font-face {
|
||||
font-family: Roboto;
|
||||
@ -467,4 +488,10 @@ main.normalize {
|
||||
var {
|
||||
color: #ffb4ab;
|
||||
}
|
||||
|
||||
.notice {
|
||||
border-color: #8e9099 /* outline */;
|
||||
background-color: #3e4758 /* secondary container */;
|
||||
color: #dae2f9 /* on secondary container */;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user