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

6.4 sdist on PyPI not installable by zc.buildout #298

Closed
icemac opened this issue May 22, 2024 · 13 comments
Closed

6.4 sdist on PyPI not installable by zc.buildout #298

icemac opened this issue May 22, 2024 · 13 comments
Assignees
Labels

Comments

@icemac
Copy link
Member

icemac commented May 22, 2024

PROBLEM REPORT

What I did:

Install zope.interface==6.4 on PyPy in https://github.com/zopefoundation/zopetoolkit/actions/runs/9155131998/job/25261849191?pr=95

What I expect to happen:

Successful install.

What actually happened:

Error: Couldn't find a distribution for 'zope.interface==6.4'.

The reason seems to be that the sdist of zope.interface 6.4 is named zope_interface-6.4.tar.gz, so an _ instead of a . between zope and interface. – It is not clear to me which tool did this. Running python setup.py sdist with setuptools==65.5.0 did create a correctly named file.

What version of Python and Zope/Addons I am using:

  • PyPy 3.10
@icemac icemac self-assigned this May 22, 2024
@icemac icemac added the bug label May 22, 2024
@icemac
Copy link
Member Author

icemac commented May 22, 2024

I'm now going to release a post-release version for 6.4 because I do not want to delete the sdist on PyPI to replace it with another one (only one sdist per release is allowed).

@icemac
Copy link
Member Author

icemac commented May 22, 2024

@dataflake Do you have any idea what could have happened here?
https://pypi.org/project/zope.interface/6.4.post0/#files has the correct filename. I was using zest.releaser to cut the release. #295 might be related that it cannot install the version on Windows via zc.buildout if there is no wheel.

BTW installing via pip was no problem.

@dataflake
Copy link
Member

I always use bin/buildout setup setup.py sdist to create distribution files. I never had any problems with it so I did not even look at file names.

I just tried again and the filename is wrong again. The sandbox has zc.buildout 3.0.1, setuptools 69.5.1 and pip 24.0.

I just rebuilt that virtual environment, which updated setuptools to 70.0.0. Now I am getting this:

$ bin/buildout setup setup.py sdist
Traceback (most recent call last):
  File "/Users/jens/src/zope/zope.interface/bin/buildout", line 5, in <module>
    from zc.buildout.buildout import main
  File "/Users/jens/src/zope/zope.interface/lib/python3.11/site-packages/zc/buildout/buildout.py", line 18, in <module>
    import zc.buildout.easy_install
  File "/Users/jens/src/zope/zope.interface/lib/python3.11/site-packages/zc/buildout/easy_install.py", line 28, in <module>
    from pkg_resources import packaging
ImportError: cannot import name 'packaging' from 'pkg_resources' (/Users/jens/src/zope/zope.interface/lib/python3.11/site-packages/pkg_resources/__init__.py)

But doing bin/python setup.py sdist inside that updated environment produces the wrong file name again.

I am not sure what is going on.

@dataflake
Copy link
Member

This is (yet another) setuptools issue that is caused by setuptools starting with version 69. I tried a variety of combinations, and downgrading to any version <69 works and creates the correct file name.

@dataflake
Copy link
Member

dataflake commented May 22, 2024

I guess the way forward would have to be pinning setuptools in the meta/config templates yet again and then creating a 6.5 release. IMHO #296 should be used at the same time so hopefully Windows wheels make it to PyPI.

@mgedmin
Copy link
Member

mgedmin commented May 22, 2024

This smells like a zc.buildout issue to me. You cannot expect everyone in the world to pin a specific old setuptools version before they make their releases.

(Besides, setuptools itself is shouting loudly at you whenever you try to run python setup.py anything, telling you to use build instead. What sort of sdist filenames does python -m build -s generate? I tried pipx run build -s in zope.interface's git master and I got me a dist/zope_interface-6.5.dev0.tar.gz.)

@dataflake
Copy link
Member

python -m build -s gets the "wrong" file name again.

@dataflake
Copy link
Member

P.S.: the full filename on the 6.4 tag itself was zope_interface-6.4.tar.gz

github-merge-queue bot referenced this issue in chezmoi-sh/atlas May 22, 2024
[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Update | Change | OpenSSF |
|---|---|---|---|
| [zope.interface](https://togithub.com/zopefoundation/zope.interface) |
patch | `==6.4` -> `==6.4.post0` | [![OpenSSF
Scorecard](https://api.securityscorecards.dev/projects/github.com/zopefoundation/zope.interface/badge)](https://securityscorecards.dev/viewer/?uri=github.com/zopefoundation/zope.interface)
|

---

### Release Notes

<details>
<summary>zopefoundation/zope.interface (zope.interface)</summary>

###
[`v6.4.post0`](https://togithub.com/zopefoundation/zope.interface/blob/HEAD/CHANGES.rst#64post0-2024-05-22)

[Compare
Source](https://togithub.com/zopefoundation/zope.interface/compare/6.4...6.4.post0)

\======================

-   The sdist of version 6.4 was uploaded to PyPI as
`zope_interface-6.4.tar.gz` instead of `zope.interface-6.4-py2.tar.gz`
which cannot be installed by `zc.buildout`. This release is a re-release
    of version 6.4 with the correct sdist name.
(`#&#8203;298
<https://github.com/zopefoundation/zope.interface/issues/298>`)

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/chezmoi-sh/WIP-monorepo).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zNjguMTAiLCJ1cGRhdGVkSW5WZXIiOiIzNy4zNjguMTAiLCJ0YXJnZXRCcmFuY2giOiJtYWluIiwibGFiZWxzIjpbXX0=-->
@icemac
Copy link
Member Author

icemac commented May 22, 2024

@mgedmin There is already a buildout issue: buildout/buildout#647
So I think we can close this issue here.

@dataflake
Copy link
Member

OK, I'll close that here. I'm only concerned that with the slow development speed of zc.buildout we'll have to wait forever for a solution and in the meantime more and more people will start complaining. I will make sure to pin setuptools<69 in all my sandboxes.

@icemac
Copy link
Member Author

icemac commented May 23, 2024

@dataflake We will also have to pin it for our repositories. I already saw a broken GHA run because zc.buildout is not compatible with setuptools >= 70.

@dataflake
Copy link
Member

See zopefoundation/meta#243

@mgorny
Copy link

mgorny commented May 24, 2024

Please don't call it "wrong" when it's actually correct. Using dots in filenames is invalid per the standards. Setuptools blatantly refusing to follow them for years doesn't make it any more "right".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants