Skip to content

Commit

Permalink
Fix error: unrecognized arguments
Browse files Browse the repository at this point in the history
Clean up `dist` directory before starting the build.
This is in order to prevent `error: unrecognized arguments` at
`python -m install` time, which would occur if `dist` happens to contain
a stale wheel from an earlier build.

See also: pypa/setuptools#1347
  • Loading branch information
claui committed Apr 10, 2023
1 parent 5e71c34 commit 59b82fd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ pkgver() {
"$(git -C "${_gitpkgname}" rev-parse --short HEAD)"
}

prepare() {
# https://github.com/pypa/setuptools/issues/1347
git -C "${srcdir}/${_gitpkgname}" clean -dfx
}

build() {
cd "${srcdir}/${_gitpkgname}"
python -m build --wheel --no-isolation
Expand Down

0 comments on commit 59b82fd

Please sign in to comment.