Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DRAFT] Move source code to src directory #269

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion haikuporter

This file was deleted.

15 changes: 15 additions & 0 deletions haikuporter
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright 2013-2014 Oliver Tappe
# Distributed under the terms of the MIT License.
import logging

from HaikuPorter.Main import Main
from HaikuPorter.Options import parseOptions

logger = logging.getLogger("buildLogger")
logger.setLevel(logging.INFO)
logger.addHandler(logging.StreamHandler())

Main(*parseOptions())
9 changes: 6 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@ repository = "https://github.com/haikuports/haikuporter"
documentation = "https://haikuports.github.io/haikuporter/"
readme = "README.md"
packages = [
{include = "HaikuPorter"}
{include = "HaikuPorter", from = "src"}
]

[tool.poetry.scripts]
haikuporter = "HaikuPorter.haikuporter:main"

[tool.poetry.dependencies]
python = ">=3.8,<4.0"
black = "^23.7.0"
Expand Down Expand Up @@ -39,7 +42,7 @@ target-version = ['py37']
preview = true

[tool.mypy]
files = ["HaikuPorter"]
files = ["src/HaikuPorter"]
disallow_untyped_defs = "True"
disallow_any_unimported = "True"
no_implicit_optional = "True"
Expand Down Expand Up @@ -99,4 +102,4 @@ skip_empty = true

[tool.coverage.run]
branch = true
source = ["HaikuPorter"]
source = ["src/HaikuPorter"]
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 10 additions & 4 deletions haikuporter.py → src/HaikuPorter/haikuporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,14 @@
from HaikuPorter.Main import Main
from HaikuPorter.Options import parseOptions

logger = logging.getLogger("buildLogger")
logger.setLevel(logging.INFO)
logger.addHandler(logging.StreamHandler())

Main(*parseOptions())
def main():
logger = logging.getLogger("buildLogger")
logger.setLevel(logging.INFO)
logger.addHandler(logging.StreamHandler())

Main(*parseOptions())


if __name__ == "__main__":
main()