Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make the generated package() prettier #38

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

hseg
Copy link
Contributor

@hseg hseg commented Aug 7, 2024

  • Make the generated package() prettier
    I didn't notice Make unsplit packages unless necessary #30 unconditionally added space between depends+=()
    and the packaging lines in package(), even if no dependencies were
    passed.

    Thus, eg for pip2pkgbuild pip the result is

    package() {
    
        cd "${srcdir}/${_src_folder}"
        python -m installer --destdir="${pkgdir}" dist/*.whl
    }
    

    where it should be

    package() {
        cd "${srcdir}/${_src_folder}"
        python -m installer --destdir="${pkgdir}" dist/*.whl
    }
    

hseg added 3 commits August 7, 2024 16:04
I failed to notice f6f0ab8 meant I had not just made PEP517 the default
on python 3, but actually made it the only option.
Add a `--no-pep517` flag to permit overriding this default in the other
direction.

Considered, but rejected:
- Using a `BooleanOptionalAction` to unify the two flags (would bump the
  minimal `argparse` version to 3.8 for marginal gain)
- Keep f6f0ab8's defaulting trick for `IS_PY2` at least -- considering
  we also need to set defaults based on the python version requested,
  it makes more sense to group their setting all together
PEP517 packages still need the build backend as a `makedepend` --
build+install+wheel are insufficient to build the package.
Separate this out from the other `makedepends` to highlight its
importance, and share the configuration across PEP517/non-PEP517 builds.
I didn't notice wenLiangcan#30 unconditionally added space between `depends+=()`
and the packaging lines in `package()`, even if no dependencies were
passed.

Thus, eg for `pip2pkgbuild pip` the result is
```
package() {

    cd "${srcdir}/${_src_folder}"
    python -m installer --destdir="${pkgdir}" dist/*.whl
}
```
where it should be
```
package() {
    cd "${srcdir}/${_src_folder}"
    python -m installer --destdir="${pkgdir}" dist/*.whl
}
```
@hseg hseg changed the title prettify package Make the generated package() prettier Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant