Changeset 2624

Show
Ignore:
Timestamp:
09/08/07 22:28:16 (10 months ago)
Author:
athomas
Message:

Applied a patch (refs #1075) from stp which fixes some more 0.11 problems. Thanks!

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • xmlrpcplugin/trunk/setup.py

    r2616 r2624  
    11#!/usr/bin/env python 
    22 
    3 from setuptools import setup 
     3from setuptools import setup, find_packages 
    44 
    55setup( 
    66    name='TracXMLRPC', 
    7     version='0.1', 
     7    version='1.0.0', 
     8    license='BSD', 
    89    author='Alec Thomas', 
    910    author_email='alec@swapoff.org', 
     
    1112    description='XML-RPC interface to Trac', 
    1213    zip_safe=True, 
    13     packages=['tracrpc'], 
    14     package_data={'tracrpc': ['templates/*.html']}, 
    15     entry_points={'trac.plugins': 'TracXMLRPC = tracrpc'}, 
     14    packages=find_packages(exclude=['*.tests']), 
     15    package_data={ 
     16        'tracrpc': ['templates/*.html'] 
     17        }, 
     18    entry_points={ 
     19        'trac.plugins': 'TracXMLRPC = tracrpc' 
     20        }, 
    1621    ) 
  • xmlrpcplugin/trunk/tracrpc/api.py

    r2609 r2624  
    226226 
    227227    def getAPIVersion(self, req): 
    228         """ Returns a list with two elements. First element is the major 
    229         version number, second is the minor. Changes to the major version 
     228        """ Returns a list with three elements. First element is the 
     229        epoch (0=Trac 0.10, 1=Trac 0.11 or higher). Second element is the major 
     230        version number, third is the minor. Changes to the major version 
    230231        indicate API breaking changes, while minor version changes are simple 
    231232        additions, bug fixes, etc. """ 
    232         return [0, 3] 
     233        import tracrpc 
     234        return map(int, tracrpc.__version__.split('.')) 
  • xmlrpcplugin/trunk/tracrpc/__init__.py

    r246 r2624  
    44from tracrpc.wiki import * 
    55from tracrpc.search import * 
     6 
     7__author__ = 'Alec Thomas <alec@swapoff.org>' 
     8__license__ = 'BSD' 
     9 
     10try: 
     11    __version__ = __import__('pkg_resources').get_distribution('TracXMLRPC').version 
     12except (ImportError, pkg_resources.DistributionNotFound): 
     13    pass 
  • xmlrpcplugin/trunk/tracrpc/ticket.py

    r2614 r2624  
    9797    def update(self, req, id, comment, attributes = {}, notify=False): 
    9898        """ Update a ticket, returning the new ticket in the same form as getTicket(). """ 
    99         now = int(time.time()
     99        now = time.time(
    100100 
    101101        t = model.Ticket(self.env, id) 
  • xmlrpcplugin/trunk/tracrpc/wiki.py

    r2615 r2624  
    5252    def _page_info(self, name, time, author, version, comment): 
    5353        return dict(name=name, lastModified=xmlrpclib.DateTime(int(time)), 
    54                     author=author, version=int(version), comment=comment
     54                    author=author, version=int(version), comment=comment or ''
    5555 
    5656    def getRecentChanges(self, req, since):