Skip to content

Commit

Permalink
Fix setup.py for cases when __pkginfo__.py is absent.
Browse files Browse the repository at this point in the history
  • Loading branch information
domdfcoding committed Jan 13, 2022
1 parent 8164d55 commit e782081
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion repo_helper/templates/setup._py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ from setuptools import setup
sys.path.append('.')

# this package
from __pkginfo__ import * # pylint: disable=wildcard-import
{% if extras_require %}from __pkginfo__ import * # pylint: disable=wildcard-import{% endif %}

{% if desktopfile %}
from textwrap import dedent
Expand Down
2 changes: 2 additions & 0 deletions tests/test_files/test_packaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ def test_make_setup_case_1(
):
demo_environment.globals["desktopfile"] = {}
demo_environment.globals["use_whey"] = use_whey
demo_environment.globals["extras_require"] = {"foo": ["bar", "baz"]}

managed_files = make_setup(tmp_pathplus, demo_environment)
assert managed_files == ["setup.py"]
Expand All @@ -103,6 +104,7 @@ def test_make_setup_case_2(
):
demo_environment.globals["desktopfile"] = {}
demo_environment.globals["use_whey"] = use_whey
demo_environment.globals["extras_require"] = {"foo": ["bar", "baz"]}

demo_environment.globals.update(
dict(
Expand Down

0 comments on commit e782081

Please sign in to comment.