GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — bpo-29585: Fix sysconfig.get_config_var("PYTHONFRAMEWORK") by methane · Pull Request #2483 · python/cpython

Conversation

@methane

@methane methane commented Jun 29, 2017

Copy link
Copy Markdown
Member

After GH-136 merged, PYTHONFRAMEWORK config variable are in Makefile and pyconfig.h.

When reading string variable from Makefile, quote is removed.
But when reading them from pyconfig.h, quote is not removed. And config variables in
pyconfig.h override config variables in Makefile.

So sysconfig.get_config_var("PYTHONFRAMEWORK") was changed '' to '""' in
non framework build, and 'PYTHON' to '"PYTHON"' in framework build.

I thought about unquoting string config variables in pyconfig.h, but there is one
string variables already and it may cause unintentional backward incompatibility.
(sysconfig.get_config_var('PY_FORMAT_SIZE_T') is '"z"').

So this pull request just rename PYTHONFRAMEWORK to _PYTHONFRAMEWORK
in pyconfig.h. Variables which name starts with _ is not exported to sysconfig.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
methane added 2 commits June 29, 2017 14:44
@methane
Fix non-framework build on macOS
4f490a6
`PYTHONFRAMEWORK` is defined in `Makefile` and it shoulnd't be used
in `pyconfig.h`.

`sysconfig.py --generate-posix-vars` reads config vars from Makefile
and `pyconfig.h`.  Conflicting variables should be avoided.

Especially, string config variables in Makefile are unquoted, but
in `pyconfig.h` are keep quoted.  So it should be private (starts with
underscore).
@methane
autoreconf
1f24571
@the-knights-who-say-ni the-knights-who-say-ni added the CLA signed label Jun 29, 2017
@methane
methane requested a review from vstinner June 29, 2017 05:59
@methane

methane commented Jun 29, 2017

Copy link
Copy Markdown
Member Author

https://travis-ci.org/python/cpython/jobs/248237175

macOS test now passed.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@methane
methane merged commit 6b42eb1 into python:master Jun 29, 2017
@methane
methane deleted the fix-framework branch June 29, 2017 06:31
@vstinner

vstinner commented Jun 29, 2017

Copy link
Copy Markdown
Member

Thanks for fixing maxOS :-)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@vstinner vstinner Awaiting requested review from vstinner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@methane @vstinner @the-knights-who-say-ni
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.