I just noticed a behavior of setuptools which seems very alien to me: If I
checkout the 1.0 branch and issue an "python setup.py bdist_egg", the
resulting egg file is good and contains all files.
If I put the source into another directory (e.g. by using "svn export"),
bdist_egg produces an incomplete egg file. The issue can be reproduced by
using the egg_info command, too which is faster than building the egg. You
will see that SOURCES.txt is only ~10kB afterwards (the good egg has a
SOURCES.txt which is ~20kB big).
Obviously, setuptools gets some information from the svn directories. But how
can I build a complete egg using just the source without svn metadata?
fs
We need to be more explicit in the setup.py file and add data files in
the find_packages or data_files argument to setup()
Florent.
What I usually do, is having a MANIFEST.in with something like this:
global-include *.cfg
recursive-include <mypackage>/static *
recursive-include <mypackage>/templates *.kid
graft doc
prune dist
prune build
global-exclude *.bak
This way, "python setup.py sdist" also works as expected. Maybe we
should include this in the quickstart templates?
Also, we should probably include finddata.py in the quickstart
templates, so you don't need TurboGears installed to run the setup.py of
your application.
Chris
+1000 for that.
> Also, we should probably include finddata.py in the quickstart
> templates, so you don't need TurboGears installed to run the setup.py of
> your application.
Hmmm... I think this is needed only for packagers. You need TG to run, you
need TG to develop. If you are someone that is packaging applications / TG
to be used by other people you don't need it installed.
Maybe this is interesting, but I don't see it being used all that much.
Specially because people package TG, but not apps.
--
Jorge Godoy <jgo...@gmail.com>
It could be interesting for people wanting to deploy TG apps by checking
out the source on the target host and then running "python setup.py
install" or something similar. This would allow to do this without
having TG installed on the target host. It would then be downloaded and
installed by the app's installation.
Granted, this is usually handled better by using eggs, but it would
provide another option.
Chris
Looking at the standard quickstart setup.py file and the
findata.find_package_data implementation, I currently don't see why this
should be happening. Do you use the "include_package_data" option in
your setup.py file? Can you paste it somewhere?
Chris
Ah, sorry, it was me who didn't your mail properly. The setup.py of
TurboGears indeed uses "include_package_date=True", which causes this
behaviour:
http://trac.turbogears.org/browser/branches/1.0/setup.py#L117
For an explanation, see the setuptools docs:
http://peak.telecommunity.com/DevCenter/setuptools#including-data-files
Can you file a ticket? Shoudl probably be for the "Deployment" or
"Installation" component.
Chris
You'll have to bye me one or two beers next time I visit you in Berlin :-)