mirror of
https://github.com/danieldemus/pyp2spec.git
synced 2026-07-27 21:00:37 +02:00
Remove the option to add custom Summary and Description
They're either detected from the package metadata or filled in with a sane default for automated use. The actual users can edit the resulting files.
This commit is contained in:
+2
-22
@@ -347,9 +347,7 @@ def is_package_name(package):
|
||||
|
||||
def create_config_contents(
|
||||
package,
|
||||
description=None,
|
||||
version=None,
|
||||
summary=None,
|
||||
session=None,
|
||||
license=None,
|
||||
compliant=False,
|
||||
@@ -370,14 +368,6 @@ def create_config_contents(
|
||||
else:
|
||||
raise NotImplementedError("pyp2spec can't currently handle URLs.")
|
||||
|
||||
if description is None:
|
||||
description = get_description(package)
|
||||
click.secho(f"Assuming --description={description}", fg="yellow")
|
||||
|
||||
if summary is None:
|
||||
summary = pkg.summary()
|
||||
click.secho(f"Assuming --summary={summary}", fg="yellow")
|
||||
|
||||
if version is None:
|
||||
click.secho(f"Assuming PyPI --version={pkg.version}", fg="yellow")
|
||||
|
||||
@@ -397,8 +387,8 @@ def create_config_contents(
|
||||
contents["python_alt_version"] = python_alt_version
|
||||
|
||||
contents["archful"] = archful
|
||||
contents["description"] = description
|
||||
contents["summary"] = summary
|
||||
contents["description"] = get_description(package)
|
||||
contents["summary"] = pkg.summary()
|
||||
contents["version"] = convert_version_to_rpm_scheme(pkg.version)
|
||||
contents["pypi_version"] = pkg.pypi_version_or_macro()
|
||||
contents["license"] = license
|
||||
@@ -432,9 +422,7 @@ def create_config(options):
|
||||
|
||||
contents = create_config_contents(
|
||||
options["package"],
|
||||
description=options["description"],
|
||||
version=options["version"],
|
||||
summary=options["summary"],
|
||||
license=options["license"],
|
||||
compliant=options["fedora_compliant"],
|
||||
top_level=options["top_level"],
|
||||
@@ -449,18 +437,10 @@ def pypconf_args(func):
|
||||
"--config-output", "-c",
|
||||
help="Provide custom output for configuration file",
|
||||
)
|
||||
@click.option(
|
||||
"--description", "-d",
|
||||
help="Provide description for the package",
|
||||
)
|
||||
@click.option(
|
||||
"--version", "-v",
|
||||
help="Provide package version to query PyPI for, default: latest",
|
||||
)
|
||||
@click.option(
|
||||
"--summary", "-s",
|
||||
help="Provide custom package summary",
|
||||
)
|
||||
@click.option(
|
||||
"--license", "-l",
|
||||
help="Provide license name",
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
Name: {{python_name}}
|
||||
Version: {{version}}
|
||||
Release: %autorelease
|
||||
# Fill in the actual package summary to submit package to Fedora
|
||||
Summary: {{summary}}
|
||||
|
||||
# Check if the automatically generated License and its spelling is correct for Fedora
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
Name: python-click
|
||||
Version: 7.1.2
|
||||
Release: %autorelease
|
||||
# Fill in the actual package summary to submit package to Fedora
|
||||
Summary: Composable command line interface toolkit
|
||||
|
||||
# Check if the automatically generated License and its spelling is correct for Fedora
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
Name: python-markdown-it-py
|
||||
Version: 1.1.0
|
||||
Release: %autorelease
|
||||
# Fill in the actual package summary to submit package to Fedora
|
||||
Summary: Python port of markdown-it
|
||||
|
||||
# Check if the automatically generated License and its spelling is correct for Fedora
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
Name: python-numpy
|
||||
Version: 1.25.2
|
||||
Release: %autorelease
|
||||
# Fill in the actual package summary to submit package to Fedora
|
||||
Summary: Fundamental package for array computing in Python
|
||||
|
||||
# Check if the automatically generated License and its spelling is correct for Fedora
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
Name: python-sphinx
|
||||
Version: 7.2.6
|
||||
Release: %autorelease
|
||||
# Fill in the actual package summary to submit package to Fedora
|
||||
Summary: Python documentation generator
|
||||
|
||||
# Check if the automatically generated License and its spelling is correct for Fedora
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
Name: python3.9-pello
|
||||
Version: 1.0.4
|
||||
Release: %autorelease
|
||||
# Fill in the actual package summary to submit package to Fedora
|
||||
Summary: An example Python Hello World package
|
||||
|
||||
# Check if the automatically generated License and its spelling is correct for Fedora
|
||||
|
||||
@@ -2,14 +2,12 @@ pypi_name = "aionotion"
|
||||
pypi_version = "%{version}"
|
||||
python_name = "python-aionotion"
|
||||
version = "2.0.3"
|
||||
summary = "Python library for Notion Home Monitoring"
|
||||
summary = "A simple Python 3 library for Notion Home Monitoring"
|
||||
license = "MIT"
|
||||
url = "https://github.com/bachya/aionotion"
|
||||
source = "%{pypi_source aionotion}"
|
||||
archive_name = "aionotion"
|
||||
description = '''
|
||||
A asyncio-friendly library for Notion Home Monitoring devices.
|
||||
'''
|
||||
test_top_level = true
|
||||
extras = []
|
||||
archful = false
|
||||
description = "This is package 'aionotion' generated automatically by pyp2spec."
|
||||
test_top_level = true
|
||||
|
||||
@@ -68,9 +68,7 @@ def test_config_with_customization_is_valid(betamax_session):
|
||||
package = "aionotion"
|
||||
config = create_config_contents(
|
||||
package=package,
|
||||
description="A asyncio-friendly library for Notion Home Monitoring devices.\n",
|
||||
version="2.0.3",
|
||||
summary="Python library for Notion Home Monitoring",
|
||||
top_level=True,
|
||||
compliant=True,
|
||||
session=betamax_session,
|
||||
|
||||
Reference in New Issue
Block a user