diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..d5fad46 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,3 @@ +include README.md +include LICENSE +include config.yaml.example diff --git a/email_processor/__version__.py b/email_processor/__version__.py index 3948ae9..6566c88 100644 --- a/email_processor/__version__.py +++ b/email_processor/__version__.py @@ -1,3 +1,3 @@ """Version information for email_processor package.""" -__version__ = "8.0.4" +__version__ = "8.0.5" diff --git a/email_processor/cli/commands/config.py b/email_processor/cli/commands/config.py index bf46e32..9403387 100644 --- a/email_processor/cli/commands/config.py +++ b/email_processor/cli/commands/config.py @@ -10,6 +10,18 @@ CONFIG_EXAMPLE = "config.yaml.example" +def _find_config_example() -> Path: + """Find config.yaml.example file, checking current directory. + + Returns: + Path to config.yaml.example file + """ + # Check current directory (for development and installed package) + # Files from MANIFEST.in are in .dist-info directory + # TODO: Add support for finding config.yaml.example in package when included as package data + return Path(CONFIG_EXAMPLE) + + def create_default_config(config_path: str, ui: CLIUI) -> int: """Create default configuration file from config.yaml.example. @@ -20,7 +32,7 @@ def create_default_config(config_path: str, ui: CLIUI) -> int: Returns: int: 0 on success, 1 on error """ - example_path = Path(CONFIG_EXAMPLE) + example_path = _find_config_example() target_path = Path(config_path) if not example_path.exists(): diff --git a/pyproject.toml b/pyproject.toml index ee7774d..6bdb0ee 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ packages = {find = {}} [project] name = "email-processor" -version = "8.0.4" +version = "8.0.5" description = "Email attachment processor with IMAP and SMTP support" readme = "README.md" requires-python = ">=3.9"