Ir al contenido principal

Ralsina.Me — El sitio web de Roberto Alsina

Now, that was easy!

I al­ways dread the mo­ment when a pack­age has to be shared, and some­thing dis­tributable has to be made. You know, don't for­get any files, and such.

Not to men­tion the an­cil­lary night­mare of make/au­tomake/au­to­con­f/a­clo­cal/etc. I sim­ply trust­ed the kind­ness of strangers for that.

And I nev­er man­aged to make RPMs or any­thing like it. But dis­tu­tils makes in­stalling, dis­tribut­ing, re­al­ly sim­ple.

Here's an ex­am­ple:
#!/usr/bin/env python

from distutils.core import setup

setup (name="klog",
       version="0.0.1",
       description="klog: a PyQt blog tool",
       author="Roberto Alsina",
       author_email="ralsina@kde.org",
       url="//ralsina.me",
       packages=["klogmodules"],
       scripts=["klog.py"],
       long_description="""Long description here """

)

That is enough to build, in­stal­l, cre­ate RPM­s, De­bian pack­ages, in­clude the file in PyP­I, and who knows what else.

Have an­oth­er file in the pro­jec­t? Just toss it in the klog­mod­ules di­rec­to­ry, and it's done!

Of course this is on­ly for python app­s, but I don't see me cod­ing in oth­er lan­guages soon. The on­ly rea­son I got in­to C++ was be­cause there was no de­cent in­ter­pret­ed lan­guage with a de­cent toolk­it!


Contents © 2000-2024 Roberto Alsina