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

Building wheels with a - produces wheels with _. #4214

Closed
jaraco opened this issue Feb 11, 2024 · 5 comments
Closed

Building wheels with a - produces wheels with _. #4214

jaraco opened this issue Feb 11, 2024 · 5 comments

Comments

@jaraco
Copy link
Member

jaraco commented Feb 11, 2024

I think #4159 might have changed wheel building for projects with a - in the project name (from the project's pyproject.toml). Now the wheel filename for a project like scipy-openblas64 will become scipy_openblas64-0.3.26-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl. When using twine to upload to PyPI the name is converted back to scipy-openblas64, but the anaconda uploader will respect the _ and try to upload to scipy_openblas64. See scientific-python/upload-nightly-action#61

Originally posted by @mattip in #4159 (comment)

@jaraco
Copy link
Member Author

jaraco commented Feb 11, 2024

The wheel name scipy_openblas64 is correct according to the spec:

Each component of the filename is escaped by replacing runs of non-alphanumeric characters with an underscore _

That expectation matches with the fact that the wheels have underscores in the names of releases going back to September.

@jaraco
Copy link
Member Author

jaraco commented Feb 11, 2024

@mattip Can you possibly distill the scipy-openblas64 build instructions into something I can replicate or even better provide a minimal reproducer (ideally something that doesn't rely on a compiler)? I'm struggling to see when/how the naming is no longer meeting expectations.

Could it be that the problem is that the uploader is assuming that the name in the wheel is correct when it in fact is not, and it should instead be extracted from the wheel metadata (where the dash is present)?

@mattip
Copy link
Contributor

mattip commented Feb 11, 2024

Could it be that the problem is that the uploader is assuming that the name in the wheel is correct when it in fact is not, and it should instead be extracted from the wheel metadata (where the dash is present)?

That makes sense. The wheel created has the _ in the filename and - in the metadata. Renaming the wheel file before invoking the uploader makes the upload succeed. So the problem lies with the uploader https://github.com/Anaconda-Platform/anaconda-client/issues

@mattip
Copy link
Contributor

mattip commented Feb 11, 2024

Feel free to close this, sorry for the noise.

@mattip
Copy link
Contributor

mattip commented Feb 11, 2024

I opened anaconda/anaconda-client#704

@jaraco jaraco closed this as completed Feb 11, 2024
chrisjbillington added a commit to chrisjbillington/setuptools-conda that referenced this issue May 20, 2024
This broke building packages with dashes in their names from source,
including this one.

As of a recent release of `setuptools`, sdist filenames now are in the
format `package_name-<version>.tar.gz` instead of
`package-name-<version>.tar.gz` (i.e. underscores in the package name
instead of dashes). This is the case even if the package name itself
has dashes in it.

pypa/setuptools#4214

pypa/setuptools#4167

This change is seemingly deliberate in order to conform to a standard
for filenames specifically even though the standard for project names
is increasingly to use dashes.
HyukjinKwon added a commit to apache/spark that referenced this issue May 27, 2024
…ect for its output name

### What changes were proposed in this pull request?

This PR proposes to replace `pyspark-connect` to `pyspark_connect` for its output name.

### Why are the changes needed?

`setuptools` from 69.X.X changes the output name. It replaces dash in package name to underscore (`pyspark_connect-4.0.0.dev1.tar.gz` vs `pyspark-connect-4.0.0.dev1.tar.gz`), I think it is pypa/setuptools#4214.

### Does this PR introduce _any_ user-facing change?

No, this package has not been released out yet.

### How was this patch tested?

Manually tested.

### Was this patch authored or co-authored using generative AI tooling?

No.

Closes #46751 from HyukjinKwon/SPARK-48425.

Authored-by: Hyukjin Kwon <[email protected]>
Signed-off-by: Hyukjin Kwon <[email protected]>
riyaverm-db pushed a commit to riyaverm-db/spark that referenced this issue Jun 7, 2024
…ect for its output name

### What changes were proposed in this pull request?

This PR proposes to replace `pyspark-connect` to `pyspark_connect` for its output name.

### Why are the changes needed?

`setuptools` from 69.X.X changes the output name. It replaces dash in package name to underscore (`pyspark_connect-4.0.0.dev1.tar.gz` vs `pyspark-connect-4.0.0.dev1.tar.gz`), I think it is pypa/setuptools#4214.

### Does this PR introduce _any_ user-facing change?

No, this package has not been released out yet.

### How was this patch tested?

Manually tested.

### Was this patch authored or co-authored using generative AI tooling?

No.

Closes apache#46751 from HyukjinKwon/SPARK-48425.

Authored-by: Hyukjin Kwon <[email protected]>
Signed-off-by: Hyukjin Kwon <[email protected]>
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

No branches or pull requests

2 participants