PMXBOT Log file Viewer

Help | Karma | Search:

#pypa logs for Thursday the 19th of February, 2015

(Back to #pypa overview) (Back to channel listing) (Animate logs)
[00:00:17] <ronny> but there usually is only one main app, and the version of that one goes to the virtualenv name
[00:59:11] <[Tritium]> IIRC, you can point pip at a tag/branch/checkout of a repo...
[00:59:46] <_habnabit> you can
[01:01:14] <[Tritium]> welp, i should have been here an hour ago, cause that would have been a factual counterpoint in that discussion
[01:08:19] <_habnabit> haha
[01:08:25] <_habnabit> i'm kind of done talking to that guy
[07:05:55] <ronny> moin
[07:06:41] <ronny> [Tritium]: he wants it in setup.py, which is kind of fail and shuldnt be fixed as well
[13:16:36] <SamuelMarks> hi
[13:18:01] <SamuelMarks> What's wrong with—e.g.: my setup.py—that prevents me from importing from this file? - https://github.com/bettertutors/sql-models/blob/master/bettertutors_sql_models/User.py
[13:20:18] <apollo13> SamuelMarks: what makes you think your setup.py is at fault?
[13:20:25] <apollo13> also what is the traceback
[13:20:52] <SamuelMarks> apollo13: "User" doesn't appear in dir(bettertutors_sql_models)
[13:21:37] <apollo13> but does from bettertutors_sql_models import User work?
[13:21:46] <apollo13> I don't see any reason why it should be in dir
[13:21:56] <apollo13> you are not importing it in __init__ after all
[14:08:39] <SamuelMarks> apollo13: `package_dir` ended up being the issue
[14:36:11] <ionelmc> SamuelMarks: unless you want to learn packaging you'd be better off using a package template
[14:36:20] <ionelmc> err, project template
[14:47:37] <SamuelMarks> ionelmc: I wrote my own package generator last weekend
[14:47:49] <SamuelMarks> So yeah, I do want to learn
[17:02:32] <nedbat> are there organizational logins to PyPI? edX has a number of repos, and we should start putting them up on PyPI, but we're wondering who to use as "author", etc.
[17:04:36] <dstufft> nedbat: author is just a string, so you can put whatever you want
[17:04:52] <dstufft> we do not have organization support, it's on a TODO list but not super high priority
[17:07:28] <ronny> sup
[17:07:33] <ronny> hmm
[17:08:08] <ronny> im wondering if it ould be ok to pester jaraco abit about putting his comments wrt setuptools_scm into issues
[17:08:19] <nedbat> dstufft: I guess that means we should make a new account and share the password.
[17:08:42] <dstufft> nedbat: that's one way, or you can add multiple users as maintainers/owners
[17:08:58] <nedbat> dstufft: yeah, that's probably better.
[17:11:18] <ionelmc> nedbat: doesn't openstack have a thing for that
[17:11:32] <ionelmc> some of their packages are published by a `openstackci` user
[17:11:36] <ionelmc> or something like that
[17:11:40] <dstufft> openstack has release automation
[17:11:47] <dstufft> their ACLs are controlled on their git repos
[17:12:00] <dstufft> releasing a openstack package is ``git tag -s 1.0.0``
[17:12:06] <dstufft> well and git push
[17:12:12] <doismellburning> yeah that's what we do at laterpay - there's an LP account that owns *, but we give individuals PyPI access for day-to-day use
[17:12:28] <doismellburning> er, by "that" I mean "have a shared account + multiple users"
[17:12:29] <dstufft> when it detects a new tag it builds the package and uploads it with the openstackci user
[17:13:19] <nedbat> doismellburning: what does LP mean?
[17:13:23] <nedbat> oh, laterpay
[17:16:43] <dstufft> having a edX account that only 2 or 3 people have access to is useful in it's own right, makes it easy to recover a project if the other names attached to it quit and aren't available, and on warehouse there are user pages so it makes it easy to see all the edX stuff in one place
[17:16:56] <dstufft> https://warehouse.python.org/user/dstufft/
[17:32:24] <mitsuhiko> dstufft: i always get the channel wrong!
[17:32:31] <mitsuhiko> dstufft: so the difference is for tooling
[17:32:53] <mitsuhiko> right now when i do something in python the way i approach things is that I either deal with a requirement name or the path to a folder containing a setup.py file, right?
[17:32:57] <mitsuhiko> (or a url or something)
[17:33:07] <mitsuhiko> but the end result is basically that there is a setup.py file which i work with
[17:33:17] <mitsuhiko> now obviously that file is already quite annoying because you can't really parse it
[17:33:25] <mitsuhiko> but you can kinda run it and pass parameters, so it's a start
[17:33:38] <mitsuhiko> the problem is though, that this only tells me about the references to package names
[17:34:01] <mitsuhiko> in cargo i have a toml file which defines my package dependencies (similar to the way setup.py works), so that part is the same
[17:34:16] <mitsuhiko> but unlike python, the local dependencies or something of that sort, can be defined in a config file i can discover automatically
[17:34:32] <mitsuhiko> so any tool that i write can (even if a package has not been installed yet) figure out where it might come from
[17:35:18] <mitsuhiko> (you just look for a .cargo folder and you can go off and roll with it)
[17:35:37] <mitsuhiko> in python while there can be requirement files, they are only short lived for an installation process
[17:35:45] <mitsuhiko> they might not even exist, someone could just install stuff in other ways
[17:36:05] <mitsuhiko> you cannot have the base requirement in setup.py either (by name) unless you remember to run the requirement install to a local path first
[17:36:08] <mitsuhiko> which in cargo i can do
[17:36:25] <mitsuhiko> i just name my depenency (which does not exist on crates.io) in my toml file and set up a local dependency in my .cargo config
[17:36:28] <mitsuhiko> and it will work
[17:36:37] <mitsuhiko> anyways. that's the difference in my mind
[17:37:09] <dstufft> so there's no real reason we couldn't support named mappings in the pip config other than we haven't done it
[17:37:39] <mitsuhiko> dstufft: the reason it comes up for me is because people have local dependencies which are not in setup.py
[17:37:44] <mitsuhiko> but only in requirement files
[17:37:53] <mitsuhiko> which i think is a problem
[17:38:52] <dstufft> well people are generally confuseda bout the difference between requirements.txt and setup.py :/
[17:39:16] <jessamynsmith> dstufft: I was about to link an article about that, and I think it's probably you? https://caremad.io/2013/07/setup-vs-requirement/
[17:39:19] <jessamynsmith> that helped me
[17:40:32] <dstufft> but yea, people do sometimes put things only in requirements.txt and not in setup.py, but it's a bit different right? cargo gets to define the entrypoint, it can ensure that you only see the stuff you've defined in your Cargo.toml file and nothing else
[17:40:38] <dstufft> for us the entry point is generally ``python``
[17:40:55] <dstufft> so we don't have any real good way to enforce that you only get to see the stuff you've defined
[17:41:18] <dstufft> so at the end of the day there's always going to be the case where someone depends on something they didn't put into the cannonical place for dependencies (setup.py)
[17:42:00] <mitsuhiko> dstufft: i'm not surprised users get confused "pip install --editable ." cannot work
[17:42:03] <mitsuhiko> (with local dependencies)
[17:42:17] <mitsuhiko> that requires some separate knowledge about how to discover local deps
[17:43:13] <[Tritium]> Ok, really considering creating the package 'dontsudopip' which has os.unlink('/') in its setup.py
[17:43:49] <[Tritium]> or at least a warning that I could have done that
[17:43:49] <mitsuhiko> [Tritium]: don't do it. that just opens up a can of worms
[17:44:04] <mitsuhiko> the sudo is not the problem anyways
[17:44:13] <dstufft> [Tritium]: only if you also create the package "dontpipinstalluser" which has adds a fake sudo binary on the user's path which runs os.unlike("/") the next time you try to sudo
[17:44:52] <mitsuhiko> wheels make me able to sleep at night
[17:44:55] <[Tritium]> tuche
[17:44:56] <mitsuhiko> no more code execution on my servers
[17:45:24] <mitsuhiko> ideally there were package signatures, but that's impossible to get right
[17:46:01] <dstufft> mitsuhiko: I do agree that the way all of this works is super confusing right now, I have some plans for untangling it, and I think we'll be able to get a similar workflow to what you're doing in cargo, with the caveat that since we don't control the entry point (ala cargo build) we can't enforce that people don't require you to install something in a non standard or wierd way
[17:46:42] <mitsuhiko> yeah, i think for that you would need closer cooperation with virtualenv
[17:46:57] <[Tritium]> ok, different topic, what is the binary wheel situation on osx? I dont have a mac, but i heard that its... problamatic
[17:47:00] <mitsuhiko> i'm looking more into pex at the moment. that seems like potentially the right way forward
[17:47:08] <mitsuhiko> [Tritium]: it's only a problem on linux
[17:47:13] <mitsuhiko> at least in theory
[17:47:35] <[Tritium]> well, there is the system vs. python.org python and sdk versions... im confused on that
[17:47:35] <dstufft> mitsuhiko: so I'm talking to a number of people about enabling a standard supported way to get a go-lang style "static" build of a python tool
[17:48:00] <mitsuhiko> dstufft: what pex does?
[17:48:05] <mitsuhiko> or something that goes further
[17:48:27] <dstufft> [Tritium]: it should generally work if it finds a wheel it thinks will work, other than if you link something non standard that we can't protect against unless you static link it in the wheel
[17:48:33] <mitsuhiko> dstufft: the only thing that blocks pex to become more popular is that we still have no reasonable way to reference resources that are not on the filesystem
[17:48:53] <mitsuhiko> (and that it's buggy and badly documented)
[17:49:13] <mitsuhiko> but whatever a real compiled binary would affect, pex also affects (wrt to resources and similar things0
[17:49:17] <dstufft> mitsuhiko: further, ideally I want it to be pex + the python interpreter in one file and even more ideally limited need to unzip stuff (but that requires a culture change)
[17:49:32] <dstufft> but yes, step 1 is to make it so pex works really well and has all the tooling it needs around that
[17:49:33] <mitsuhiko> dstufft: it really only interests me if that lands in 2.x though
[17:49:35] <mitsuhiko> :)
[17:49:56] <dstufft> mitsuhiko: I got pip to 2.x, who knows what else we can get
[17:49:57] <dstufft> :D
[17:50:24] <mitsuhiko> dstufft: i'm going to talk to the pex guy on the weekend (fingers crossed)
[17:50:37] <mitsuhiko> maybe i can kill platter if i get pex working good enough
[17:50:51] <mitsuhiko> but it's quite a grown mess :(
[17:51:08] <dstufft> mitsuhiko: I have an import-sig thread that I need go poke again about getting the pkg_resource like APIs added to the stdlib for manipulating resources. If you have a better idea for what the API would look like I'd be glad to see it
[17:51:23] <ionelmc> what's wrong with pex?
[17:51:37] <dstufft> https://bpaste.net/show/0c490aa07c07
[17:51:41] <mitsuhiko> dstufft: pkg_resource is so bad for actually getting file streams. that needs a better api
[17:52:01] <mitsuhiko> but yeah, that works better
[17:53:00] <mitsuhiko> anyways. i ned to head out now
[17:53:03] <mitsuhiko> see you around
[17:53:06] <dstufft> mitsuhiko: see ya!
[19:38:22] <willingc> dstufft and mitsuhiko: nice collaboration above.
[19:39:14] <willingc> dstufft: I've been using pyenv for the past month and it's been working out well for various versions of python and anaconda for teaching purposes :)
[19:41:22] <dstufft> willingc: I <3 pyenv
[19:41:52] <dstufft> I sometimes think about making something similar that works on windows too and uses precompiled binaries instead of compiling at install time
[19:42:23] <willingc> maybe suggest it as an issue and hope others will run with it :)
[19:43:31] <willingc> dstufft: what other favorites beyond pyenv do you have that make things easier for users?
[19:44:10] <dstufft> Hmm
[19:44:36] <willingc> Especially installation or environments.
[19:44:56] <dstufft> I use the hell out of virtualenvwrapper, especially mktmpenv
[19:45:24] <willingc> OK then that's the tip of the day. Thanks
[19:45:37] <dstufft> mktmpenv is great for "I just want to install and try this thing out but I don't want it to infect anything else"
[19:46:47] <willingc> I just was looking at the docs. I agree :)
[19:47:49] <willingc> tmpnb is a current favorite too :)
[19:52:56] <jessamynsmith> <3 virtualenvwrapper
[19:53:35] <jessamynsmith> I was so thrilled to discover I could update a package in every virtualenv
[19:53:42] <jessamynsmith> hooray for new pip everywhere all at once
[19:53:54] <ofcourseistilllo> oh that's cool
[19:54:21] <jessamynsmith> allvirtualenv
[21:04:52] <dstufft> TIL about allvirtualenv
[21:25:50] <willingc> jessamynsmith: wow didn't know about allvirtualenv. Thanks.
[21:26:02] <jessamynsmith> :)
[21:35:15] <deuxpi> Hi! I'm trying to write a functional test for a setuptools extension using a subprocess; does anybody have an idea how I can 'setup_requires' my top-level package?
[21:35:52] <deuxpi> (In particular https://github.com/nose-devs/nose/pull/880)
[21:49:52] <deuxpi> Oh looks like playing with PYTHONPATH may encourage pkg_resources to use my module