docutils: remove /usr/bin/__pycache__

This commit is contained in:
Xi Ruoyao 2022-05-01 19:25:39 +08:00
parent 19961d11f4
commit 79cb38e23c
No known key found for this signature in database
GPG Key ID: D95E4716CCBB34DC

View File

@ -103,6 +103,26 @@ for f in /usr/bin/rst*.py; do
ln -svf $(basename $f) /usr/bin/$(basename $f .py)
done</userinput></screen>
<!-- FHS 3.0 section 4.4.2:
"There must be no subdirectories in /usr/bin."
But pip maintainers closed this as WONTFIX:
https://github.com/pypa/pip/issues/6906 -->
<para>
To reduce the time needed for loading Python scripts,
<command>pip3 install</command> will compile the scripts with
extension <filename class='extension'>.py</filename> into byte code
and save the result into
<filename class='extension'>.pyc</filename> files in the directory
<filename class='directory'>__pycache__</filename>.
But this package installs <filename class='extension'>.py</filename>
scripts into <filename class='directory'>/usr/bin</filename>.
So the byte code files for them will be installed into
<filename class='directory'>/usr/bin/__pycache__</filename>, which
is not allowed by FHS. Still as the &root; user, remove this
directory:
</para>
<screen role="root"><userinput>rm -rfv /usr/bin/__pycache__</userinput></screen>
</sect3>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"