mirror of
https://github.com/danieldemus/pyp2spec.git
synced 2026-07-27 21:00:37 +02:00
Raise an exception when source is anything else than PyPI
This commit is contained in:
@@ -157,6 +157,8 @@ def source(config: ConfigFile, pypi_version: str) -> str:
|
||||
if version_str == pypi_version:
|
||||
source_macro_args += f" {version_str}"
|
||||
return "%{pypi_source " + source_macro_args + "}"
|
||||
else:
|
||||
raise NotImplementedError("pyp2spec can only construct %pypi_source macros")
|
||||
|
||||
|
||||
def pypi_version_or_macro(pypi_version: str) -> str:
|
||||
|
||||
Reference in New Issue
Block a user