Skip to content

Add option to package DLL files #5103

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

Merged
merged 4 commits into from
Oct 29, 2015
Merged

Add option to package DLL files #5103

merged 4 commits into from
Oct 29, 2015

Conversation

cgohlke
Copy link
Contributor

@cgohlke cgohlke commented Sep 18, 2015

This would allow to package the msvcp140.dll file required by C++ extensions built with Visual Studio 2015. See #5100.

name = "dlls"

def check_requirements(self):
if sys.platform != 'win32':
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incidentally, is it preferable to use platform.system? I confess, I've tried in the past to understand what the win32 means, but it always escapes me - as far as I can remember, even 64-bit windows reports win32, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think sys.platform != 'win32' is correct here. The win32 probably refers to the implementation of Python using the Windows API, formerly named Win32. Other Python implementations for Windows, which this patch does not apply to, are using cygwin or cli (.NET).

@pelson
Copy link
Member

pelson commented Sep 19, 2015

👍

@cgohlke
Copy link
Contributor Author

cgohlke commented Sep 19, 2015

How can I disable this optional package by default? Currently it is enabled by default but has no effect because there are no DLLs in the matplotlib source distribution.

@pelson
Copy link
Member

pelson commented Sep 21, 2015

How can I disable this optional package by default?

Ping @mdboom - any tips?

@tacaswell tacaswell added this to the next point release (1.5.0) milestone Oct 8, 2015
@mdboom
Copy link
Member

mdboom commented Oct 20, 2015

To make a package optional by default you could override get_config, i.e.:

    @classmethod
    def get_config(cls):
        """
        Look at `setup.cfg` and return one of ["auto", True, False] indicating
        if the package is at default state ("auto"), forced by the user (True)
        or opted-out (False).
        """
        try:
            return config.getboolean(cls.config_category, cls.name)
        except:
            return False  # <-- default

@mdboom mdboom merged commit edd1faf into matplotlib:master Oct 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants