views:

175

answers:

2

With this you can easily submit the information about your software on pypi:

python setup.py register

But there is not a similar command for submitting information to freshmeat. How could I write a distutils.Command that let me do the following.

python setup.py freshmeat-submit
+1  A: 

Perhaps this page from the distutils docs can help.

Eli Bendersky
A: 

It should be fairly easy; I'd say freshmeat API will be straightforward.

For python site, for setup() function in setup.py, give this argument:

entry_points = {
    'distutils.commands' : [
        'freshmeat-submit = freshsubmitter.submit:SubmitToFreshMeat',
    ],
},

where freshsubmitter is your new pakcage, submit is module inside it and SubmitToFreshMeat is from distutils.command.config.config subclass.

Please be aware that entry_points are global, so you should distribute your command as separate package; bundling it with every package will cause conflicts.

Almad