Closed
Description
I'm attempting to create and upload a package to TestPyPI with flit 3.5.1 using the new PEP420 feature
[build-system]
build-backend = 'flit_core.buildapi'
requires = ['flit_core >=3.5.1,<4']
[project]
authors = [{name = 'name', email = 'email'}]
classifiers = [
'Development Status :: 1 - Planning',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Typing :: Typed',
]
dependencies = [
'keyring>=23.3.0'
]
description = 'test package'
readme = 'README.rst'
version = '0.1.0-pre'
name = 'keyrings.testkeyringbackend'
requires-python = '>=3.8,<4'
I can build the package with flit --ini-file=pyproject.toml build
and it generates both wheel and sdist files.
$ flit --ini-file=pyproject.toml build
Not generating setup.py in sdist (default changed) I-flit
Recent versions of pip no longer need this generated file I-flit
Use --[no-]setup-py to suppress this message or add setup.py I-flit
Version number normalised: '0.1.0-pre' -> '0.1.0rc0' (see PEP 440) W-flit_core.versionno
Version number normalised: '0.1.0-pre' -> '0.1.0rc0' (see PEP 440) W-flit_core.versionno
Found 19 files tracked in git I-flit.sdist
Built sdist: dist/keyrings.testkeyringbackend-0.1.0rc0.tar.gz I-flit_core.sdist
Version number normalised: '0.1.0-pre' -> '0.1.0rc0' (see PEP 440) W-flit_core.versionno
Copying package file(s) from /tmp/tmpw8v3wdc3/keyrings.testkeyringbackend-0.1.0rc0/src/keyrings/testkeyringbackend I-flit_core.wheel
Writing metadata files I-flit_core.wheel
Writing the record of files I-flit_core.wheel
Built wheel: dist/keyrings_testkeyringbackend-0.1.0rc0-py3-none-any.whl I-flit_core.wheel
$ ls dist
keyrings_testkeyringbackend-0.1.0rc0-py3-none-any.whl keyrings.testkeyringbackend-0.1.0rc0.tar.gz
When I try to upload with twine
I get an error returned:
$ python3 -m twine upload --repository testpypi dist/*
Uploading distributions to https://test.pypi.org/legacy/
Uploading keyrings_testkeyringbackend-0.1.0rc0-py3-none-any.whl
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 23.3k/23.3k [00:02<00:00, 11.0kB/s]
Error during upload. Retry with the --verbose option for more details.
HTTPError: 400 Bad Request from https://test.pypi.org/legacy/
Start filename for 'keyrings.testkeyringbackend' with 'keyrings.testkeyringbackend'.
Metadata
Metadata
Assignees
Labels
No labels