1*338f490eSJohn B. Wyatt IVThis folder contains the necessary files to build the Python bindings for 2*338f490eSJohn B. Wyatt IVlibcpupower (aside from the libcpupower object files). 3*338f490eSJohn B. Wyatt IV 4*338f490eSJohn B. Wyatt IV 5*338f490eSJohn B. Wyatt IVrequirements 6*338f490eSJohn B. Wyatt IV------------ 7*338f490eSJohn B. Wyatt IV 8*338f490eSJohn B. Wyatt IV* You need the object files in the libcpupower directory compiled by 9*338f490eSJohn B. Wyatt IVcpupower's makefile. 10*338f490eSJohn B. Wyatt IV* The SWIG program must be installed. 11*338f490eSJohn B. Wyatt IV* The Python's development libraries installed. 12*338f490eSJohn B. Wyatt IV 13*338f490eSJohn B. Wyatt IVPlease check that your version of SWIG is compatible with the version of Python 14*338f490eSJohn B. Wyatt IVinstalled on your machine by checking the SWIG changelog on their website. 15*338f490eSJohn B. Wyatt IVhttps://swig.org/ 16*338f490eSJohn B. Wyatt IV 17*338f490eSJohn B. Wyatt IVNote that while SWIG itself is GPL v3+ licensed; the resulting output, 18*338f490eSJohn B. Wyatt IVthe bindings code: is permissively licensed + the license of libcpupower's .o 19*338f490eSJohn B. Wyatt IVfiles. For these bindings that means GPL v2. 20*338f490eSJohn B. Wyatt IV 21*338f490eSJohn B. Wyatt IVPlease see https://swig.org/legal.html and the discussion [1] for more details. 22*338f490eSJohn B. Wyatt IV 23*338f490eSJohn B. Wyatt IV[1] 24*338f490eSJohn B. Wyatt IVhttps://lore.kernel.org/linux-pm/Zqv9BOjxLAgyNP5B@hatbackup/ 25*338f490eSJohn B. Wyatt IV 26*338f490eSJohn B. Wyatt IV 27*338f490eSJohn B. Wyatt IVbuild 28*338f490eSJohn B. Wyatt IV----- 29*338f490eSJohn B. Wyatt IV 30*338f490eSJohn B. Wyatt IVInstall SWIG and the Python development files provided by your distribution. 31*338f490eSJohn B. Wyatt IV 32*338f490eSJohn B. Wyatt IVBuild the object files for libcpupower by running make in the cpupower 33*338f490eSJohn B. Wyatt IVdirectory. 34*338f490eSJohn B. Wyatt IV 35*338f490eSJohn B. Wyatt IVReturn to the directory this README is in to run: 36*338f490eSJohn B. Wyatt IV 37*338f490eSJohn B. Wyatt IV$ make 38*338f490eSJohn B. Wyatt IV 39*338f490eSJohn B. Wyatt IV 40*338f490eSJohn B. Wyatt IVtesting 41*338f490eSJohn B. Wyatt IV------- 42*338f490eSJohn B. Wyatt IV 43*338f490eSJohn B. Wyatt IVPlease verify the _raw_pylibcpupower.so and raw_pylibcpupower.py files have 44*338f490eSJohn B. Wyatt IVbeen created. 45*338f490eSJohn B. Wyatt IV 46*338f490eSJohn B. Wyatt IVTo run the test script: 47*338f490eSJohn B. Wyatt IV 48*338f490eSJohn B. Wyatt IV$ python test_raw_pylibcpupower.py 49*338f490eSJohn B. Wyatt IV 50*338f490eSJohn B. Wyatt IV 51*338f490eSJohn B. Wyatt IVcredits 52*338f490eSJohn B. Wyatt IV------- 53*338f490eSJohn B. Wyatt IV 54*338f490eSJohn B. Wyatt IVOriginal Bindings Author: 55*338f490eSJohn B. Wyatt IVJohn B. Wyatt IV 56*338f490eSJohn B. Wyatt IVjwyatt@redhat.com 57*338f490eSJohn B. Wyatt IVsageofredondo@gmail.com 58*338f490eSJohn B. Wyatt IV 59*338f490eSJohn B. Wyatt IVCopyright (C) 2024 Red Hat 60