On 16-11-27 19:41:06, Eli Schwartz via aur-general wrote:
On 11/27/2016 06:10 PM, Quentin Bourgeois wrote:
With this, I come with a simpler PKGBUILD[0] in which I push modifications you advised. I also removed some dependencies that are used for code coverage and building documentation, which I do not install for now.
Did we get to something good ?
[0] https://git.bourgeois.eu/aur_python_viivakoodi.git/tree/
I should comes with all modification on this batch.
Err, why do both split packages provide 'python2-viivakoodi'? One of them already is 'python2-viivakoodi', and the other by definition doesn't supply it, being Python 3. My mistake.
You declare setuptools as a makedepends only, but I hate to inform you that setuptools-installed packages have a runtime dependency on setuptools to launch their console scripts. (This is the downside of having python itself be capable of generating the entry point launchers in a cross-platform manner -- rather than using your own python scripts with file extensions, then assuming Linux users will be happy with the extension and Windows users will be able to launch a non-binary.)
For module-only python packages, it is only a makedepends... for packages which ship with console_scripts you need it at runtime as well, otherwise the console_scripts will fail trying to import pkg_resources.
You can either have each split package depend on python{,2}-setuptools, or depend on both that and the python{,2} package itself. I have seen it done both ways. Hum, this was not abvious for me, thanks. With what I have understand from that I have decide to make every split package depend on pythonX and pythonX-setuptools its seem simpler for me to understand.
I will dig this setuptools + console_script topics by my own. On this, when I run namcap on created packages I get some warnings: $ namcap *.tar.xz python2-viivakoodi W: Dependency python2 included but already satisfied python2-viivakoodi W: Dependency included and not needed ('python2-setuptools') python-viivakoodi W: Dependency python included but already satisfied python-viivakoodi W: Dependency included and not needed ('python-setuptools') For every packages the first warning is due to my choice. For the second does namcap could warn packager that are not aware of the setuptools+console_scripts things (or maybe its something well known ?).
...
There are still some optional style preferences, like leaving a line of whitespace after the "# Maintainer:" line and reusing the "$url" variable in the source array. Feel free to take that or leave it, though. :) Also, I don't usually see people initializing an array with += but it isn't like that is harmful. Also, the permissions mode in chmod/install assumes leading zeroes, so you don't need to explicitly say those licenses are lacking in suid/sticky attributes.
Integrated, the += intialization was due to the empty variables remove. On style preferences, when I code in Bash I over use {} arround variables (mainly when variables are tied to other strings). What is the guideline on this ?
-- Eli Schwartz