Skip to content

[Bug]: flit publish fails with incompatible flit_core 4.x dependency #402

Description

@harryswift01

Bug Report

flit publish fails during the GitHub Actions release workflow with:

TypeError: SdistBuilder.build() got an unexpected keyword argument 'gen_setup_py'

To Reproduce

- name: Install flit
  run: |
    python -m pip install --upgrade pip
    python -m pip install flit~=3.9

- name: Publish
  run: flit publish

Build configuration:

[build-system]
requires = ["flit_core >=3.4,<4"]
build-backend = "flit_core.buildapi"

Actual Output

Run flit publish
Fetching list of valid trove classifiers
Using repository at https://upload.pypi.org/legacy/

...
File ".../flit/build.py", line 46, in main
    sdist_file = sb.build(dist_dir, gen_setup_py=gen_setup_py)

TypeError: SdistBuilder.build() got an unexpected keyword argument 'gen_setup_py'

Error: Process completed with exit code 1.

Expected Behaviour

The package should build and publish successfully to PyPI.

Environment

  • GitHub Actions
  • Python 3.14.6
  • Flit installed with flit~=3.9

Activity

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions