Universal packaging tool (for pypi, cpan, ruby, ...)
cyril.roelandt at aquilenet.fr
Tue Feb 12 02:40:50 UTC 2019
I'm the author of upt.
On 2019-02-10 21:24, Mojca Miklavec wrote:
> Last week I was sitting in cafeteria with the author of a new python
> package "upt" (Universal packaging tool) whose aim is to provide
> automatic conversion from one of the repositories like pypi, cpan,
> ruby gems, npm, ... into any other package manager.
The video is not online yet, but should appear on the FOSDEM page soon.
A quick summary: upt is a collection of modules. Some are "frontend"
modules and parse upstream package archives (PyPI, CPAN, ...), others
are "backend" modules, and create a source package suitable for a
downstream distribution (Fedora, OpenBSD, and maybe soon, MacPorts!).
> I have a proof-of-concept backend written for python ports, but I
> still need to clean it up a bit and write installation rules before
> publishing (I had no time last week to finish tho work). Some of the
> required functionality in upt was also just implemented now.
What is especially interesting here, is that once this initial work is
available, it will probably be really easy to add support for Perl/Ruby
packages. All that should be required is a Jinja2 template and a couple
of Python methods.
> For us this could at some point replace pypi2port & cpan2port (less
> important), but more importantly we have no such tool for ruby gems (I
> believe?), and maybe someone would write a frontend for npm or another
> tricky "package manager" one day.
It is worth noting that, because of the modular nature of upt, every
time someone adds/updates a frontend, the improvements are available for
every single backend (including the MacPorts one Mojca is working on).
This means that all distro developers end up sharing their hard work.
> What's currently not implemented are non-python / non-perl
> dependencies, and an easy way to upgrade (it can create the package
> for the first time, but if you make lots of changes, it doesn't know
> how to "merge" the manual changes with changes in the upstream
Regarding non-Python dependencies in Python packages, I do not think
setuptools allows developers to specify them. Maybe I'm mistaken?
Regarding updates, I think I did not answer your question at FOSDEM.
Sorry about that, it was a bit of a stressful talk, as you may
remember :) How does pypi2port work with upgrades?
More information about the macports-dev