pypi2port and the distinction between Python modules and applications
Davide Liessi
davide.liessi at gmail.com
Tue Jul 29 10:33:26 PDT 2014
Dear Gaurav,
I had a look at your work on pypi2port.
I haven't tested it yet, but I spotted a possible problem.
The python PortGroup discerns between Python modules and Python
applications (based on whether their port name begins with "py-" or
not, respectively) and treats them differently (basically "pyXY-"
subports are created for each XY in python.versions).
If I understand correctly, you are prepending "py-" to every PyPI
package name, effectively treating all of them like modules.
Probably there isn't an automatic way to discern between modules and
applications; in that case, your script should warn the user that if
the port is an application the "py-" prefix in the port name must be
manually removed from the produced Portfile.
If I'm not mistaken, out of 972 ports that use the python PortGroup,
881 begin with "py-" and 91 do not.
(A notable example of a PyPI package that is not a module but an
application, and is treated as such by MacPorts, is mercurial.)
Best wishes.
Davide
More information about the macports-dev
mailing list