Packaging a Python module
Link Dupont
link.dupont at mac.com
Thu Jul 18 16:09:38 UTC 2024
So do I have to have the dports directory generated by pypi2port in my sources.conf in order for them to be detected?
> On Jul 18, 2024, at 10:57, Renee Otten <ottenr.work at gmail.com> wrote:
>
> I would recommend trying to use the “upt” package (available in MacPorts) to generate Python portfiles, but “pypi2port” should work as well.
>
> The most likely reason that it doesn't find the port you just added is that you did not run “portindex”.
>
> Best,
> Renee
>
>> On Jul 18, 2024, at 10:39 AM, Link Dupont via macports-dev <macports-dev at lists.macports.org> wrote:
>>
>> Hello,
>>
>> I’m trying to package a Python module. I found the port pypi2port, which does generate a basic Portfile for me, but when I try to build the port, it gives me a puzzling error:
>>
>>> ---> Computing dependencies for py-fmf
>>> Error: Dependency 'py311-fmf' not found.
>>
>>
>> The entire Portfile is:
>>
>>> # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
>>>
>>> PortSystem 1.0
>>> PortGroup python 1.0
>>>
>>> name py-fmf
>>> version 1.4.1
>>> platforms {darwin any}
>>> supported_archs noarch
>>> license GPL-2
>>> maintainers P e t r S p l i c h a l
>>>
>>> description Flexible Metadata Format
>>> long_description {*}${description}
>>>
>>> homepage https://github.com/psss/fmf
>>> master_sites https://pypi.org/project/fmf/1.4.1/
>>> checksums rmd160 XXX \
>>> sha256 XXX \
>>> size XXX
>>>
>>> python.versions 311
>>> python.pep517 yes
>>>
>>> if {${name} ne ${subport}} {
>>> livecheck.type none
>>> }
>>
>> Isn’t the python PortGroup supposed to generate the version-specific packages automatically? If that is the case, why is it not able to find its own generated package?
>>
>> ~link
More information about the macports-dev
mailing list