PMXBOT Log file Viewer

Help | Karma | Search:

#pypa logs for Friday the 28th of August, 2015

(Back to #pypa overview) (Back to channel listing) (Animate logs)
[14:18:54] <FancyCamel> Hey guys. If I'm going to download Pip and clicking the link is just opening get-pip.py in my browser then I must be doing something wrong, right? :|
[14:19:13] <tos9> FancyCamel: What version of Python?
[14:19:34] <FancyCamel> Uh, just the native install on my Mac. Python 2.7.5 it appears to be!
[14:21:52] <tos9> OK, you might want to consider not using your system Python for stuff, in which case you'd use homebrew's, in which case you'll get pip installed for you (via ensurepip)
[14:22:13] <tos9> But if you're installing pip yourself to that Python, you want to follow the install instructions
[14:22:58] <tos9> Oh, maybe you're having trouble interpreting the footnote?
[14:23:30] <FancyCamel> Amusingly I was trying to follow the instructions and got stuck at downloading it because it was opening like that and I thought it was wrong. But, I forgot about homebrew. I'll take a looksie into that. I'm not very familiar with installations and all of this stuff. Every time I have to install something new I always mess it up >_>;
[14:23:43] <FancyCamel> And yeah, I believe that's my issue.
[14:23:49] <tos9> Right click on the link and save target as, or use curl -O 'https://bootstrap.pypa.io/get-pip.py' from a terminal
[14:23:57] <tos9> But yeah I think you'll have an easier time with homebrew :)
[14:24:10] <FancyCamel> Do you think I should go the homebrew route? I'm looking to work with MAMP and just work locally with the project I think.
[14:24:20] <tos9> I would recommend it personally, yeah.
[14:24:43] <tos9> Assuming you've got homebrew installed already, it's just `brew install python`, and making sure you have /usr/local/bin first on your shell path
[14:24:53] <FancyCamel> Apparently I also don't have homebrew. I thought I'd installed it back when being interested in node or ruby or something but apparently not.
[14:24:54] <FancyCamel> Eugh.
[14:25:00] <FancyCamel> What a mess.
[14:25:29] <FancyCamel> Hm. I've actually gone to the link before. "homebrew --version" would be what I check, right? >_>;
[14:25:51] <tos9> brew --version
[14:26:03] <FancyCamel> Yeah, I just found that actually. My bad!
[14:27:11] <FancyCamel> So, tos, are you saying Brew will have it's own python version ?
[14:27:58] <tos9> it has a formula for installing Python (2.7.10) yeah.
[14:34:22] <FancyCamel> Okay so, tos9, thank you for your help so far. So I just ran brew update, now I am running brew python. Next is brew ensurepip did you say?
[14:34:33] <tos9> No, brew install python will already run that for you
[14:34:38] <FancyCamel> Oh, I see!
[14:39:06] <FancyCamel> Heh. "Brew install cake". Some coffee and cake would be splendid.
[14:39:21] <FancyCamel> Was just reading the "new packages" after I ran homebrew update ._.;
[14:39:35] <tos9> :)
[14:39:35] <FancyCamel> I'm assuming brew install django is a thing
[14:39:41] <tos9> No, that isn't.
[14:39:44] <tos9> Well, I hope it isn't.
[14:39:51] <FancyCamel> Oh that's awkward.
[14:39:54] <tos9> Historically homebrew didn't package things that package themselves.
[14:39:57] <FancyCamel> So I still pip install it ?
[14:40:04] <tos9> (So python packages, which have their own package manager)
[14:40:05] <tos9> Yes
[14:40:22] <tos9> This unfortunately has been less true these days for reasons I don't understand, but I wouldn't recommend using homebrew to install Python package.s
[14:40:46] <FancyCamel> So how does this work exactly? Because homebrew's purpose is to not mess with my system files.. So does Django really "exist" on my system or is it in some like.. Hidden away homebrew space where only pip is installed too ?
[14:41:00] <FancyCamel> I'm afraid I'm having a hard time wrapping my mind around how I get to work with these tools.
[14:41:13] <tos9> Homebrew installs you a Python to /usr/local/lib, instead of the one you've got in /usr/lib
[14:41:17] <tos9> Otherwise everything's the same
[14:41:37] <tos9> Django gets installed into /usr/local/lib/python2.7/site-packages, just like it would for your System python
[14:42:01] <tos9> just with the latter, you'd need to deal with root permissions or --user, and with not messing with your system install, and with older Python that doesn't do TLS verification
[14:42:54] <FancyCamel> My installs were apparently going to /usr/local/Cellar, haha.
[14:43:13] <tos9> Yeah, so actually they go there, and then get symlinked
[14:43:21] <tos9> but once that happens, it's transparent to you.
[14:43:56] <FancyCamel> So confusing heh. Luckily typing pip install django isn't confusing, haha.
[14:44:39] <FancyCamel> Are virtualenv's required ? I've got two guides open. One being the official Django install guide and the other being a user who went to use Django with MAMP for local work.
[14:44:55] <FancyCamel> The latter is saying to get virtualenv and then the official guide is just saying it's optional.
[14:47:21] <tos9> They're not required certainly, they might be recommended though.
[14:47:46] <tos9> I'd recommend it if you have the brainpower after all that, but if not, you won't miss out much most likely.
[14:50:34] <FancyCamel> Hm, in doing my pip installs it notified me there is a newer version of pip available and that I should upgrade it using 'pip install --upgrade pip'.
[14:50:43] <FancyCamel> Is this how I should upgrade it? Or should I do it using a brew command?
[14:50:48] <tos9> nope, you can do that
[14:52:05] <FancyCamel> Alrighty. Just didn't know if I should 'brew upgrade pip'. But, done!
[14:53:04] <FancyCamel> I hate when guides don't go as planned.
[14:53:33] <FancyCamel> I just did pip install mysql-python and then it tells me to start up python and go 'import MySQLdb'. But all that does is give me an error haha.
[14:53:43] <FancyCamel> Apparently there is no module named that.
[14:57:04] <FancyCamel> I also noticed that when I typed "python" it entered my systems default 2.7.5 environment it seems.
[14:57:36] <FancyCamel> As opposed to the 2.7.10 I just brew installed
[15:07:03] <tos9> yeah
[15:07:08] <tos9> so that's what I meant about path stuff
[15:07:12] <tos9> what's echo $PATH
[15:07:19] <tos9> you need /usr/local/bin before /usr/bin
[15:08:14] <FancyCamel> Tells me it's invalid syntax, lol. Eugh.
[15:08:21] <FancyCamel> I feel like a huge pain. I'm sorry.
[15:09:09] <tos9> in a shell
[15:09:10] <tos9> not python
[15:10:05] <FancyCamel> Holy
[15:10:18] <FancyCamel> ./usr/local/mysql/bin/:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/local/git/bin
[15:10:23] <FancyCamel> Period to be able to link it.
[15:10:29] <FancyCamel> That's ridiculous and probably is a problem.
[15:11:43] <tos9> so yeah, add /usr/local/bin to the beginning of that in your shell's rc
[15:12:27] <FancyCamel> I'm not sure how to do that. I'll try to google it.
[15:12:35] <FancyCamel> My terminal knowledge is rather limited, unfortunately.
[15:15:11] <tos9> add PATH=/usr/local/bin:$PATH and export PATH to your ~/.bashrc
[15:15:16] <tos9> assuming you're using bash
[15:15:26] <tos9> or ~/.bash_profile more likely
[15:15:28] <FancyCamel> I'm just using the standard Mac Terminal.
[15:15:38] <FancyCamel> I found this here http://superuser.com/questions/324616/how-should-i-set-the-path-variable-on-my-mac-so-the-hombrew-installed-tools-are
[15:15:54] <FancyCamel> And the top answer seems perfect. And I can see all of my paths properly, but I can't figure out how to edit it haha.
[15:15:58] <tos9> shell, not terminal
[15:16:00] <FancyCamel> Backspacing does nothing. :P
[15:16:06] <FancyCamel> Oh ?
[15:16:11] <tos9> that first answer is terrible and wrong :)
[15:16:13] <tos9> as SO often is
[15:16:28] <FancyCamel> I thought the Shell and Terminal were one in the same. How awkward..
[15:16:36] <tos9> no, your Terminal is Terminal.app
[15:16:40] <tos9> Your shell is probably bash
[15:16:41] <tos9> which is the default
[15:18:22] <FancyCamel> So this link that's telling me that Mac calls the shell Terminal is wrong? ._. I'm not sure how to find the shell if that's not the case.
[15:19:03] <FancyCamel> Oh wait I may have found something.
[15:19:36] <FancyCamel> Just kidding, nope.
[15:19:50] <tos9> your shell is almost certainly bash unless you've changed it
[15:20:04] <tos9> so just open an editor and edit ~/.bash_profile, and add
[15:20:10] <tos9> those two lines from above
[15:21:25] <mgedmin> shell is the program that runs inside the terminal
[15:21:57] <mgedmin> when used in phrases like "I do it in the shell/terminal", they're interchangeable
[15:22:26] <mgedmin> when you need to fiddle with settings, then it may be important to be precise
[15:22:41] <FancyCamel> Thanks mgedmin. I thought I was having to find a new program or something at first.
[15:23:00] <FancyCamel> Anywho, found this link http://hathaway.cc/post/69201163472/how-to-edit-your-path-environment-variables-on-mac .. Did the touch and open and the file appears blank. How awkward, haha.
[15:24:01] <FancyCamel> Could that be normal if I've never really customized my terminal before?
[15:26:07] <willingc> FancyCamel: tos9 is giving you some excellent guidance
[15:27:00] <FancyCamel> Oh I don't doubt that at all, willingc . I very much appreciate it too. The reason I google about it additionally is because I don't fully understand it and I feel kind of like a nuisance asking so many questions.
[15:27:05] <FancyCamel> ._.;
[15:27:17] <mgedmin> I don't know if macs have a ~/.bashrc by default
[15:27:20] <mgedmin> I don't have a mac
[15:27:23] <mgedmin> it's not impossible
[15:27:29] <doismellburning> iirc they don't
[15:27:40] <doismellburning> I had to do some poking on mine
[15:28:35] <willingc> FancyCamel: I understand. Perhaps follow their advice now and google later :)
[15:29:24] <FancyCamel> Well, willingc, for starters I didn't even know how to edit the file. I tried typing edit ~/.bash_profile and got told the edit command doesn't exist so I had to look it up haha.
[15:32:44] <willingc> FancyCamel: yeah there are some differences to the mac but mostly similar to linux. The maintainer of Pelican has two excellent Mac configuration resources: http://hackercodex.com/guide/mac-osx-mavericks-10.9-configuration/ and http://hackercodex.com/guide/python-development-environment-on-mac-osx/
[15:35:32] <willingc> FancyCamel: Instead of 'edit' you may use 'nano' or 'vim'. 'nano' is simpler for those new to the command line.
[15:36:33] <FancyCamel> I believe I did it. /usr/local/bin:/usr/local/mysql/bin/:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/usr/local/git/bin
[15:36:57] <FancyCamel> ./usr/local/bin right at the start? :D
[15:38:05] <FancyCamel> And it starts up with 2.7.10. Thank you so much for the help everyone. Especially you, tos9. I do apologize if I've been a bit of a headache. :)
[15:38:36] <willingc> FancyCamel: I'm glad you got it working.
[15:39:35] <FancyCamel> I'm intrigued by Django. The only preconceived notion I have of it is that it's a Python MVC. But, my work uses it when they work on apps so I need to learn it haha.
[15:40:09] <FancyCamel> And thanks :)
[15:50:27] <tos9> FancyCamel: soryr, I stepped into meetings :)
[15:50:30] <tos9> and np
[15:51:33] <FancyCamel> Yeah you should probably apologize for holding up on your free guidance. ;) Heh. Not a problem. :)
[16:13:40] <FancyCamel> (Personal victory: Got my first Django app set up and it's using MAMP properly too. Woo!)
[16:13:53] <FancyCamel> I know this isn't #django but y'all helped me get here so I just wanted to share, haha.
[17:50:17] <ysionneau> Hi!
[17:51:54] <ysionneau> I'm having trouble understanding why when doing python setup.py develop --user on some project (artiq) which has a second project (llvmlite_artiq) as a dependency. It downloads fine the llvmlite_artiq dependency and runs setup.py bdist_egg on it, but it does not build the extensions
[17:52:13] <ysionneau> but if I run directly setup.py develop in llvmlite_artiq, it does build the extension
[17:52:28] <ysionneau> here is the setup.py of llvmlite_artiq: https://github.com/m-labs/llvmlite/blob/artiq/setup.py
[17:56:36] <ysionneau> I'm a bit lost
[17:56:57] <ysionneau> Should I subclass the bdist_egg cmdclass to run build_ext?
[18:06:01] <ysionneau> humm seems to work if I subclass bdist_egg and call self.call_command('build_ext') from run()
[18:06:23] <ysionneau> am I doing crappy stuff that could be done more cleanly?
[18:10:15] <ysionneau> not sure if I'm clear enough, but here is the diff of what I just did: http://pastebin.com/RurdpcAd and it seems to do what I need
[18:10:23] <ysionneau> is there a cleaner way of doing that?
[21:18:59] <EWDurbin> hrm
[21:19:02] <EWDurbin> so i have an sdist
[21:19:10] <EWDurbin> that totally includes some flask templates in it
[21:19:16] <EWDurbin> but when i wheel it they are left behind :(
[21:23:45] <dstufft> EWDurbin: sounds like you don't have a package_data
[21:23:55] <EWDurbin> MANIFEST.in isn't enough anymore?
[21:24:22] <dstufft> MANIFEST.in was never enough
[21:24:30] <ionelmc> EWDurbin: never was, use include_package_data=True if you already have a manifest
[21:24:36] <dstufft> MANIFEST.in controls what gets put into the sdist, package_data controls what gets installed
[21:24:39] <EWDurbin> ah
[21:24:42] <dstufft> wheels are only the items that get installed
[21:24:43] <EWDurbin> whelp
[21:24:44] <EWDurbin> thanks
[21:24:55] <ionelmc> but avoid package_data, just use include_package_data
[21:25:13] <ionelmc> package_data just makes more room for mistakes
[21:25:23] <EWDurbin> yeah, keeping my MANIFEST.in
[21:25:26] <EWDurbin> thanks dstufft
[21:25:30] <EWDurbin> that worked
[21:26:21] <EWDurbin> just goes to show, i *really* shouldn't be building apps with UIs
[21:26:29] <EWDurbin> take me back to pure python module land