◐ Shell
reader mode source ↗
Skip to content

gh-95299: Rework test_cppext.py to not invoke setup.py directly#103316

Merged
pradyunsg merged 7 commits into
python:mainfrom
pradyunsg:test-cppext
Apr 13, 2023
Merged

gh-95299: Rework test_cppext.py to not invoke setup.py directly#103316
pradyunsg merged 7 commits into
python:mainfrom
pradyunsg:test-cppext

Conversation

@pradyunsg

@pradyunsg pradyunsg commented Apr 6, 2023

Copy link
Copy Markdown
Member

Pulling these changes out of #101039, as requested by @vstinner. :)

@zware zware added the skip news label Apr 6, 2023
@zware

zware commented Apr 6, 2023

Copy link
Copy Markdown
Member

!buildbot (?i).installed.

@bedevere-bot

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @zware for commit 635492e 🤖

The command will test the builders whose names match following regular expression: (?i).*installed.*

The builders matched are:

  • AMD64 Fedora Stable Clang Installed PR
  • s390x Fedora Clang Installed PR
  • aarch64 Fedora Stable Clang Installed PR
  • PPC64LE Fedora Stable Clang Installed PR
  • x86 Gentoo Installed with X PR

@pradyunsg

pradyunsg commented Apr 6, 2023

Copy link
Copy Markdown
Member Author

Hmm... I didn't intend for the reverts to make it into the PR, but oh well, they're here now. 😅

The main change is that it's no longer moving the files around, and instead using the temporary directory created for the build within the outer-caller of the test; this serves as a temporary directory for the package to be built and installed via a regular pip install run without relying on setuptools directly.

@pradyunsg

Copy link
Copy Markdown
Member Author

!buildbot (?i).installed.

@bedevere-bot

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @pradyunsg for commit f6c4024 🤖

The command will test the builders whose names match following regular expression: (?i).installed.

The builders matched are:

@pradyunsg

Copy link
Copy Markdown
Member Author

!buildbot (?i).installed.

@bedevere-bot

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @pradyunsg for commit f6c4024 🤖

The command will test the builders whose names match following regular expression: (?i).*installed.*

The builders matched are:

  • AMD64 Fedora Stable Clang Installed PR
  • s390x Fedora Clang Installed PR
  • aarch64 Fedora Stable Clang Installed PR
  • PPC64LE Fedora Stable Clang Installed PR
  • x86 Gentoo Installed with X PR

@CAM-Gerlach

CAM-Gerlach commented Apr 6, 2023

Copy link
Copy Markdown
Member

Just to cross reference for others' benefit, previous buildbot discussion: #101039 (comment)

@pradyunsg

Copy link
Copy Markdown
Member Author

!buildbot (?i).installed.

@bedevere-bot

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @pradyunsg for commit dd16041 🤖

The command will test the builders whose names match following regular expression: (?i).*installed.*

The builders matched are:

  • AMD64 Fedora Stable Clang Installed PR
  • s390x Fedora Clang Installed PR
  • aarch64 Fedora Stable Clang Installed PR
  • PPC64LE Fedora Stable Clang Installed PR
  • x86 Gentoo Installed with X PR

@FFY00 FFY00 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hide comment

I think ideally we'd want to get rid of setuptools entirely here, but this is a reasonable solution while that doesn't happen (it's not trivial to implement). The implementation itself looks good to me, so you have my 👍.

@pradyunsg pradyunsg merged commit 9e67740 into python:main Apr 13, 2023
@pradyunsg pradyunsg deleted the test-cppext branch April 13, 2023 04:17
carljm added a commit to carljm/cpython that referenced this pull request Apr 13, 2023
* main:
  pythongh-103479: [Enum] require __new__ to be considered a data type (pythonGH-103495)
  pythongh-103365: [Enum] STRICT boundary corrections (pythonGH-103494)
  pythonGH-103488: Use return-offset, not yield-offset. (pythonGH-103502)
  pythongh-103088: Fix test_venv error message to avoid bytes/str warning (pythonGH-103500)
  pythonGH-103082: Turn on branch events for FOR_ITER instructions. (python#103507)
  pythongh-102978: Fix mock.patch function signatures for class and staticmethod decorators (python#103228)
  pythongh-103462: Ensure SelectorSocketTransport.writelines registers a writer when data is still pending (python#103463)
  pythongh-95299: Rework test_cppext.py to not invoke setup.py directly (python#103316)
aisk pushed a commit to aisk/cpython that referenced this pull request Apr 18, 2023
…python#103316)

* pythongh-95299: Rework test_cppext.py to not invoke setup.py directly

* Add tests/cppextdata data to `TESTSUBDIRS`

* Revert "Add tests/cppextdata data to `TESTSUBDIRS`"

This reverts commit 635492e.

* Revert "pythongh-95299: Rework test_cppext.py to not invoke setup.py directly"

This reverts commit 41c5a66.

* Build and install the extension in a temporary directory instead

* Pull in wheels for setuptools and wheel for testing extension builds
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants