Simplify mythdirs.cpp and remove RUNPREFIX#1260
Simplify mythdirs.cpp and remove RUNPREFIX#1260ulmus-scott wants to merge 8 commits intoMythTV:masterfrom
Conversation
|
Debian has a non-standard installation scheme for Python packages(1): MythTVs Python bindings need to know the location of the Thus, depending on the way how MythTV is compiled and installed, (1) On Debian/Ubuntu, one gets:
and using that environment variable: $ DEB_PYTHON_INSTALL_LAYOUT=deb_system python3
Note the difference in 'purelib' path. (2) ad @bennettpeter : Many thanks for the deb-light framework, it implements great testing features! |
|
@rcrdnalor OK, thanks for the information. The uses in the Python bindings want the The only other use wants the However, I think that use could use relative paths since it is installed under I think calling the remaining use PYTHON_SCRIPT_DIR_PREFIX where it includes |
|
I've asked amessina to chime in on this since he's done some work with packaging. |
|
Thanks @linuxdude42. I'll take a look in the near future, especially if I can backport to fixes/35 as I don't run master. When I was converting to CMAKE, mostly I was looking to get the Fedora Qt6 CMAKE build to use the standard routine where build and install occur in separate sections of the rpmbuild: That way I didn't need to do things like... |
|
My apologies for the delayed response, I've been away from a computer this past week. You can detect a mac app bundle using some functions in <CoreFoundation/CoreFoundation.h>. Attached is an example I stumbled on and verified to work. It will need the -framework CoreFoundation linker flag added to cmake. I can confirm an app bundle runs ok even moved from the cmake output location, but the python based metadata grabbers no longer work. |
|
I will need to add back RUNPREFIX for the Python bindings, since Roland says there is no other way for the Python bindings to find the MythTV scripts. @jhoyt4 Thanks for the example. However, am I correct in understanding that no additional change is needed for macOS in mythdirs.cpp? |
|
I restored the use of RUNPREFIX for the Python bindings. However, I don't think configure/qmake used prefix and runprefix correctly based on their descriptions. |
It appears the python issue is a macports problem. After re-building with homebrew everything looks good. |
Just tested on homebrew and macports. Homebrew still works without issue, macports is still failing, but that's due to lxml not being included in the app bundle for some reason. I still believe that issue to be an unrelated macports issue. Since the mac frontend weekly builds use homebrew, I'd say this is safe to proceed while I look into the macports issue. |
|
I use packaging/deb-light a lot for development and testing: |
|
The settings for CMake and configure are still the same. I did tweak their descriptions since CMake's MYTH_RUN_PREFIX and configure's runprefix are now only used by the Python bindings. I had thought about changing the settings names, but I decided to leave them as is for now. |
Since it looks like the v36.0 release is imminent, I think I'd be able to user-test this out by patching it into the equivalent of a v36 tarball release. Is there any special handling used to create the release tarballs, or could I just base it on a |
|
There's no special handling. It's essentially updating the SRC_VERSION file and setting a tag. |
Ok, thanks. I'll get a start on testing this weekend. |
Builds ok for Fedora 43 with |
This is intended to make moving an install of MythTV easier. However, the Python bindings still need it to find the MythTV scripts.
site-packages and lib-dynload were missing the prepended path. Also match mythutil/musicmetautils.cpp code with the rest.
@jhoyt4 I think this will break for the application bundle on macOS, so if there is some way to determine the program is in an application bundle, a suggested change would be welcome.
@rcrdnalor I don't think the python bindings will work fully if moved after install. Could the uses of
INSTALL_PREFIXbe replaced with some code using relative paths from the python file?Checklist