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

new base class for binary packaging #34304

Closed
mwa mannequin opened this issue Apr 10, 2001 · 5 comments
Closed

new base class for binary packaging #34304

mwa mannequin opened this issue Apr 10, 2001 · 5 comments
Assignees
Labels
stdlib Python modules in the Lib dir

Comments

@mwa
Copy link
Mannequin

mwa mannequin commented Apr 10, 2001

BPO 415226
Nosy @malemburg, @loewis
Files
  • bdist_packager.py: bdist_packager.py
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/malemburg'
    closed_at = <Date 2002-04-17.19:43:52.000>
    created_at = <Date 2001-04-10.19:51:46.000>
    labels = ['library']
    title = 'new base class for binary packaging'
    updated_at = <Date 2002-04-17.19:43:52.000>
    user = 'https://bugs.python.org/mwa'

    bugs.python.org fields:

    activity = <Date 2002-04-17.19:43:52.000>
    actor = 'lemburg'
    assignee = 'lemburg'
    closed = True
    closed_date = None
    closer = None
    components = ['Distutils']
    creation = <Date 2001-04-10.19:51:46.000>
    creator = 'mwa'
    dependencies = []
    files = ['3257']
    hgrepos = []
    issue_num = 415226
    keywords = ['patch']
    message_count = 5.0
    messages = ['36326', '36327', '36328', '36329', '36330']
    nosy_count = 4.0
    nosy_names = ['lemburg', 'loewis', 'dja', 'mwa']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue415226'
    versions = []

    @mwa
    Copy link
    Mannequin Author

    mwa mannequin commented Apr 10, 2001

    bdist_packager.py provides an abstract
    base class for bdist commands. It provides easy access
    to all
    the PEP-241 metadata fields, plus "revision" for the
    package
    revision and installation scripts for preinstall,
    postinstall
    preremove, and postremove. That covers the base
    characteristics
    of all the package managers that I'm familiar with. If
    anyone
    can think of any others, let me know, otherwise
    additional
    extensions would be implemented in the specific
    packager's
    commands. I would, however, discourage _requiring_ any
    additional fields. It would be nice if by simply
    supplying
    the PEP-241 metadata under the [bdist_packager] section
    all subclassed packagers worked with no further effort.
    It also has rudimentary relocation support by including
    a --no-autorelocate option.

    The bdist_packager is also where I see creating
    seperate
    binary packages for sub-packages supported. My need for
    that is much less than my desire for it right now, so I
    didn't give it much thought as I wrote it. I'd be
    delighted
    to hear any comments and suggestions on how to approach
    sub-packaging, though.

    @mwa mwa mannequin closed this as completed Apr 10, 2001
    @mwa mwa mannequin assigned malemburg Apr 10, 2001
    @mwa mwa mannequin added the stdlib Python modules in the Lib dir label Apr 10, 2001
    @mwa mwa mannequin assigned malemburg Apr 10, 2001
    @mwa mwa mannequin added the stdlib Python modules in the Lib dir label Apr 10, 2001
    @loewis
    Copy link
    Mannequin

    loewis mannequin commented Jun 7, 2001

    Logged In: YES
    user_id=21627

    Shouldn't the patch also modify the existing bdist
    commands to use this as a base class?

    @dja
    Copy link
    Mannequin

    dja mannequin commented Sep 20, 2001

    Logged In: YES
    user_id=78574

    i recently struck a case where i wanted the ability to run a
    post-install script on Windows (from a
    bdist_wininst-produced package).

    while i agree with what seems to be the basic intention of
    this patch, wouldn't it be more useful to have the various
    scripts run by the Python interpreter, rather than Bourne
    shell (which is extremely seldom available on Windows,
    MacOS, etc) ?

    i went looking for the source of the .exe file embedded in
    the wininst command, but couldn't find it. does anyone know
    where it lives?

    @mwa
    Copy link
    Mannequin Author

    mwa mannequin commented Oct 2, 2001

    Logged In: YES
    user_id=12810

    Regarding script code: The preinstall, postinstall, etc.
    scripts are hooked into the package manager specific
    subclasses. It's the responsibility of the specific class to
    "do the right thing". For *NIX package managers, this is
    usually script code, although changing the help text to be
    more informative isn't a problem.

    More specifically, using python scripts under pkgtool and
    sdux would fail. Install scripts are not executed, they're
    sourced (in some wierd fashion I've yet to identify).
    Theoretically, using a shell script to find the python
    interpreter by querying the package manager and calling it
    with either -i or a runtime created script should work fine.

    This is intended as a class for instantiating new bdist
    commands with full support for PEP-241. Current bdist
    commands do their own thing, and they do it very
    differently. I'd rather see this put in as a migration path
    than shut down bdist commands that function just fine on
    their own. Eventual adoption of a standard abstract base
    would mean that module authors could provide all metadata in
    a standard format, and distutils would be able to create
    binary packages for systems the author doesn't have access
    to.

    This works for Solaris pkgtool and HP-UX SDUX. All three
    patches can be included with ZERO side effects on any other
    aspect of Distutils. I'm really kind of curious why they're
    not integrated yet so other's can try them out.

    @malemburg
    Copy link
    Member

    Logged In: YES
    user_id=38388

    Replaced by 531901.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    stdlib Python modules in the Lib dir
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant