PMXBOT Log file Viewer

Help | Karma | Search:

#pypa logs for Wednesday the 19th of August, 2015

(Back to #pypa overview) (Back to channel listing) (Animate logs)
[00:19:47] <preyalone> could we make Author/Owner clickable hyperlinks to user pages, to make it easier to search for / list packages by author?
[00:20:45] <preyalone> other repos like CPAN and RubyGems do this
[02:03:39] <marbar> hello python people!
[02:03:41] <marbar> how's it going?
[02:04:11] <marbar> is anyone here?
[02:04:32] <marbar> i have a question about .pypirc configuration (https://docs.python.org/3/distutils/packageindex.html#pypirc)
[02:04:51] <marbar> the format specified on that official python website doesn't seem to be working for me
[02:04:58] <marbar> i have a .pypirc in my home directory
[02:05:06] <marbar> i've tried this format and half a dozen others from around the internet
[02:05:33] <marbar> and "python setup.py sdist upload" still gives me "You must be identified to edit package information"
[02:05:36] <marbar> this is wrong, right?
[02:42:36] <marbar> is anyone here?
[12:17:15] <frankier> Does anyone know how in a setup.py I'd require django-formtools if Django>=1.8, otherwise not require it?
[12:17:37] <frankier> Does setuptools allow for these type of requirements? Or is there another way I can deal with this issue?
[12:20:58] <mgedmin> you can't express such a dependency
[12:21:10] <mgedmin> will anything break if django-formtools is installed with django < 1.8?
[12:21:19] <ronny> frankier: no, thats not yet possible, its questionable if it would be supported anytime soon
[12:21:21] <mgedmin> you could conditionally not-import it or something
[12:22:52] <frankier> mgedmin, The problem is then Django < 1.7 can't be supported since formtools requires a newer version in its setup.py. I think I can work around it by shelling out, or just drop compatibility with older versions. Good to know there's not a better way.
[12:23:02] <mgedmin> ah
[12:23:03] <frankier> Ta
[13:03:47] <pjdelport> frankier: The most pragmatic solution if you're developing a library is probably to just document it.
[13:04:15] <pjdelport> Leave it up to leave packages to depend on the appropriate version of Django, and pull in django-formtools based on that.
[13:04:22] <pjdelport> leaf packages, even
[13:09:46] <frankier> pjdelport, Actually, it involves the test suite really, since it's just to test interoperability, but you saying that makes me realise I can just put it in tox.ini/the docs. Way less hassle about than importing pip and messing with importlib.
[13:10:01] <frankier> Cheers
[13:10:16] <pjdelport> Ah, yes, that's definitely the kind of thing that belongs in tox.ini, for the relevant env definitions.
[15:57:33] <evanton> eww, nobody in #python told me about this channel
[15:57:55] <evanton> trying to setup nosetests setuptools command in a virtualenv. this is my setup.ini: https://dpaste.de/q09Q nose is installed in the virtualenv, 'nosetests' works, but 'python setup.py nosetests' says invalid command. what am I missing?
[16:17:58] <ronny> evanton: did you add a setup command class for nosetest?
[16:18:15] <ronny> evanton: also note, that for nose one usually uses a colector class plus setup.py test
[16:18:40] <ronny> personally i discourage people from nose (note that im a py.test contributor)
[16:18:45] <evanton> ronny: what do you mean by "setup command class"? I am not familiar, just been following the nose docs
[16:19:00] <evanton> well, I have heard good things about py.test, I've tried it, but I like nose more
[16:19:29] <ronny> evanton: to have a setup.py command you need to register it in some way
[16:19:41] <ronny> evanton: there is no default/builtin nosetest command
[16:20:07] <evanton> ronny: I am following https://nose.readthedocs.org/en/latest/api/commands.html
[16:20:08] <ronny> evanton: at least not without a setup_requires
[16:20:37] <evanton> it suggests having a [nosetests] section in setup.ini, which I did, as the pastebin link in my question shows
[16:20:57] <ronny> evanton: do you run setup.py with the system python or the virtualenv python?
[16:21:16] <ronny> evanton: also what version of nose did you install
[16:21:24] <ronny> and bbl, catching a bus
[16:21:28] <evanton> ronny: inside the virtualenv, I do 'python setup.py nosetests'
[16:21:37] <evanton> isn't that supposed to run the virtualenv python?
[16:22:19] <evanton> also, I have nose-1.3.4
[16:22:20] <Wooble> evanton: you can check with "which python"
[16:22:38] <evanton> Wooble: thanks, it's the virtualenv python
[16:24:48] <Wooble> evanton: does python -m nose.core do anything?
[16:25:57] <Wooble> evanton: also, do you really have a setup.ini instead of setup.cfg?
[16:27:36] <evanton> Wooble: my apologies. nose docs say setup.cfg, I have a setup.cfg. what I said above about setup.ini was a typo. this whole thing has got me dizzy, sorry
[16:28:10] <evanton> Wooble: python -m nose.core runs the tests, as well as nosetests
[16:29:39] <Wooble> evanton: what version of setuptools do you have?
[16:30:44] <evanton> if I do pip list inside the virtualenv, it tells me setuptools 18.0.1
[16:31:11] <Wooble> Huh. Well... I'm out of suggestions :(
[16:31:34] <evanton> virtualenv itself is 13.1.0
[16:31:41] <evanton> :(
[16:31:59] <evanton> I found this https://stackoverflow.com/questions/14969173/why-do-i-get-the-error-invalid-command-nosetests-when-i-run-nosetests-from-my
[16:32:02] <Wooble> Your setup.py is actually using setuptools and not distutils, right?
[16:32:06] <evanton> and the answers there just scared me
[16:33:11] <evanton> Wooble: I have "from distutils.core import setup" there, so I assume the answer is "no"?
[16:33:47] <Wooble> evanton: that would do it.
[16:34:08] <Wooble> if you want setuptools, you need to import setup from setuptools instead...
[16:34:34] <evanton> Wooble: IIRC I used the python docs to teach myself how to write setup.py, can you suggest me a link to read more about using setuptools?
[16:34:56] <Wooble> http://pythonhosted.org/setuptools/
[16:35:00] <evanton> aha
[16:35:28] <evanton> thanks for your patience, I'll read that, then try to switch to setup from setuptools and will be back if it still won't work
[16:42:21] <evanton> Wooble: my tests are running now, thank you!
[16:44:04] <Wooble> no problem. Sorry I didn't suggest that first (seemed too obvious :) )
[16:45:37] <evanton> and I had absolutely no reasons to suspect that was the problem, before I only used setup from distutils and it used to build tarballs just fine. I never ran tests with it and never used a virtualenv
[16:45:56] <evanton> but now I will!
[17:35:22] <evanton> setuptools question: I have a setup_requires line in setup.py, it tries to fetch requirements from pypi. how do I tell it to not go to pypi at all, but instead fetch stuff from a custom location that I provide?
[17:40:14] <pjdelport> evanton: Give "pip install" a different --index-url, or use a combination of --no-index and --find-links
[17:41:09] <pjdelport> If you really want to put it in your setup.py, you can do roughly the same thing as --find-links with dependency_links and --process-dependency-links
[17:41:13] <pjdelport> But that's kinda deprecated
[17:41:40] <evanton> pjdelport: here is a bit more context. all this happens inside a virtualenv. I have a pip.conf there that looks like https://dpaste.de/BefW
[17:41:54] <evanton> when I invoke pip directly - it goes to this custom location for stuff
[17:42:17] <evanton> yet when setup_requires gets processed - it still goes to pypi
[17:42:56] <pjdelport> Ah, yes, that happens at the setuptools level, before pip and virtualenv really.
[17:43:04] <evanton> hence my problem
[17:43:10] <pjdelport> (Because setuptools in general can't depend on them.)
[17:43:30] <evanton> well, I don't know the internals, I've just started to use this voodoo
[17:43:40] <pjdelport> The easiest way to deal with that in my experience is to manually pre-install the setup_requires dependencies into the virtualenv first, with pip.
[17:43:49] <pjdelport> Then setuptools will just use it.
[17:44:02] <evanton> sure, I can try that
[17:44:43] <pjdelport> Assuming you have a small and static set of setup_requires, that should remain pretty manageable.
[17:59:07] <evanton> pjdelport: bah, pip install coverage still works, even if I don't have it in my local pypi repo. how do I tell pip to not fall back to pypi at all? isn't having just a custom global index_url in pip.conf enough?
[17:59:31] <pjdelport> evanton: --no-index
[18:00:03] <pjdelport> Hmm
[18:00:32] <pjdelport> Maybe that index_url actually needs to specifically be in an [install] section, rather than [global]
[18:00:45] <evanton> pjdelport: but I have an index, it's just a custom one
[18:00:59] <evanton> let me try moving it to [install] section as well
[18:02:21] <evanton> moving it to [install] section did not help
[18:03:14] <evanton> if I add no-index = 1 to pip.conf, it doesn't even go to my custom index at all
[18:06:36] <pjdelport> Hmm, perhaps paste the output of pip install -v?
[18:07:45] <evanton> pjdelport: for which setup? my original one with custom index_url in [global] and without no-index?
[18:08:04] <pjdelport> Just with the custom index_url
[18:08:16] <pjdelport> Oh, wait, this may be silly, but maybe try "index-url" instead?
[18:09:26] <evanton> pjdelport: index_url works just fine
[18:09:31] <evanton> it goes to my custom location
[18:09:46] <pjdelport> Right, but perhaps it affects the override of the default.
[18:09:49] <evanton> I just don't want it to fall back to pypi when it doesn't find stuff in my local repo
[18:09:58] <evanton> won't hurt if I try I guess
[18:12:08] <evanton> pjdelport: oh, I think I found the problem, it's my local pypiserver instance that is doing the fallback. I see it has an explicit command line option to disable it
[18:12:20] <pjdelport> Oh, okay.
[18:12:24] <pjdelport> Cool :)
[18:15:10] <evanton> pjdelport: yes, that was it. running pypi-server with --disable-fallback works properly