The starcal RPM requires both Python 2 and Python 3. Except in very special circumstances, there is no need for one package to drag in both Python stacks. Usually, this is a packaging error: for example, a stray "/usr/bin/python" shebang in a Python 3 package can introduce a Python 2 dependency. Please split your package, or remove the stray dependencies. There is a section on shebangs in the Python RPM Porting Guide [0] which covers this issue. It's ok to do this in Rawhide only, however, it would be greatly appreciated if you could push it to Fedora 24 as well. If anything is unclear, or if you need any kind of assistance, you can ask on IRC (#fedora-python on Freenode), or reply here. We'll be happy to help investigating or fixing this issue! [0] http://python-rpm-porting.readthedocs.io/en/latest/application-modules.html#are-shebangs-dragging-you-down-to-python-2
Thanks, fixed. BTW, the shebang fix commands in the given link are incorrect and need a few changes to work correctly: find -type f -exec sed -i '1s=^#!/usr/bin/\(python\|env python.*\)$=#!%{__python3}=' {} \;
Hi Hedayat! Thank you very much for the heads up! The %{__python3} macro was a later addition, so I did not notice the clash with my favourite separator—the underscore. It should be fixed now! The linu thus should be: find -type f -executable -exec sed -i '1s=^#!/usr/bin/\(python\|env python\)=#!%{__python3}=' {} + Notice it's a bit different than the one you posted, because this one works also with e.g. the shebang `#!/usr/bin/python --some-flag`, which is important. Your sed line only allows for flags following `/usr/bin/env python` as you put the `.*` inside it's branch. Thanks again for the bug report!
Hi & thank you for the description. However, there is a problem with your version too: it modifies the following shebangs too: /usr/bin/env python3 /usr/bin/python3 to /usr/bin/env python33 /usr/bin/python33 so you should exclude the cases where python is followed by 3! :)
Ah, good point! How about this? find -type f -exec sed -i '1s=^#!/usr/bin/\(python\|env python\)[23]\?=#!%{__python3}=' {} + That should work every time!
Yes, it looks great :)