<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/tools/power/cpupower/bindings/python/Makefile, branch v6.18.21</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.21</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.18.21'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2025-07-01T16:58:00+00:00</updated>
<entry>
<title>cpupower: Improve Python binding's Makefile</title>
<updated>2025-07-01T16:58:00+00:00</updated>
<author>
<name>John B. Wyatt IV</name>
<email>jwyatt@redhat.com</email>
</author>
<published>2025-06-24T20:41:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=b74710eaff314d6afe4fb0bbe9bc7657bf226fd4'/>
<id>urn:sha1:b74710eaff314d6afe4fb0bbe9bc7657bf226fd4</id>
<content type='text'>
Add a few build variables to make it easier for distributions to
package the bindings. Allow current variables to be overwritten by
environment variables that are passed to make.

CCing Thorsten Leemhuis &lt;linux@leemhuis.info&gt;.

https://lore.kernel.org/r/20250624204105.457971-1-jwyatt@redhat.com
Signed-off-by: John B. Wyatt IV &lt;jwyatt@redhat.com&gt;
Signed-off-by: John B. Wyatt IV &lt;sageofredondo@gmail.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>cpupower: change binding's makefile to use -lcpupower</title>
<updated>2025-05-02T19:52:51+00:00</updated>
<author>
<name>John B. Wyatt IV</name>
<email>jwyatt@redhat.com</email>
</author>
<published>2025-04-29T20:47:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=99d2fce9b44dec6d270b85a7d28cdc99aaa93da6'/>
<id>urn:sha1:99d2fce9b44dec6d270b85a7d28cdc99aaa93da6</id>
<content type='text'>
Originally I believed I needed the .o files to make the bindings. The
linking failed due to a missing .so link in Fedora or by using make
install-lib from the cpupower directory. Amend the makefile and the
README.

Big thanks to Wander Lairson Costa &lt;wander@redhat.com&gt; for the help.

Link: https://lore.kernel.org/r/20250429204711.127274-1-jwyatt@redhat.com
Signed-off-by: "John B. Wyatt IV" &lt;jwyatt@redhat.com&gt;
Signed-off-by: "John B. Wyatt IV" &lt;sageofredondo@gmail.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>pm: cpupower: Add install and uninstall options to bindings makefile</title>
<updated>2024-12-20T16:12:07+00:00</updated>
<author>
<name>John B. Wyatt IV</name>
<email>jwyatt@redhat.com</email>
</author>
<published>2024-12-19T01:26:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=6de02569a2bb678db04236fdf29814c0c27f5121'/>
<id>urn:sha1:6de02569a2bb678db04236fdf29814c0c27f5121</id>
<content type='text'>
Installs the .so and .py files generated by SWIG to system's site packages
directory. This allows the Python bindings to be used system wide. This
commit also includes documentation on setting up and installing the Python
bindings.

Link: https://lore.kernel.org/r/20241219012606.38963-1-jwyatt@redhat.com
Signed-off-by: "John B. Wyatt IV" &lt;jwyatt@redhat.com&gt;
Signed-off-by: "John B. Wyatt IV" &lt;sageofredondo@gmail.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>pm: cpupower: rename raw_pylibcpupower.i</title>
<updated>2024-09-13T20:24:16+00:00</updated>
<author>
<name>Min-Hua Chen</name>
<email>minhuadotchen@gmail.com</email>
</author>
<published>2024-09-13T20:17:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=313312c84b42d7b8ee1fb03ab30befc2bd0db211'/>
<id>urn:sha1:313312c84b42d7b8ee1fb03ab30befc2bd0db211</id>
<content type='text'>
The raw_pylibcpupower.i is removed unexpectedly after 'make mrproper'

We can reproduce the error by performing the following steps:
cd linux-next
make mrproper
cd tools/power/cpupower/bindings/python
make

We will get an error message:
make: *** No rule to make target 'raw_pylibcpupower.i', needed by 'raw_pylibcpupower_wrap.c'.  Stop.

The root cause:

The *.i files are already used for pre-processor output files and
the kernel removes all the *.i files by 'make mrproper'.

That explains why the raw_pylibcpupower.i is removed by 'make mrproper'.

To fix it, Follow John's suggestion to rename raw_pylibcpupower.i to
raw_pylibcpupower.swg.

See:
https://www.swig.org/Doc4.2/SWIG.html

Reviewed-by: John B. Wyatt IV &lt;jwyatt@redhat.com&gt;
Reviewed-by: John B. Wyatt IV &lt;sageofredondo@gmail.com&gt;
Tested-by: John B. Wyatt IV &lt;jwyatt@redhat.com&gt;
Tested-by: John B. Wyatt IV &lt;sageofredondo@gmail.com&gt;
Signed-off-by: Min-Hua Chen &lt;minhuadotchen@gmail.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>pm:cpupower: Add error warning when SWIG is not installed</title>
<updated>2024-09-06T16:58:35+00:00</updated>
<author>
<name>John B. Wyatt IV</name>
<email>jwyatt@redhat.com</email>
</author>
<published>2024-09-06T13:00:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=80e67f1802d0fc21543216557a68320c71d7dbe1'/>
<id>urn:sha1:80e67f1802d0fc21543216557a68320c71d7dbe1</id>
<content type='text'>
Add error message to better explain to the user when SWIG and
python-config is missing from the path. Makefile was cleaned up
and unneeded elements were removed.

Suggested-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
Signed-off-by: John B. Wyatt IV &lt;jwyatt@redhat.com&gt;
Signed-off-by: John B. Wyatt IV &lt;sageofredondo@gmail.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>pm:cpupower: Add SWIG bindings files for libcpupower</title>
<updated>2024-09-06T00:50:07+00:00</updated>
<author>
<name>John B. Wyatt IV</name>
<email>jwyatt@redhat.com</email>
</author>
<published>2024-09-05T02:19:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=338f490e07bc9e83c6fe60125ed9dea3e5d6a45d'/>
<id>urn:sha1:338f490e07bc9e83c6fe60125ed9dea3e5d6a45d</id>
<content type='text'>
SWIG is a tool packaged in Fedora and other distros that can generate
bindings from C and C++ code for several languages including Python,
Perl, and Go.

These bindings allows users to easily write scripts that use and extend
libcpupower's functionality. Currently, only Python is provided in the
makefile, but additional languages may be added if there is demand.

Added suggestions from Shuah Khan for the README and license discussion.

Note that while SWIG itself is GPL v3+ licensed; the resulting output,
the bindings code, is permissively licensed + the license of the .o
files. Please see
https://swig.org/legal.html and [1] for more details.

[1]
https://lore.kernel.org/linux-pm/Zqv9BOjxLAgyNP5B@hatbackup/

Suggested-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
Signed-off-by: John B. Wyatt IV &lt;jwyatt@redhat.com&gt;
Signed-off-by: John B. Wyatt IV &lt;sageofredondo@gmail.com&gt;
Signed-off-by: Shuah Khan &lt;skhan@linuxfoundation.org&gt;
</content>
</entry>
</feed>
