PMXBOT Log file Viewer

Help | Karma | Search:

#pypa logs for Wednesday the 27th of August, 2014

(Back to #pypa overview) (Back to channel listing) (Animate logs)
[08:45:11] <linovia> Is there a way to force setup's install_required to be installed as "flat" instead of as an egg by default ?
[10:42:47] <ionelmc> 1652221 downloads for distribute last month
[10:42:55] <ionelmc> is the world slow or what
[10:44:33] <ionelmc> linovia: you mean a zip vs dir ?
[10:44:54] <ionelmc> there's the zip_safe flag, not sure if that's honored
[11:21:05] <linovia> ionelmc: this would impact the module itself, not the way it installs the install_required packages, right ?
[11:21:32] <ionelmc> linovia: yes, it means those packages need to have zip_safe=False
[11:21:51] <linovia> which are out of my reach at the moment
[11:22:00] <ionelmc> then again, why are you using install_requires
[11:22:09] <ionelmc> you're asking for trouble
[11:22:13] <linovia> ionelmc: why shouldn't I ?
[11:22:45] <linovia> it's perfectly sensible to pip install a package and this package downloads its dependencies
[11:22:47] <ionelmc> next you're gonna complain why your test collector is collecting the junk that was littered around by the install_requires
[11:23:02] <ionelmc> aaah
[11:23:03] <ionelmc> sorry
[11:23:10] <ionelmc> i thought you meant setup_requires
[11:23:14] <ionelmc> ooops
[11:23:21] <ionelmc> ignore all i said :-P
[11:23:53] <ionelmc> linovia: pip doesn't do egg-style installs
[11:24:00] <ionelmc> what are you using to install?
[11:24:29] <ionelmc> use `pip install .` instead of `python setup.py install`
[11:24:40] <linovia> pip doesn't, but it's setuptools that installs anything under install_required from the setup.py file
[11:25:37] <ionelmc> linovia: and you mean install_requires right?
[11:25:47] <linovia> sorry, yes
[11:26:56] <ionelmc> linovia: what do you mean `it's setuptools that installs `
[11:27:02] <ionelmc> i don't get it
[11:27:37] <linovia> ionelmc: if you pip install main_package, pip will install it and setuptools will deal with the dependencies
[11:28:24] <ionelmc> i'm no pip expert but iirc pip uses egg_info to extract deps
[11:29:14] <ionelmc> linovia: maybe you should show some example pkg and instructions to reproduce
[11:30:33] <linovia> probably
[13:25:25] <linovia> another thing I'd like to have different opinions about. What's the recommended way to declare the version ? Either I can put it in the setup.py and call the packaging in my package's __init__ to retrieve it. Or I can put it in the package's __init__ and import/use it within the setup.py.
[15:48:40] <pf_moore> linovia: see http://python-packaging-user-guide.readthedocs.org/en/latest/tutorial.html#version - basically, just put the version in both places
[15:48:40] <pf_moore> if you must have only a single copy of the version, see http://python-packaging-user-guide.readthedocs.org/en/latest/deployment.html#single-sourcing-the-version
[15:48:40] <pf_moore> (but all of the options there are messy to various degrees)
[16:21:22] <linovia> pf_moore: thanks
[16:47:21] <collinanderson> is there a convention at all for the name of a script which creates and syncs your venv with requirements.txt?
[17:08:18] <collinanderson> is that what python setup.py develop is for?
[17:23:26] <collinanderson> is there an easy way to convert a requirements.txt to command line arguments (i'd like to use -r, but the file is on a different server)
[17:24:19] <dstufft> collinanderson: no, but you can use a URL with -r !
[17:24:30] <collinanderson> interesting
[17:24:42] <collinanderson> though it's all private
[17:24:45] <nanonyme> collinanderson, maybe xargs?
[17:25:11] <collinanderson> currently, using fabric, i have: run('./virtenv/bin/pip install ' + ' '.join(line.strip() for line in open('requirements.txt') if not line.startswith('#')))
[17:25:42] <nanonyme> Oh, heh, the comments :)
[17:26:11] <nanonyme> Btw, might want to make a habit of using context manager there if it's for anything serious
[17:26:22] <nanonyme> Closing file descriptors is a good habit
[17:26:44] <collinanderson> ahh, right good for pypy.... and python3.4?
[17:27:09] <nanonyme> Well, good for not running what your script runs on top of
[17:36:46] <collinanderson> it would be cool if you could `virtualenv myvenv -r requirements.txt`
[17:51:37] <nanonyme> What's wrong with virtualenv myenv && ./myenv/pip install -r requirements.txt?
[18:09:41] <collinanderson> requirements.txt isn't on that server
[18:10:06] <collinanderson> i'm remotely installing packages in a remote virtualenv using a local requirements.txt
[18:10:23] <collinanderson> (via fabric)
[18:39:01] <nanonyme> Well, how would virtualenv myenv -r requirements.txt help there?
[19:25:57] <tomprince> collinanderson: mkvirtualenv from virtualenvwrapper has that option.
[22:00:48] <collinanderson> ha. of course :). interesting