Skip to content

make smuggled package cache values insensitive to argument order & short/long form #42

Description

@paxtonfitzpatrick

When the same smuggle command is multiple times in the same interpreter session, davos avoids re-checking the file system for a local, satisfactory package version, unless something about the command has been changed since it was last run (e.g., the requested version, installer program, VCS URL, etc.). This is done by storing a dict item for each smuggled package in davos.config.smuggled, where the key is the package name and the value is a string made by ';'.join()ing the name of the installer program and all arguments supplied in the onion comment (no onion comment results in just <installer_name>;).

This is quick and simple, but ideally it would treat variations in argument order & short/long form as matches.

i.e., running:

smuggle foo    # pip: -v foo==0.0.1

stores:

davos.config.smuggled['foo'] = 'pip;-v;foo==0.0.1'

However, neither of the following would be recognized as previously run, despite being equivalent to the existing cached value:

smuggle foo    # pip: foo==0.0.1 -v           # new value would be 'pip;foo==0.0.1;-v'

smuggle foo    # pip: --verbose foo==0.0.1    # new value would be 'pip;--verbose;foo==0.0.1'

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions