Skip to content

Deciding on the MacPorts name should happen in one place #43

@reneeotten

Description

@reneeotten

We currently convert the upstream name to lowercase and/or do other manipulations in multiple locations.

For example, in the MacPortsPythonPackage class there is:

    def _pkgname(self):
        macports_name = self._normalized_macports_name(self.upt_pkg.name)
        return f'{macports_name}'

    @staticmethod
    def _normalized_macports_name(name):
        name = name.lower()
        return f'py-{name}'

    @staticmethod
    def _normalized_macports_folder(name):
        name = name.lower()
        return f'py-{name}'

and after the template-clean up there will be another translation of dependency names

def jinja2_reqformat(self, req):
    return f'py${{python.version}}-{req.name.lower()}'

this should really be only done once and re-used in all the other functions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions