ipbus / ipbus-software

Software that implements a reliable high-performance control link for particle physics electronics, based on the IPbus protocol
https://ipbus.web.cern.ch
GNU General Public License v3.0
22 stars 26 forks source link

rpmbuild fails for uhal-python when using python 3.9 on centos 7 #241

Open alkis-pap opened 3 years ago

alkis-pap commented 3 years ago

When I tried to create rpm files for uhal-python on centos 7 I got this error:

error: Installed (but unpackaged) file(s) found:
   /usr/local/lib/python3.9/site-packages/uhal/__init__.pyc
   /usr/local/lib/python3.9/site-packages/uhal/__init__.pyo

I fixed it by adding the following option to the rpmbuild command in uhal/config/mfPythonRPMRules.mk (line 58): --define '_unpackaged_files_terminate_build 0'

Also, since I have installed python 3.9 from source instead of using yum, python39 is not installed as an rpm package therefore I had to remove ${PYTHON_RPM_CAPABILITY} from line 49 in the same file.

tswilliams commented 3 years ago

Hi,

Do the __init__.pyc and __init__.pyo files exist under uhal/python/pkg/uhal before the make rpm command is run? If not, I suspect this might be tricky to solve, and since Python 3.9 RPMs aren't available for CentOS7, it might take me a while to be able to reproduce the setup.

Overall though, since Python itself is not RPM, in this case rather than build RPMs it might make most sense just to directly install the Python bindings; this can be done as follows:

cd uhal/python
make install

Cheers, Tom