On Wed, Feb 5, 2014 at 9:10 PM, Daniel Holth <[email protected]> wrote: > You are probably just missing the package_dir argument to setup(), > adequately documented at > http://docs.python.org/2/distutils/examples.html > > Pass > > package_dir={'': 'src'}, > > to indicate that the root module starts in 'src'. > > MANIFEST.in is needed. It is always a bit awkward to write.
I tried this and it did not work. It keeps missing the python files. The only way it worked and created the expected wheel ( at least the python files are there from the package and the universal=1 resulted in correct tag) was when the package dir was directly in the root. I also noticed another problem that in manifest include . *.py doesn't work, neither does the include * So my __main__.py now located in the root doesn't get inside the wheel. So you said PEX is worth checking, huh?...;) Thanks, Eugene > > On Wed, Feb 5, 2014 at 6:41 PM, Evgeny Sazhin <[email protected]> wrote: >> On Wed, Feb 5, 2014 at 6:01 PM, Paul Moore <[email protected]> wrote: >>> On 5 February 2014 22:20, Evgeny Sazhin <[email protected]> wrote: >>>> 1. No python files added, neither __main__.py nor prog.py make it to >>>> the wheel, so includes are not working >>> >>> The manifest is for sdists, not wheels. So includes won't "work" in >>> the sense that you seem to be expecting. You need to specify your >>> package details in setup.py - you don't say if you did. I suspect >>> you're not getting a universal wheel because it looks like it isn't >>> pure Python - maybe because it doesn't have the right files in it, I >>> can't tell from what you're showing. >> >> I got rid of the wheel folder as the machinery behind the wheel >> building (or between keyboard and chair) is not smart enough to >> understand how to work with packages that are one level down from the >> root. >> >> my setup.py is : >> >> setup( >> name="prog", >> version="0.1", >> #etc, >> packages=find_packages() >> >> ) >> >> I got the wheel properly built using python setup.py bdist_wheel (i >> was able to do it before, but didn't realize the manifest stuff is for >> that way of building, not for the pip wheel). So "pip wheel" usage >> remains to be unclear... >> >>> >>> You still seem to be making wheels with the intention that they are >>> executable. I apologise if I'm reading too much into your directory >>> structure, but if that's what you are trying to do I can well imagine >>> that you'll get odd results as you're trying to do something the >>> system wasn't designed for. >>> >>> Paul >> >> Yes, not only i'm making wheel executable, but i also will most >> probably build around the fact that it is zip-readable and therefore I >> will add them to the PYTHONPATH to run, just like java classpath and >> jar (I know - stubborn me) - that's the only thing that makes any >> sense! After all those arguments about C extensions and whatnot i >> still think that enforcing the unzipping and deploying stuff is not >> what packaging should provide as a solution. >> Plus as you see I'm trying to build universal wheel - pure python. >> Nobody so far could prove or at least explain why it is bad idea *for >> pure python*, so I think this is the way to go. >> >> >> Thanks, >> Eugene >> _______________________________________________ >> Distutils-SIG maillist - [email protected] >> https://mail.python.org/mailman/listinfo/distutils-sig _______________________________________________ Distutils-SIG maillist - [email protected] https://mail.python.org/mailman/listinfo/distutils-sig
