Skip to content

Commit

Permalink
Move optional-dependencies section below console-scripts in pyproject…
Browse files Browse the repository at this point in the history
….toml
  • Loading branch information
domdfcoding committed May 15, 2024
1 parent 5193df1 commit 2fa4010
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions repo_helper/files/packaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,15 +317,6 @@ def make_pyproject(repo_path: pathlib.Path, templates: Environment) -> List[str]
if templates.globals["enable_docs"]:
data["project"]["urls"]["Documentation"] = templates.globals["docs_url"]

# extras-require
data["project"]["optional-dependencies"] = {}

for extra, dependencies in templates.globals["extras_require"].items():
data["project"]["optional-dependencies"][extra] = list(map(str, dependencies))

if not data["project"]["optional-dependencies"]:
del data["project"]["optional-dependencies"]

# entry-points

if templates.globals["console_scripts"]:
Expand All @@ -339,6 +330,15 @@ def make_pyproject(repo_path: pathlib.Path, templates: Environment) -> List[str]
if not data["project"]["entry-points"]:
del data["project"]["entry-points"]

# extras-require
data["project"]["optional-dependencies"] = {}

for extra, dependencies in templates.globals["extras_require"].items():
data["project"]["optional-dependencies"][extra] = list(map(str, dependencies))

if not data["project"]["optional-dependencies"]:
del data["project"]["optional-dependencies"]

# tool

# tool.mkrecipe
Expand Down

0 comments on commit 2fa4010

Please sign in to comment.