Opened 5 years ago

Last modified 5 years ago

#4082 enhancement new

tap2rpm should read configuration from the .tac file it packages.

Reported by: TimAllen Owned by: TimAllen
Priority: normal Milestone:
Component: core Keywords:
Cc: Branch:
Author: Launchpad Bug:

Description

I have a project which includes a .tac file, which I convert to an RPM with tap2rpm. Because the .tac file is part of the project, the maintainer, protocol, description and long description are the same every time I invoke tap2rpm - and often the version will be similar too. I could bundle a special build-script in my project that records these configuration variables, but it seems like a problem that nearly every tap2rpm user would encounter and thus should be solved once for everyone.

Currently twistd peeks into .tac files looking for a variable with the magic name "application"; I propose tap2rpm (and tap2deb and a hypothetical tap2svc) should peek into .tac files looking for a variable with the magic name "metadata", looking something like this:

metadata = {
    'maintainer': 'John Doe <johndoe@example.com>',
    'protocol': 'htcpcp',
    'description': 'Daemon for servicing HTCPCP requests',
    'long_description': """
         Provides a TCP-based Hypertext Coffee Pot Control Protocol interface for all
         USB-connected beverage devices.
         """,
    }

Change History (4)

comment:1 Changed 5 years ago by TimAllen

This ticket split off from #3292.

comment:2 Changed 5 years ago by TimAllen

Another potentially useful thing to read from the .tac would be a default reactor.

comment:3 Changed 5 years ago by TimAllen

Although, like logging configuration, that might be better handled via prodding the Application object from code, rather than metadata.

comment:4 Changed 5 years ago by glyph

  • Owner changed from glyph to TimAllen
Note: See TracTickets for help on using tickets.