PMXBOT Log file Viewer

Help | Karma | Search:

#pypa logs for Saturday the 27th of December, 2014

(Back to #pypa overview) (Back to channel listing) (Animate logs)
[00:31:05] <dstufft> apollo13: glyph if there is nothing released with that name I think we'll give it up
[00:31:06] <dstufft> er Alex_Gaynor
[00:31:55] <glyph> dstufft: give it a couple of days with the current registrant I guess
[00:32:11] <glyph> dstufft: most likely they'll be happy to hand it over, they always have been in the past :)
[00:32:36] <dstufft> glyph: I'm not 100% sure on the rules ATM, but http://sourceforge.net/p/pypi/support-requests/ and mention that you contacted the guy and that there are no releases (if the guy doesn't respond)
[16:59:34] <spacether_> Hello, I'm working on posting my first library to pypi
[16:59:52] <spacether_> It includes some requred exes which it calls using subprocess
[17:00:06] <spacether_> But they put my zip file over the upload limit
[17:01:01] <spacether_> Does anyone know how I could create a different file for each operating system, or make an egg with only the exe includes?
[18:58:24] <bewees> hi, how can i install my python package before submitting it to pypy to test if my setup.py actually works?
[19:00:20] <tos9> bewees: pypi -- but you can build an sdist and install that and then run your test suite
[19:00:31] <tos9> bewees: typically something like tox is the way to do that
[19:01:39] <bewees> tos9, good to know thanks. I run sdist already, but wasn't sure how to procede the installation. I run already: "python3 setup.py sdist"
[19:03:36] <tos9> bewees: cd dist, unzip, and then python setup.py install
[19:03:44] <tos9> but tox will handle doing all of that
[19:06:13] <bewees> tos9, Hm, my package/file is not within the tar.gz ball though.. guess my setup.py is faulty: http://dpaste.com/1XGRRT9 It's actually just one file that I want to distribute
[19:08:33] <tos9> bewees: you're calling distutils.core.setup but you're using setuptools things -- that's not your issue but you should just use setuptools.setup if you're going to use setuptools
[19:08:50] <tos9> bewees: probably your issue is that you're using packages when you want pymodules, if you just have a single module and not a package
[19:10:54] <bewees> tos9, Hm, I don't find 'pymodules' on https://packaging.python.org/en/latest/distributing.html , maybe you mean data_files?
[19:14:59] <tos9> bewees: that's pretty amazing... but no it's py_modules
[19:15:00] <tos9> https://docs.python.org/2/distutils/examples.html#pure-python-distribution-by-module
[19:15:31] <bewees> Thank you, I'll give that a try
[19:25:01] <bewees> tos9, Installed fine now, but I think I don't want module, because I want to run it as a tool from shell :)
[19:40:04] <bewees> His setup.py looks pretty sophisticated https://github.com/andreafrancia/trash-cli/blob/master/setup.py but after installing his pip package you can run the program in shell
[20:10:56] <ionelmc> what a terrible setup script
[20:27:53] <bewees> Do you have a better example which I can take as a reference for mine?
[20:29:11] <doismellburning> imho, "as simple as possible, mostly looking like a call to setup and not much else"
[20:37:03] <bewees> Oh, seems to work now. I think I only had to substitute py_modules= with scripts=. It installed the script to /usr/bin/ now
[20:37:38] <bewees> http://sprunge.us/CWRj
[21:04:16] <bewees> I submitted the package to PyPi and I tried to install it with: pip3 install trashcaron==0.1.0 --allow-unverified trashcaron , but I get this error from pip No distributions at all found for trashcaron==0.1.0
[21:05:02] <Alex_Gaynor> It looks like you didn't actually upload the package, you just registered it
[21:05:33] <bewees> Oh, didn't know that, thanks
[21:09:12] <bewees> Worked now fine, even without --allowed-unverified switch. Ty
[21:12:37] <ionelmc> bewees: don't use scripts=
[21:12:48] <ionelmc> it's not portable
[21:12:59] <ionelmc> use the entrypoints
[21:14:23] <ionelmc> eg: https://github.com/ionelmc/python-nameless/blob/master/setup.py#L64
[21:14:50] <ionelmc> imo no one should ever write a setup.py file by hand
[21:15:20] <ionelmc> except, well, few people who make the template
[21:16:59] <ionelmc> bewees: the nice thing with the console_scripts entrypoint is that on windows you gonna get nice .exe wrappers for them
[21:18:59] <bewees> ionelmc, Good to know, thanks. Using __main__ as entry point would then also work with my argparse arguments?
[21:19:34] <bewees> (So I'd just have to add a main function in my script)
[21:19:35] <ionelmc> bewees: __main__ is for when you want to run python -m package_name
[21:20:24] <ionelmc> see any of these
[21:20:29] <ionelmc> # - https://www.python.org/dev/peps/pep-0338/
[21:20:30] <ionelmc> # - https://docs.python.org/2/using/cmdline.html#cmdoption-m
[21:20:30] <ionelmc> # - https://docs.python.org/3/using/cmdline.html#cmdoption-m
[21:21:42] <ionelmc> bewees: imo, unless you wanna learn how it works, you should just use a project template
[21:24:12] <bewees> ionelmc, Do you mean a template such as: https://pypi.python.org/pypi/cookiecutter/0.6.1 ?
[21:24:50] <ionelmc> bewees: sure, but technically that's just the tool to use templates
[21:25:11] <ionelmc> there's a list of them here https://github.com/audreyr/cookiecutter#available-cookiecutters
[21:27:10] <bewees> Thanks, I check them out
[22:21:15] <doismellburning> ionelmc: no, write setup.py scripts by hand, lest you acquire tedious cookiecutter complexity
[22:32:51] <ionelmc> doismellburning: what do you mean by "complexity"?
[22:35:26] <doismellburning> ionelmc: c.f. trash-cli
[22:36:56] <ionelmc> doismellburning: sure, just because it's a cookiecutter template does mean it's any good, but it can be
[22:37:52] <dstufft> ionelmc: I wrote all my setup.py's by hand :D
[22:37:55] <ionelmc> the point it to avoid redoing all the things, and falling into all the pitfalls of getting a setup.py and other packaging things right
[22:38:27] <ionelmc> dstufft: hush, you maintain pip ;-P
[22:40:15] <ionelmc> i do wonder what if we'd have a world where you don't have to write a setup.py for 99% of the cases
[22:40:40] <ionelmc> just have a common file structure and then everything builds and installs from that
[22:41:29] <ionelmc> no fuss about setup.py, MANIFEST.in, package discovery, data files discovery, versioning and other horrible things
[22:42:48] <dstufft> well
[22:42:53] <dstufft> you need some kind of metadata file
[22:43:03] <dstufft> but in the future there will be something better than setup.py
[22:43:08] <ionelmc> d2to1 is a terrible failure in that regard since you *still* have to manually list all the packages and be aware of what's a package and what's a module
[22:44:08] <ionelmc> dstufft: what do you mean "will be" - is there work towards that going?
[22:45:22] <dstufft> once PEP 426 is done and implemented then pip et al will look for a static file before falling back to setup.py. This static file isn't designed to be an end user thing, but it will mean that a new build tool besides setuptools can be created as long as it emits a properly formed package with the new metadata file
[22:45:35] <doismellburning> dstufft: <3
[22:45:52] <doismellburning> bierzeit
[22:50:02] <ionelmc> dstufft: yeah but you'd still have to use setuptools for gnarly stuff like building C exts
[22:50:15] <dstufft> ionelmc: nope
[22:50:26] <ionelmc> dstufft: what do you mean?
[22:51:06] <dstufft> PEP 426 lets you specify what package needs isntalled to build you thing, and what needs executed to build it
[22:51:22] <ionelmc> dstufft: can you point me to the part in the spec?
[22:52:40] <ionelmc> dstufft: there's https://www.python.org/dev/peps/pep-0426/#build-requires but that's doesn't include something for a 'custom builder'
[22:52:50] <ionelmc> unless i'm missing something
[22:53:09] <dstufft> ionelmc: oh sorry, I forgot. We decided that should be it's own PEP
[22:53:18] <dstufft> https://www.python.org/dev/peps/pep-0426/#metabuild-system
[22:54:27] <ionelmc> aaah
[22:54:33] <ionelmc> alright
[22:56:24] <dstufft> long term our goal is to make setuptools just another option for a build tool
[22:56:48] <dstufft> (obviously it will always be a bit special since it'll be the default tool to fall back on in the legacy behavior)