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

Hooks: Fix sysconfig and distutils.sysconfig. #5218

Merged
merged 5 commits into from Mar 9, 2021

Commits on Mar 6, 2021

  1. Tests: Remove test for collection of config.h and Makefile.

    The pyconfig.h and makefile are no longer used directly. Rather
    configuration is baked into `.py` files.
    bwoodsend committed Mar 6, 2021
    Copy the full SHA
    1c153f7 View commit details
    Browse the repository at this point in the history
  2. Copy the full SHA
    b5be6af View commit details
    Browse the repository at this point in the history

Commits on Mar 8, 2021

  1. Hooks: sysconfig: Don't collect pyconfig.h and makefile.

    As of Python 3.x, the config header and makefile are not longer used.  Trying to
    include them causes build errors in pyenv/venv/equivalents.  Applying this fixes
    5018, fixes 4775, and closes 1545 (a cleanup issue).
    
    On Windows:
     The pyconfig.h data is hardcoded directly into sysconfig.py.
     And the makefile does not exist.
    On Unix:
     A Python extension module contains all the details. This module is
     a hidden import since 3.6 but is already marked as such in the hook.
    
    The functions to find and parse the files are still left over in sysconfig.py
    but they are almost fully replaced by functions to get configuration parameters
    directly. Should a user attempt to invoke the parser in a PyInstaller build, it
    will now fail. They should instead use get_config_var() which will always work
    (and is the recommended usage anyway).
    bwoodsend committed Mar 8, 2021
    Copy the full SHA
    ea3a2e1 View commit details
    Browse the repository at this point in the history
  2. Hooks: distutils: Fix no suitable dest location found for pyconfig.h.

    Locating `pyconfig.h` and the `makefile` gets into a mess when using
    certain environment managers (pyenv-virtualenv) because PyInstaller,
    whilst trying to find an appropriate `dest` path to put the files in,
    gets confused by `sys.prefix` (or its varients) not being a parent dir of
    the config and makefiles.
    
    As of Python 3.6, direct parsing of `pyconfig.h` and `makefile` are
    replaced by a Python module generated on building Python so that
    these files are no longer required.
    bwoodsend committed Mar 8, 2021
    Copy the full SHA
    5806950 View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    1557991 View commit details
    Browse the repository at this point in the history