[17:54:50] <qwcode> ionelmc, confusing? as for error prone, I tried to cover the gotchas on certain techniques. I wasn't sure about declaring the single solution for everybody, and if I did, people would constantly raise the other alternatives as possibilities, so I felt the need to cover all the solutions that might work for people.
[17:55:30] <ionelmc> qwcode: i don't mean to remove em
[17:56:08] <ionelmc> just reorganize them in a way that there's only one recommended way (and explanations of why)
[17:56:12] <qwcode> you want to declare a winner for most? I can see that
[17:56:35] <ionelmc> qwcode: in the idea that less is more
[17:57:01] <ionelmc> now the question remains, which solution is least evil
[17:57:19] <qwcode> I'm certanly open to a PR that declares a winner with good arguments. I honestly just wasn't that confident about doing that, but atleast wanted to lay out the solutions, and frankly was pretty burnt out on that fiddlestick topic
[18:00:49] <qwcode> regarding the version section in the PUG offering too many solutions, but no winner
[18:00:53] <ionelmc> for #3: regex could fail later, eg: someone changes from single to double quotes or thinks it's a great idea to create the string with % or .format()
[18:01:28] <ionelmc> for #4: pkg_resources not available, package not properly installed, all sorts of unpredictable failures
[18:02:18] <ionelmc> for #5: additional unreliable process, someone forgets to bump versoin in both files - now you have a release on pypi with 2 versions
[18:03:05] <ionelmc> for #6: people always import stuff in __init__.py. always. you can't tell them not to.
[18:07:39] <Ivo> i look at this from in the utopian future perspective; my opinion of that is that metadata should be in a static file, readable by anything, because its a static file, and not a crazy dynamic setup() function which only setuptools dare execute to extract values; so the recommendation should move towards that utopia
[18:09:55] <Ivo> i.e something like https://bitbucket.org/dhellmann/virtualenvwrapper/src/58c2459e5b27e3876b99842f323222349d1b6ed1/setup.cfg?at=master except pbr seems to do some magic to extract the version rather than include it
[18:12:59] <ionelmc> btw, i'm trying to conceive a *good* package template here: https://github.com/ionelmc/cookiecutter-pylibrary
[18:13:00] <Ivo> so on one hand package is using it to specify build information that should always be there, but any random setup.cfg in a cwd can override it
[18:13:20] <ionelmc> for the version thing i have used the #5 pattern tho i'm not sure about it now
[18:34:49] <ionelmc> eg, package and modules are *still* handled separatelly
[18:35:49] <ionelmc> i find that rather annoying and ridiculous, distutils/setuptools/whatever not beeing about to figure out on its own if you distribute a module or a package
[18:36:53] <ionelmc> Ivo: sure, do you like this then https://github.com/ionelmc/cookiecutter-pylibrary/blob/master/%7B%7Bcookiecutter.repo_name%7D%7D/setup.py#L29-L31 ?
[18:36:55] <Ivo> Would setuptools automatically doing find_packages() satisfy you in that regard?
[18:37:04] <ionelmc> haven't seen anyone trying to discover the modules
[18:37:27] <ionelmc> i'd like to not have to do py_modules=[splitext(basename(i))[0] for i in glob.glob("src/*.py")],
[18:39:22] <cdunklau> src/no src feels more like a religious argument every day
[18:39:23] <ionelmc> DanielHolth: glad someone is agreeing - might want give me some support here http://blog.ionelmc.ro/2014/05/25/python-packaging/ :p
[18:40:11] <ionelmc> cdunklau: it's not like religion, in the worst case it's like fashion
[18:41:10] <ionelmc> Ivo: because it makes an easier job to remove unused imports, eg: ide/editor highlight the lines that aren't used
[18:42:14] <ionelmc> if i had everything on one line then i'd actually have to look couple of times at the message to see which of the many imports are not used
[18:42:32] <ionelmc> flat is better than nested no? :)
[18:52:21] <cdunklau> ionelmc: regarding single-line imports, if you just run flake8 it will catch that kind of thing
[18:53:00] <cdunklau> err, pyflakes. but flake8 bundles it
[18:53:41] <ionelmc> ah yes, but i like to also sort the imports
[18:53:48] <ionelmc> so i use this nice tool isort
[18:55:12] <ionelmc> cdunklau: i also included flake8: https://github.com/ionelmc/cookiecutter-pylibrary/blob/master/%7B%7Bcookiecutter.repo_name%7D%7D/tox.tmpl.ini#L58-L60
[18:55:25] <ionelmc> could use some feedback, maybe i missed something