-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Dne 10.10.2014 v 11:36 Johannes Meixner napsal(a):
Hello,
On Oct 10 09:34 Johannes Meixner wrote (excerpt):
I assume .pyc files are not architecture independent so that a package that contains .pyc files cannot be "noarch".
(...)
It seems .pyc files compliled on a 64-bit machine are readable on a 32-bit machine but large integer numbers may get changed which might result different behaviour of the program (e.g. different output format or even different results).
Short version: For all intents and purposes, the bytecode is platform-independent. Don't worry about it. Long version: On a 32bit machine, you won't detect any difference between a 32bit and a 64bit bytecode. A number that would be int and TYPE_INT64 on a 64bit will end up being long (TYPE_LONG) on 32bit, regardless of how it is saved. Furthermore, ints and longs work together transparently. If you run into an issue with int/long, your code is platform-dependent in source form as well, because ints are shorter on 32bit. In practice, when programming Python, you simply don't care about the distinction. If you tried hard enough, you could detect a difference if you ran on a 64bit machine from a 32bit bytecode, but I'm reasonably confident that the only way to get this is to be actively trying to detect specifically this condition. In any case, AFAICT we compile noarchs on 64bits, so the point is moot. IOW, you are technically right about the platform dependence, but in practice, we can (and do) safely ignore the difference and enjoy the benefits of noarch. As for "compiled as needed on each end-user's system" -> please note that if the user doesn't have write permissions to the install locations, they have to recompile the sources every time. This is the main reason to ship compiled bytecode. Your package is apparently run as root, but that's an exceptional situation. I would actually recommend that you include .pycs and .pyos for hplip in the rpm, and simplify your %preun. Rest assured that the "usual method" works just fine in SLE11 as well ;) regards m. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBAgAGBQJUPqWNAAoJEIskb84DCy7LO+IP/iJbIBATH990PYFk9Vd5/tS7 krDcU2xPfS0lG4D4gn79Ql/XkyBkMqh7F5DmqeD2uRGiiXaU24akcOYxAUT16whm TbOQz7QN9abRzQlbJ25bTHOX/BXqeniJ2aiZrxXh1gOK5cn1ExpM3CL9+JLRutzP OFZIvTBpPchTp+9uDIiuv4JcD4EJKTrkgrON+K4xfIw8CZl1RqUvx/Ah+JPdwhqv k5A+QA0EcybqSwr703DBRlWggGm21joerAwqZmIkFBrJ2c3K3ylI6/z8zqn1EP7F qx6+juApEYTC2UWUhxFLUPLmddSDTJUOEf3sUoqfIiF8dWy2P2+nW+Wwnk+UqDx2 m7fJ5fMibADShEgyYuXQmb/NVee78F0IWL86boPjgqfaFq1IhGbsVErNr4/us/r4 eQ05JNGIeu15l5Sn4LmjDzrGhK6/MRvmvEVmkxe9dw0n/2zkJgOmTK31Kd0fL64Y 1XTG6zmirqyG0j1e0ZySAydrgclw+lnnoQ1UljBZRFN6XEQSgGt7ETEPRWM4vZDy DhHiHNbdFwjmXmmnd0irrw1IriZJnREm4029ouipzg/rV+vBKLhb2HcsEwVWoei9 skXiiyHVYKhjIo3ywXbSBztKabxMku9YWbhfc/BoOX7ggzjl6MW3p0Lz3sa7S26P h8+bNeuO61MDQSUFjbFf =eum/ -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse-packaging+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-packaging+owner@opensuse.org