suds-community / suds

Suds is a lightweight SOAP python client for consuming Web Services. A community fork of the jurko fork.
https://suds.readthedocs.io/
GNU Lesser General Public License v3.0
173 stars 56 forks source link

`pip download suds` fails because "has inconsistent name: expected 'suds', but metadata has 'suds-community'" #89

Open mgedmin opened 1 year ago

mgedmin commented 1 year ago

I'm trying to keep a local mirror of all the package so our builds can work even if PyPI goes down temporarily. This is how I noticed this rare corner case:

$ pip download --no-deps --no-binary :all: suds==1.1.2
Collecting suds==1.1.2
  Using cached suds-1.1.2.tar.gz (285 kB)
  Preparing metadata (setup.py) ... done
  WARNING: Generating metadata for package suds produced metadata for project name suds-community. Fix your #egg=suds fragments.
Discarding https://files.pythonhosted.org/packages/35/e5/d9571b3f8757573ba0fd1ad56c20ca24c1f339db8731914fee6f657b7170/suds-1.1.2.tar.gz (from https://pypi.org/simple/suds/) (requires-python:>=3.5): Requested suds-community from https://files.pythonhosted.org/packages/35/e5/d9571b3f8757573ba0fd1ad56c20ca24c1f339db8731914fee6f657b7170/suds-1.1.2.tar.gz has inconsistent name: filename has 'suds', but metadata has 'suds-community'
ERROR: Could not find a version that satisfies the requirement suds==1.1.2 (from versions: 0.3.4, 0.3.5, 0.3.6, 0.3.7, 0.3.8, 0.3.9, 0.4, 1.0.0, 1.1.1, 1.1.2)
ERROR: No matching distribution found for suds==1.1.2

I expect it's because the setup.py in suds-1.1.2.tar.gz calls setup(name='suds-community', ...) if you don't know to define the SUDS_PACKAGE environment variable.

I won't be bothered too much if you close this bug as WONTFIX because preparing slightly different setup.py files for the twin suds vs suds-community releases might be a pain, and people can use wheels which do not suffer from this problem.

phillbaker commented 1 year ago

Hey @mgedmin, I can see how this is unexpected and could be considered a bug, considering the CLI called for building the suds package. I'd be open to a fix if you can find one.

I think an alternative answer is to release a final version of suds-community that has a simple dependency on a recent version of suds. An example I've seen is here: https://github.com/simonw/pypi-rename. I believe that would be non-breaking to consumers of suds-community.