On 05/22/2018 04:25 PM, Morten Linderud via arch-dev-public wrote:
Yo!
In April there was some discussion regarding how to properly do unit testing in Python PKGBUILDs[1]. Felix had some amazing notes that was super useful. But as pointed out we don't really strive to document these things[2]. To try help and spark some interest in improving the current package guidelines, I have spent a some time restructuring and rewriting parts of the Python and Golang package guidelines. I'd appreciate reviews on them!
https://wiki.archlinux.org/index.php/User:Foxboron/Python_packaging_guidelin... https://wiki.archlinux.org/index.php/User:Foxboron/Go_packaging_guidelines
So there's been some recent activity on the wiki pages in question. Primarily, golang seemingly needs to be copied entirely due to not supporting symlinks or some such. Also I'd like to discuss what seems to me a common misconception in python packaging -- specifically, the use of cp -r source source-py2 and building both separately. Best I can tell, this is primarily motivated by fear of py2/py3 specific bytecode being generated, but the thing is, this bytecode is all generated during package() inside of "$pkgdir" during the install step. You can check the contents of the build/ directory... it just copies the .py files and builds any ext_modules. The one case where this would make a difference is where 2to3 is being used, so depending on which version of python you use the actual source code is modified. I think the guidelines should only mention that "if 2to3 is used, you'll need to make copies of the source [...]". Honestly I consider this copying around when unnecessary to be the equivalent of inserting "sleep 5" everywhere. 2to3 being run as part of setup.py build is hardly the common case, it's not even recommended at all, really. -- Eli Schwartz Bug Wrangler and Trusted User