Jeff Marshall wrote:
> On a tangent: another thing I always do is modify the setup.py's
> find_package_data to (where='.', package=''). The reason being that I
> have a "shared" directory that I link in to every TG project at the top
> level of the project, and I want it to get picked up when I build the
> egg. I suppose my other option is to build and release my shared
> library as an egg and set the version number dependency in my setup.py?
setuptools 06a9 I believe added support for the:
include_package_data=True,
option. It will automatically include all the package data in your
project thats under either CVS or SVN version control. I've found it
rather nice. :)
> Another tangent: another thing I always do is move the app version out
> of the setup.py and put it in my projectdir/__init__.py so I can do
> this in myproject-start.py:
> def add_custom_variables(variables):
> variables['app_version'] = myproject.__version__
> turbogears.view.variableProviders.append(add_custom_variables)
> I do this because I want my application's version number available to
> my templates for appending at the end of each .js and .css inclusion.
I actually got stung bad by this earlier for the following reason. If
you setup.py indicates you require certain dependencies, perhaps your
project needs package XXX. Then your setup.py goes and includes the
version from your project/__init__.py, and your __init__.py also
happens to import some stuff that imports some stuff that imports
package XXX. It's quite likely package XXX wasn't installed yet, and
the process will die as such, because setuptools hasn't had the chance
to install dependencies. It was still busy pulling your version
number...
Some thoughts. :)
- Ben
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---