wb8tyw / D-Rats

D-Rats program for D-Star Ham Radios
https://iz2lxi.jimdofree.com/
Other
7 stars 1 forks source link

fix(dplatform): Fix system data paths #246

Closed wb8tyw closed 2 years ago

wb8tyw commented 2 years ago

d-rats.py: Set the platform_config_dir, it is not a base dir.

d_rats/dplatform.py: Fix the system data path to use the standard locations instead of a hardcoded one that does not work for installing from pip into a virtual environment. Change set_base_dir to set_config_dir to remove confusion. Start deprecation of get_source method. Add method to get the constant d-rats data.

wb8tyw commented 2 years ago

I was debugging the new python build procedure and went to test the resulting tarball and nothing worked. The dplatform module still needs a lot more work after this.

This is the minimum changes needed to get a properly built and installed by pip package of d-rats to function to work on any platform.

I had to guess a bit for Mac OS-X, but in general it should work.

For Windows, this is assuming a pip install of the d-rats package.

In an upcoming commit will be the stuff for actually building a distribution tarball using mostly the new supported and partially documented methods. One method has been deprecated, but they (Python packaging maintainers) have not yet decided what to replace it with that will actually work.

Support will only be initially for pip installed packages. We will have to figure out msys2, rpms, debs, etc after that.

wb8tyw commented 2 years ago

Turns out that we should be putting the packaging version in version.

Note that the packaging version may be different than the public displayed version. For non-releases, the public displayed version may have a git commit hash in it and indicate if there were modified uncommitted files with the "--dirty" tag.