Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grab packaging data from setup.py? #123

Closed
tmontes opened this issue Jan 10, 2021 · 3 comments
Closed

Grab packaging data from setup.py? #123

tmontes opened this issue Jan 10, 2021 · 3 comments
Labels
@ core enhancement New feature or request
Milestone

Comments

@tmontes
Copy link
Member

tmontes commented Jan 10, 2021

NOTES:

  • IIUC, briefcase 2.x -- used to package Mu up until today -- seems to grab packaging (meta) data from setup.py.
  • Here's an excerpt from the current setup.py in mu:
...
    entry_points={"console_scripts": ["mu-editor = mu.app:run"]},
    options={  # Briefcase packaging options for OSX                                      
        "app": {"formal_name": "mu-editor", "bundle": "mu.codewith.editor"},
        "macos": {"icon": "package/icons/mac_icon"},
    },
...
  • How about we have pup optionally grab its metadata from there? :-)
@tmontes tmontes added enhancement New feature or request @ core labels Jan 10, 2021
@tmontes tmontes added this to the TBD milestone Jan 10, 2021
@tmontes tmontes modified the milestones: TBD, NEXT Jun 19, 2022
@tmontes
Copy link
Member Author

tmontes commented Jun 19, 2022

EXPLORED THIS:

  • briefcase extracted data from setup.py becase it used to be implemented as a setuptools command.

WENT CREATIVE:

  • Where in a standard wheel metadata could we store/keep pup-related packaging data.
  • Came up with something crazy, that seems to work, but that is horribly brittle.
  • pup will look into the standard wheel metadata for the project's dependencies.
  • For all those dependencies associated with the pup extra:
    • Assume the dependency name is a pup packaging paramenter (like --icon-path, for example).
    • Assume that the dependency version is specified as <operator> <value> and i) disregard the operator, while ii) taking the value as the parameter's value.

BENEFITS:

  • Should work with any tooling that produces standard wheel metadata.

TRADE-OFF:

  • If/when ever pip starts validating extra dependency version formats, this no longer works and pup fails!

YIKES! :)

@tmontes
Copy link
Member Author

tmontes commented Jun 19, 2022

PROGRESS:

NEXT:

  • Have the CLI options override whatever is collected from the package metadata extra deps.

@tmontes
Copy link
Member Author

tmontes commented Jun 20, 2022

CLOSING after having merged PRs #224 and #226.

@tmontes tmontes closed this as completed Jun 20, 2022
@tmontes tmontes modified the milestones: NEXT, 1.0.0a17 Jun 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
@ core enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant