What I Want To Do
I'm trying to build an RPM package of my app that could be installed in different Fedora distros, which have different default Python 3 versions (i.e. Fedora 28 has python3.6, and Fedora 29 has python3.7)
I'm using this to build an RPM
python3 setup.py bdist_rpm
The Problem
If I build it on Fedora 28, then the RPM will have my python files in /usr/lib/python3.6/site-packages.
When a users installs it on Fedora 29, where a default Python is 3.7, it won't find my package because it looks into /usr/lib/python3.7/site-packages.
So when a user launches the app it naturally fails with error "No module named 'myappname'".
The Solution That I Don't Like
I can build multiple RPM packages -- one in Fedora 28 and another one in 29
Instead, I'd like to build one RPM that works in both distros.
What I Tried
I tried adding python37 as a dependency, but then app fails too because it cannot import dependencies like python-Levenshtein -- all dependencies are installed in /usr/lib/python3.6/site-packages
My spec file is here.