[13:01:24] <nanonyme> Hmm, how do I set the default PyPI server to upload to in pypirc?
[13:02:44] <nanonyme> I'm trying to set the default to be a no-op section so I don't accidentally push anything. Instead I'm seeing an 401 from real PyPI
[13:05:43] <nanonyme> Oaaagh, so this is a stdlib botchup in distutil then that you can't actually change the default?
[13:07:58] <nanonyme> Any hope of getting distutils fixed and release 2.7.10? :P
[13:13:04] <nanonyme> (or put the uploading to setuptools so it's properly upgradable)
[13:13:48] <Wooble> yeah, the latter is much more likely to actually happen :).
[13:14:57] <Wooble> although with twine exisiting no idea if adding upload to setuptools is something that would even be considered...
[13:15:32] <nanonyme> Actually yeah, putting *everything* from distutils into setuptools instead (compiling, pypi handling etc) sounds sounds somewhat nice considering ensurepip pokes setuptools in
[13:16:03] <nanonyme> The only benefit of anything being in distutils is it gets out of date and bitrots
[13:16:38] <nanonyme> But yeah, I think I found the relevant sections of distutils that are simply just plain wrong
[13:17:27] <nanonyme> If -r is missing, URL defaults to https://pypi.python.org/pypi. At that point even if you defined index-servers as something else than pypi, it gets ignored
[13:19:09] <nanonyme> So basically the default behaviour is completely broken for anyone primarily working in a corporate environment where you must not accidentally push something to real PyPI
[13:20:09] <nanonyme> (but only by specifically meaning to)
[13:24:49] <nanonyme> https://docs.python.org/2/distutils/packageindex.html#pypirc looks like password handling also works against documentation. If password is omitted, it is *not* asked but instead you get a 401 error from the server
[13:25:00] <ronny> nanonyme: i made a rule of never ever invoking register/upload myself, i use devpi, and the real uploads happen in makefiles
[13:25:32] <ronny> nanonyme: and as a extra i use hgdistver, which in the default setup adds local versions to all but tags (and those versions can never be on pypi)
[13:25:59] <ronny> hmm, finger memory from the last 5 years is strong :P
[13:26:34] <ronny> nanonyme: so basically with something like setuptools_scm all commits get version numbers, and only tagged commits get version numbers uploadable to pypi
[13:26:42] <nanonyme> It would just be nice to get a setup with which you couldn't accidentally push any trade secrets to http://pypi.python.org/pypi. Maybe I should block http://pypi.python.org/pypi with a firewall
[13:37:17] <ronny> nanonyme: setuptools patches around in amny parts of distutils, that might cause slight unnoticable behaviour changes (setuptools has a very strange and problematic legacy)
[13:44:16] <nanonyme> PuTTY has pscp which is basically same as scp and plink which is basically similar to ssh. Both can use SSH keys from Pageant (which is the agent)
[13:46:10] <nanonyme> Does that fit into what you had in mind at all?
[13:47:43] <nanonyme> (honestly I should probably some day learn enough about PuTTY to write some bindings so you could use SSH with it through a Python API)
[13:48:16] <nanonyme> Anyway, back to trying to publish the stuff
[13:57:13] <nanonyme> There we go, one more random package wheelified https://pypi.python.org/pypi/SendKeys/0.3
[13:57:40] <nanonyme> Now for trying to get pywinauto to PyPI too...
[14:08:25] <Ivo> i looked, doesnt seem distutils asks for password
[14:08:57] <Ivo> i wanna know when mitsuhiko is gonna upload wheels now that hes even made a tool to distribute packages through them
[14:13:57] <nanonyme> Ivo, documentation claims it does. Honestly, I think it's awful such a critical piece of Python packaging is part of stdlib
[14:31:32] <jaraco> The main instance where I need that is when a certain command is present.
[14:31:46] <jaraco> (and not just present, but also implied).
[14:32:59] <ronny> jaraco: basically i want to be able to run setup.py in a way where no eggs are automatically downloaded, but instead parsable errors are shown
[14:39:48] <jaraco> or add them to a .pth file as easy-install.pth does.
[14:42:27] <ronny> jaraco: the idea i have is to make ez_setup a really small wheel file that any python with zip support can run
[14:42:44] <ronny> jaraco: and then push setup_requirement downloads into it
[14:43:20] <ronny> jaraco_: the idea i have is to make ez_setup a really small wheel file that any python with zip support can run
[14:43:45] <ronny> jaraco_: and then push setup_requirement downloads into it
[14:45:51] <jaraco_> I'm not sure what that accomplishes. The main value I get from setup_requires is that I can declare dependencies for running tests, building docs, and uploading packages that aren't relevant to the package itself... and they don't interfere with the active environment.
[14:46:10] <jaraco_> My instinct is that ez_setup isn't a good place for that.
[14:46:36] <jaraco_> But I'm open to consider it in more detail.
[14:47:01] <ronny> jaraco: as tests/docs can be extras, and setup_requires are no longer needed for wheel installs
[14:47:15] <jaraco> Other systems rely on setup_requires to hack around setuptools (e.g. pbr).
[14:56:34] <ronny> jaraco: setup_requires as is cant go away, but a more introspectable alternative can be made in some way
[15:00:10] <jaraco> setup_requires is a way of a package declaring that it needs more functionality to install than your environment currently supplies.
[15:00:12] <ronny> actually, skip that, with the setup_requires writer pip can take a look
[15:01:00] <ronny> jaraco: i dont want setup.py to do any network thing
[15:01:27] <ronny> i want all network interactions to be outside of setup.py
[15:01:42] <ronny> all it should ever do is take a look at .eggs
[15:02:14] <ronny> and recommend the easy_install/pip command in case some are missing
[15:03:35] <jaraco> so something like setup.py --fail-on-missing-setup_requires
[15:09:42] <ronny> jaraco: anyway, back to setup_requires, auto-download should be a feature flag, first opt out, later opt in, much later no logner supported
[15:10:30] <ronny> the task of doing downloads/verification should be pushed into easy_install/pip
[15:12:44] <jaraco> ronny: that sounds fine, except that you can't deprecate a feature without first providing a story for how the current use cases would be supported.
[15:13:03] <jaraco> How would you propose, for example, that the 'irc' package run its tests?
[15:13:34] <jaraco> Currently, it invokes 'setup.py test'
[15:13:48] <jaraco> Ideally, whatever replaces that model should also be able to run as a single command.
[15:14:52] <jaraco> Maybe that command is just a wrapper around "easy_install `generate_reqs_from setup.py`; ./setup test"
[15:14:54] <ronny> jaraco: i see nothing wrong with a 2 command story, separating preparing the development environment and usigng it
[15:15:31] <jaraco> ronny, I do see a problem with that because (a) I don't want to repeatedly type the same things repeatedly and (b) I'd like not to ask others to do the same.
[15:15:32] <ronny> jaraco: easy-install/pip install --just-deps-of .; setup.py test
[15:16:16] <ronny> hmm, i use tox for tests, or devpi test packagename
[15:16:29] <jaraco> In that case, it would be straightforward to have another distutils command that handles the former, and then an alias that binds the dependency download and test invocation.
[15:16:36] <ronny> so surrounding tools already handle thoe workdlow better and more detailed than setup.py
[15:19:01] <jaraco> But either of those tools still require asking the developer to install those tools first.
[15:19:07] <jaraco> So there's an implicit first step.
[15:19:25] <jaraco> Travis provides those, but stdlib doesn't.
[15:19:51] <jaraco> Installing setuptools/pip is another.
[15:20:49] <jaraco> So in the irc test scenario, if one has setuptools (the minimum implied assumption), one can run the tests.
[15:21:22] <jaraco> They don't have to think about which version of pytest they may or may not need, because the library declares an appropriate version.
[15:21:45] <jaraco> They don't need pip or tox or devpi or any other pre-requisite steps.
[15:22:14] <jaraco> And, the system environment is unaffected by running the tests.
[15:22:31] <jaraco> One can check out the repo, run the tests, and delete the repo, and the system is unchanged.
[15:22:39] <jaraco> You can't say the same for the tox or devpi story.
[15:24:50] <jaraco> I believe this was the vision of setuptools from years ago... and that setuptools would be incrementally absorbed into the stdlib until even the setuptools dependency was unnecessary.
[15:25:04] <jaraco> To be clear, I'm a big supporter of tox and devpi and virtualenv and pip.
[15:26:11] <jaraco> But the story they tell about a developer use case is clumsy - because it implies altering the system environment, which may or may not require sudo, and which leaves artifacts that might conflict with the story for other packages.
[15:27:51] <doismellburning> jaraco: just to help me understand what you've said - if tox were vendored in setuptools, then the situation described would be fine?
[15:29:25] <Ivo> the average user story isnt that they have multiple pythons installed for testing
[15:29:52] <jaraco> doismellburning, I don't think so, but maybe. tox pulls in pytest and virtualenv, which sets the stage for a model where tox could handle the complete story.
[15:29:59] <doismellburning> Ivo: I'm not sure how that relates to what I said
[15:30:13] <Ivo> thats the major usecase for tox is it not
[15:31:03] <doismellburning> jaraco: I may have been overly focussing on the "other pre-requisite steps" part of what you said
[15:31:42] <jaraco> tox would need to support (a) running without launching into subprocesses, which is problemmatic in some cases, and (b) downloading dependencies to an isolated environment, which I believe it does. There are probably other issues, but that's plausible.
[15:31:53] <Ivo> and yeah you're not just installing tox then. in packaging it helps a lot when things dont have dependency trees to install
[15:31:59] <Ivo> otherwise you're vendoring mb's of stuff
[15:32:02] <doismellburning> jaraco: ah, wasn't aware that (a) was an issue
[15:32:41] <jaraco> It's not an issue I care to raise.
[15:37:36] <ronny> jaraco: there should be a system integrator story for python package tests
[15:37:52] <ronny> jaraco: but that story should be different anyway
[15:38:25] <ronny> because system integrators should be going for universal wheel isntalls whenever possible and can handle extra deps for test commands easyly
[15:38:59] <ronny> and for the developer that cant run 1-2 command to set up a dev env, i have no empathy
[15:45:40] <Ivo> there is a hell of a lot to be said for making it easy for people to be able to test their changes
[15:46:00] <Ivo> ends up with a lot less useless drive-by PRs
[15:46:34] <ronny> Ivo: they need to be in a position where it it very easy to set up a development environment for the package where they can run tests
[15:46:52] <ronny> Ivo: setup.py test by no means leaves one with something like that
[15:57:04] <jaraco> ronny: how is that not the case? That's exactly the use case I strive for with the packages I maintain, even complex ones like pmxbot, which depend on MongoDB instances and network infrastructure (but gracefully degrade when they're not available).
[15:58:00] <jaraco> You can right now, check out https://bitbucket.org/yougov/pmxbot and run "python3.4 setup.py pytest" and I'm 90% confident the tests will run (probably with many skips).
[15:58:15] <ronny> jaraco: setup.py test leaves me not with a debuggable environment i can use for in detail development, all it does is pull some eggs around and run the tests
[15:58:41] <ronny> which means its perfect to run the tests, it utterly sucks for development if something broke and you want to go develop
[15:59:07] <jaraco> good point. That is a deficiency. And the transition from quickly running tests to getting into a more involved development environment is not a good one.
[16:00:35] <ronny> my oppinion is to scrap the testing toy and give people a fully featued story for going into development, ci and deployment
[16:01:40] <jaraco> I disagree. Instead provide a story that supports an easy and natural elevation from the testing story to more involved development.
[16:01:42] <ronny> stuff like check out on a linux box, upload a sdist to a devpi on every change so a poller in a windows vm in a cloud can run tests
[16:02:26] <ronny> also setup.py test doesnt support powerfull runners in any meaningfull way
[16:03:25] <nanonyme> Is there any way to convince wheel that something is a binary wheel even though setup.py lists no extensions?
[16:03:36] <jaraco> I use setup.py test almost exclusively. It supports the full feature set of pytest plus supports dependency resolution.
[16:04:14] <ronny> jaraco: it completely criples the cli and use of additional self installed pytest plugins
[16:04:17] <jaraco> It does only support only one Python at a time, but otherwise, it supports rich and powerful test runs, including pdb interaction, fixture setup and teardown, etc.
[16:05:14] <jaraco> ronny, In what way does it cripple the cli? It invokes pytest the same way as the 'py.test' entry point does.
[16:05:35] <jaraco> It does require cli options be embedded in the --addopts parameter, which is less than ideal.
[16:05:39] <ronny> jaraco: py.test plugins can add new options
[16:06:12] <ronny> jaraco: and py.test plugins not part of the setup.py test call can only be used if one messes with the surrounding environment anyway
[16:06:14] <jaraco> ronny: if pytest plugins are specified as part of the tests_require, wouldn't those options be available?
[16:06:37] <Ivo> and/or give it a binary tag saying what it works on
[16:08:32] <ronny> jaraco: the basic problem is that wrapping around py.test the way setup.py test does takes away certain kinds of flexibility, at least your runner is reasonably doing, but still, not quite as nice as the original is (i grew a bit oppiniated on that over the years)
[16:10:51] <ronny> hmm, bit it reminds me i still need to document the the setuptools integration you made as the good integration practice
[16:11:08] <Ivo> ronny: I find for a lot of things I don't need to set up a massive dev environment for it and get everything perfect; just find where something is breaking in the code (python being interpreted is great for that), change it, then test. Simple. Makes making a good PR 5 minutes instead of 1/2 hr
[16:11:43] <jaraco> I have to gtw, but good discussino.
[17:53:28] <nanonyme> Anyway, this is good enough for now as I'm just going to vendor the binary wheel but I need to figure out how to convince setuptools that it's platform-dependent even with no ext_modules if I'm to publish it to our devpi server
[17:57:10] <ronny> nanonyme: you might jsut want to write a own tool that makes a zip file with dist-info and the files
[17:57:36] <ronny> nanonyme: at work we did that for a library we got from a vendor
[18:02:15] <nanonyme> ronny, I was hoping to just lie it's a normal wheel :)
[18:10:24] <nanonyme> Well, I'm fine with the inner stuff being looser as long as the prefiltering in file name makes non-Windows pip not download it
[18:10:45] <nanonyme> Though I guess I'm relying on simple interface being the future forever here
[18:19:06] <qwcode> looking for the logic in setuptools or distutils that determines whether a custom script is wrapped, or just copied.... ( pf_moore )
[18:19:55] <dstufft> I don't think there is any logic
[18:20:09] <dstufft> distutils's "scripts" are copied and console_script entrypoint uses wrappers
[18:21:12] <qwcode> I'm seeing a custom script get wrapped as well
[18:23:25] <nanonyme> https://bitbucket.org/pypa/wheel/pull-request/48/added-an-option-to-build-pyc-only-wheel/diff I hope you guys at least make this result in a non-pure wheel
[18:23:51] <nanonyme> If you can't recompile .py->.pyc, I doubt it will be excessively portable
[18:25:46] <qwcode> wrapped with # EASY-INSTALL-DEV-SCRIPT:...
[18:51:17] <qwcode> dstufft, setuptools has this "is_python" function that can report false positives for scripts. if a simple bash script python-compiles ok, it gets considered python and wrapped. https://bitbucket.org/pypa/setuptools/src/4bc93ca98bbd08347ad907478bba92647855787d/setuptools/command/easy_install.py?at=default#cl-1787
[18:52:01] <qwcode> dstufft, thinking it should look at shebang first. reorder the logic in here https://bitbucket.org/pypa/setuptools/src/4bc93ca98bbd08347ad907478bba92647855787d/setuptools/command/easy_install.py?at=default#cl-1812
[19:03:18] <qwcode> dstufft, logged it. maybe I'll PR it later. https://bitbucket.org/pypa/setuptools/issue/355