diff --git a/.github/workflows/diff_shades.yml b/.github/workflows/diff_shades.yml index 36693aa3ddd..1cd7f21edd4 100644 --- a/.github/workflows/diff_shades.yml +++ b/.github/workflows/diff_shades.yml @@ -33,6 +33,7 @@ jobs: id: set-config env: GITHUB_TOKEN: ${{ github.token }} + HATCH_BUILD_HOOKS_ENABLE: "1" run: > python scripts/diff_shades_gha_helper.py config ${{ github.event_name }} ${{ matrix.mode }} @@ -41,6 +42,7 @@ jobs: needs: configure runs-on: ubuntu-latest env: + HATCH_BUILD_HOOKS_ENABLE: "1" # Clang is less picky with the C code it's given than gcc (and may # generate faster binaries too). CC: clang-12 @@ -80,10 +82,9 @@ jobs: if: steps.baseline-cache.outputs.cache-hit != 'true' env: GITHUB_TOKEN: ${{ github.token }} - HATCH_BUILD_HOOKS_ENABLE: "1" run: > ${{ matrix.baseline-setup-cmd }} - && python -m pip install . && rm dist -r + && python -m pip install . - name: Analyze baseline revision if: steps.baseline-cache.outputs.cache-hit != 'true' @@ -94,7 +95,6 @@ jobs: - name: Build and install target revision env: GITHUB_TOKEN: ${{ github.token }} - HATCH_BUILD_HOOKS_ENABLE: "1" run: > ${{ matrix.target-setup-cmd }} && python -m pip install . diff --git a/CHANGES.md b/CHANGES.md index 2c53cd62532..977eb1cdf67 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -69,7 +69,8 @@ -- Hatchling is now used as the build backend. (#3233) +- Hatchling is now used as the build backend. This will not have any effect for users + who install Black with its wheels from PyPI. (#3233) ### Parser diff --git a/pyproject.toml b/pyproject.toml index 6211e44469c..83d634621b5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -97,12 +97,10 @@ Homepage = "https://github.com/psf/black" [tool.hatch.metadata.hooks.fancy-pypi-readme] content-type = "text/markdown" - -[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]] -path = "README.md" - -[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]] -path = "CHANGES.md" +fragments = [ + { path = "README.md" }, + { path = "CHANGES.md" }, +] [tool.hatch.version] source = "vcs" @@ -126,6 +124,8 @@ dependencies = [ ] require-runtime-dependencies = true exclude = [ + # There's no good reason for blackd to be compiled. + "/src/blackd", # Not performance sensitive, so save bytes + compilation time: "/src/blib2to3/__init__.py", "/src/blib2to3/pgen2/__init__.py",