[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?
[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: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: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: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: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: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: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: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: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: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: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: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
[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: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?
[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