Skip to content

vendoring.errors.VendoringError: Encountered import that cannot be transformed for a namespace #58

@Andrei-Pozolotin

Description

@Andrei-Pozolotin

when cssutils is processed by vendoring:
https://github.com/pradyunsg/vendoring

it results in errors like:

  vendoring.errors.VendoringError: Encountered import that cannot be transformed for a namespace.
  File "src/auto_mate_1/vendor/cssutils/css/cssrule.py", line 6
    import cssutils.util

which could be corrected with pyproject.toml stanza:

[tool.vendoring.transformations]
substitute = [
	{ match="import cssutils.profiles", replace="from cssutils import profiles as cssutils_profiles" },
	{ match="import cssutils.stylesheets", replace="from cssutils import stylesheets as cssutils_stylesheets" },
	{ match="import cssutils.helper", replace="from cssutils import helper as cssutils_helper" },
	{ match="import cssutils.util", replace="from cssutils import util as cssutils_util" },
	{ match="cssutils.profiles", replace="cssutils_profiles" },
	{ match="cssutils.stylesheets", replace="cssutils_stylesheets" },
	{ match="cssutils.helper", replace="cssutils_helper" },
	{ match="cssutils.util", replace="cssutils_util" },
] 

perhaps cssutils could benefit from package namespace correction?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions