Skip to content

Commit

Permalink
Fix tests: with setuptools>=69.3 sdists get an underscore.
Browse files Browse the repository at this point in the history
Instead of `tha.example-0.1.tar.gz` you get `tha_example-0.1.tar.gz`.
Wheels currently still have dots there, but those might become underscores at some point as well.

This is actually a problem for Buildout: buildout/buildout#647

The change in this PR does have a bit of an effect:

- Previously when we were running `build`, it would run in non-isolated mode.  So if you make sure you have an older `setuptools` version in the venv of `zest.releaser`, you get dots, like was always the case.
- Now with this PR, we run in isolated mode, which means that `build` will most likely install the latest setuptools version.  Well, it does that if setuptools is the chosen build-system, and I think this is still the default, at least if there is a `setup.py`.

You can influence this in the `pyproject.toml` of the package you are releasing.
In Plone we have this in most packages:

```
[build-system]
requires = ["setuptools>=68.2"]
```

I think we want it like this now:

```
[build-system]
requires = ["setuptools>=68.2,<=69.2"]
```

I am mostly writing this as note to myself. :-)
  • Loading branch information
mauritsvanrees committed Jun 16, 2024
1 parent a53d2c4 commit 934ffb7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions zest/releaser/tests/functional-git.txt
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,10 @@ known on PyPI:
creating src/tha.example.egg-info
...
Creating ...
removing 'tha.example-0.1' ...
removing 'tha_example-0.1' ...
Question: Upload to pypi (y/N)?
Our reply: yes
MOCK twine dispatch upload ... dist/tha.example-0.1.tar.gz
MOCK twine dispatch upload ... dist/tha_example-0.1.tar.gz

There is now a tag:

Expand Down
4 changes: 2 additions & 2 deletions zest/releaser/tests/functional-with-hooks.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@ The release script tags the release and uploads it:
creating src/tha.example.egg-info
...
Creating ...
removing 'tha.example-0.1' ...
removing 'tha_example-0.1' ...
releaser_before_upload
Question: Upload to pypi (Y/n)?
Our reply: y
MOCK twine dispatch upload ... dist/tha.example-0.1.tar.gz
MOCK twine dispatch upload ... dist/tha_example-0.1.tar.gz
releaser_after


Expand Down
4 changes: 2 additions & 2 deletions zest/releaser/tests/pyproject-toml.txt
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@ known on PyPI:
creating src/tha.example.egg-info
...
Creating ...
removing 'tha.example-0.1' ...
removing 'tha_example-0.1' ...
Question: Upload to pypi (y/N)?
Our reply: yes
MOCK twine dispatch upload ... dist/tha.example-0.1.tar.gz
MOCK twine dispatch upload ... dist/tha_example-0.1.tar.gz

There is now a tag:

Expand Down

0 comments on commit 934ffb7

Please sign in to comment.