mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-20 00:53:12 +03:00
update-python-libraries: support pyproject and flit formats
Generally, this is determined by the fetcher. The notable exception would be the "wheel" format.
This commit is contained in:
parent
d016f26cda
commit
ce0a907730
@ -242,7 +242,9 @@ DEFAULT_SETUPTOOLS_EXTENSION = 'tar.gz'
|
||||
|
||||
FORMATS = {
|
||||
'setuptools' : DEFAULT_SETUPTOOLS_EXTENSION,
|
||||
'wheel' : 'whl'
|
||||
'wheel' : 'whl',
|
||||
'pyproject' : 'tar.gz',
|
||||
'flit' : 'tar.gz'
|
||||
}
|
||||
|
||||
def _determine_fetcher(text):
|
||||
@ -281,12 +283,8 @@ def _determine_extension(text, fetcher):
|
||||
if extension is None:
|
||||
if src_format is None:
|
||||
src_format = 'setuptools'
|
||||
elif src_format == 'flit':
|
||||
raise ValueError("Don't know how to update a Flit package.")
|
||||
elif src_format == 'other':
|
||||
raise ValueError("Don't know how to update a format='other' package.")
|
||||
elif src_format == 'pyproject':
|
||||
raise ValueError("Don't know how to update a pyproject package.")
|
||||
extension = FORMATS[src_format]
|
||||
|
||||
elif fetcher == 'fetchurl':
|
||||
|
Loading…
Reference in New Issue
Block a user