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

chore: drop whey #503

Merged
merged 3 commits into from
Oct 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions .github/workflows/reusable-cookie.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@ jobs:
- name: Test pdm
run: nox -s 'tests(pdm, novcs)' -s 'tests(pdm, vcs)'

- name: Test whey
run: nox -s 'tests(whey, novcs)'

- name: Test maturin
run: nox -s 'tests(maturin, novcs)'

Expand Down Expand Up @@ -155,11 +152,6 @@ jobs:
nox -s 'nox(pdm, vcs)'
nox -s 'nox(pdm, vcs)' -- docs

- name: Test whey
run: |
nox -s 'nox(whey, novcs)'
nox -s 'nox(whey, novcs)' -- docs

- name: Test maturin
run: |
nox -s 'nox(maturin, novcs)'
Expand Down
21 changes: 9 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ templates for Python packages?

- Lives with the [Scientific-Python Development Guide][]: Every decision is
clearly documented and every tool described, and everything is kept in sync.
- Eleven different backends to choose from for building packages.
- Ten different backends to choose from for building packages.
- Optional VCS versioning for most backends.
- Template generation tested in GitHub Actions using nox.
- Supports generation with [copier][], [cookiecutter][], and [cruft][].
Expand Down Expand Up @@ -46,22 +46,20 @@ During generation you can select from the following backends for your package:
3. [pdm][]: A modern, less opinionated all-in-one solution to pure Python
projects supporting standards. Replaces setuptools, venv/pipenv, pip, wheel,
and twine. Supports [PEP 621][].
4. [whey][]: A modern [PEP 621][] builder with some automation options for Trove
classifiers. Development seems to be stalled, possibly. (No VCS versioning)
5. [poetry][]: An all-in-one solution to pure Python projects. Replaces
4. [poetry][]: An all-in-one solution to pure Python projects. Replaces
setuptools, venv/pipenv, pip, wheel, and twine. Higher learning curve, but is
all-in-one. Makes some bad default assumptions for libraries. The only one
with a non-standard pyproject.toml config.
6. [setuptools621][setuptools]: The classic build system, but with the new
5. [setuptools621][setuptools]: The classic build system, but with the new
standardized configuration.
7. [setuptools][]: The classic build system. Most powerful, but high learning
6. [setuptools][]: The classic build system. Most powerful, but high learning
curve and lots of configuration required.
8. [pybind11][]: This is setuptools but with an C++ extension written in
7. [pybind11][]: This is setuptools but with an C++ extension written in
[pybind11][] and wheels generated by [cibuildwheel][].
9. [scikit-build][]: A scikit-build (CMake) project also using pybind11, using
8. [scikit-build][]: A scikit-build (CMake) project also using pybind11, using
scikit-build-core. **(Recommended for C++ projects)**
10. [meson-python][]: A Meson project also using pybind11. (No VCS versioning)
11. [maturin][]: A [PEP 621][] builder for Rust binary extensions. (No VCS versioning)
9. [meson-python][]: A Meson project also using pybind11. (No VCS versioning)
10. [maturin][]: A [PEP 621][] builder for Rust binary extensions. (No VCS versioning)
**(Recommended for Rust projects)**

Currently, the best choice is probably hatch for pure Python projects, and
Expand Down Expand Up @@ -173,7 +171,7 @@ nox -l
nox -s "lint(setuptools)"

# Run a noxfile command on the project noxfile
nox -s "nox(whey)" -- docs
nox -s "nox(hatch)" -- docs
```

If you don't have `nox` locally, you can use [pipx][], such as `pipx run nox`
Expand Down Expand Up @@ -228,7 +226,6 @@ A lot of the guide, cookiecutter, and repo-review started out as part of
[rtd-link]: https://scientific-python-cookie.readthedocs.io/en/latest/?badge=latest
[scikit-build]: https://scikit-build.readthedocs.io
[setuptools]: https://setuptools.readthedocs.io
[whey]: https://whey.readthedocs.io

<!-- prettier-ignore-end -->

Expand Down
2 changes: 0 additions & 2 deletions cookiecutter.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"hatch",
"flit",
"pdm",
"whey",
"poetry",
"setuptools621",
"setuptools",
Expand Down Expand Up @@ -38,7 +37,6 @@
"hatch": "Hatchling - Pure Python (recommended)",
"flit": "Flit-core - Pure Python (minimal)",
"pdm": "PDM-backend - Pure Python",
"whey": "Whey - Pure Python",
"poetry": "Poetry - Pure Python",
"setuptools621": "Setuptools with pyproject.toml - Pure Python",
"setuptools": "Setuptools with setup.py - Pure Python",
Expand Down
5 changes: 2 additions & 3 deletions copier.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,13 +73,12 @@ backend:
"Hatchling - Pure Python (recommended)": hatch
"Flit-core - Pure Python (minimal)": flit
"PDM-backend - Pure Python": pdm
"Whey - Pure Python": whey
"Poetry - Pure Python": poetry
"Setuptools with pyproject.toml - Pure Python": setuptools621
"Setuptools with setup.py - Pure Python": setuptools
"Setuptools and pybind11 - Compiled C++": pybind11
"Scikit-build-core - Compiled C++ (recommended)": skbuild
"Meson-python - Compiled C++ (also good)": mesonpy
"Meson-python - Compiled C++ (also good)": mesonpy
henryiii marked this conversation as resolved.
Show resolved Hide resolved
"Maturin - Compiled Rust (recommended)": maturin
# [[[end]]]

Expand All @@ -88,7 +87,7 @@ vcs:
type: bool
help: Use version control for versioning
# [[[end]]]
when: "{{ backend not in ['whey', 'maturin', 'mesonpy'] }}"
when: "{{ backend not in ['maturin', 'mesonpy'] }}"

_templates_suffix: ""

Expand Down
2 changes: 1 addition & 1 deletion docs/pages/guides/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ on setting up [docs][], as well.
> Once you have completed the guidelines, there is a
> [copier][]/[cookiecutter][]/[cruft][] project, [scientific-python/cookie][],
> that implements these guidelines and lets you setup a new package from a
> template in less than 60 seconds! Eleven build backends including compiled
> template in less than 60 seconds! Ten build backends including compiled
> backends, generation tested in Nox, and kept in-sync with the guide.

{: .important-title }
Expand Down
7 changes: 3 additions & 4 deletions docs/pages/guides/packaging_simple.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ much; they all use a [standard configuration language][metadata] introduced in
[PEP 621][]. The PyPA's Flit is a great option. [scikit-build-core][] and [meson-python][]
are being developed to support this sort of configuration, enabling binary extension
packages to benefit too. These [PEP 621][] tools currently include [Hatch][],
[PDM][], [Flit][], [Whey][], and [Setuptools][]. [Poetry][] will eventually gain
support in 2.0.
[PDM][], [Flit][], and [Setuptools][]. [Poetry][] will eventually gain support
in 2.0.

{: .note-title }

Expand Down Expand Up @@ -96,7 +96,7 @@ library or if you access package metadata.

This sadly is not part of the standard metadata in `[project]`, so it depends on
what backend you you use. Hatchling, Flit, PDM, and setuptools use automatic
detection, while Whey does not, requiring a `tool` setting.
detection.

If you don't match your package name and import name (which you should except
for very special cases), you will likely need extra configuration here.
Expand Down Expand Up @@ -194,7 +194,6 @@ This is tool specific.
[flit]: https://flit.readthedocs.io
[poetry]: https://python-poetry.org
[pdm]: https://pdm.fming.dev
[whey]: https://whey.readthedocs.io
[hatch]: https://hatch.pypa.io/latest
[setuptools]: https://setuptools.readthedocs.io
[pep 621]: https://www.python.org/dev/peps/pep-0621
Expand Down
5 changes: 2 additions & 3 deletions docs/pages/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,8 @@ This covers modern packaging ([simple][] or [compiled][]), [style checking][],
> New project template
>
> This guide comes with a [copier][]/[cookiecutter][]/[cruft][] template for
> making new repos, [scientific-python/cookie][]. Eleven build backends
> including compiled backends, generation tested in Nox, and kept in-sync with
> the guide.
> making new repos, [scientific-python/cookie][]. Ten build backends including
> compiled backends, generation tested in Nox, and kept in-sync with the guide.

{: .important-title }

Expand Down
2 changes: 1 addition & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def rmtree_ro(path: Path) -> None:


def get_expected_version(backend: str, vcs: bool) -> str:
return "0.2.3" if vcs and backend not in {"whey", "maturin", "mesonpy"} else "0.1.0"
return "0.2.3" if vcs and backend not in {"maturin", "mesonpy"} else "0.1.0"


def make_copier(session: nox.Session, backend: str, vcs: bool) -> None:
Expand Down
15 changes: 3 additions & 12 deletions {{cookiecutter.project_name}}/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
[build-system]
{%- if cookiecutter.backend == "whey" %}
requires = ["whey>=0.0.17"]
build-backend = "whey"
{%- elif cookiecutter.backend == "pdm" %}
{%- if cookiecutter.backend == "pdm" %}
requires = ["pdm-backend"]
build-backend = "pdm.backend"
{%- elif cookiecutter.backend == "maturin" %}
Expand Down Expand Up @@ -151,7 +148,7 @@ substitution.files = ["src/{{ cookiecutter.__project_slug }}/__init__.py"]

[project]
name = "{{ cookiecutter.project_name }}"
{%- if cookiecutter.backend in ['maturin', 'mesonpy', 'whey'] or not cookiecutter.vcs and cookiecutter.backend in ['setuptools621', 'skbuild'] %}
{%- if cookiecutter.backend in ['maturin', 'mesonpy'] or not cookiecutter.vcs and cookiecutter.backend in ['setuptools621', 'skbuild'] %}
version = "0.1.0"
{%- endif %}
authors = [
Expand Down Expand Up @@ -190,7 +187,7 @@ classifiers = [
"Topic :: Scientific/Engineering",
"Typing :: Typed",
]
{%- if cookiecutter.backend not in ['maturin', 'mesonpy', 'whey'] and cookiecutter.vcs or cookiecutter.backend in ['pdm', 'hatch', 'flit'] %}
{%- if cookiecutter.backend not in ['maturin', 'mesonpy'] and cookiecutter.vcs or cookiecutter.backend in ['pdm', 'hatch', 'flit'] %}
dynamic = ["version"]
{%- endif %}
dependencies = []
Expand Down Expand Up @@ -232,12 +229,6 @@ sdist.include = ["src/{{ cookiecutter.__project_slug }}/_version.py"]
{%- endif %}


{%- elif cookiecutter.backend == "whey" %}


[tool.whey]
source-dir = "src"

{%- elif cookiecutter.backend == "maturin" %}


Expand Down
Loading