diff options
author | Elena ``of Valhalla'' Grandi <valhalla@trueelena.org> | 2024-04-24 15:29:28 +0200 |
---|---|---|
committer | Elena ``of Valhalla'' Grandi <valhalla@trueelena.org> | 2024-04-24 15:32:42 +0200 |
commit | 0c7323ae032fe7e1601601f0837ba54539c1a4fa (patch) | |
tree | 88e9d0c581c204094244e09760c37967691eab4c | |
parent | 1dd720e861787bb4356cf8ae6ed3cab484f9cc9c (diff) |
Fix script installation via pyproject.toml.
-rw-r--r-- | CHANGELOG.rst | 2 | ||||
-rw-r--r-- | MANIFEST.in | 1 | ||||
-rw-r--r-- | lesana/command.py | 4 | ||||
-rw-r--r-- | pyproject.toml | 4 | ||||
-rwxr-xr-x | scripts/lesana | 14 |
5 files changed, 9 insertions, 16 deletions
diff --git a/CHANGELOG.rst b/CHANGELOG.rst index a295f78..d936197 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -5,6 +5,8 @@ Unreleased ========== +* Fix script installation via pyproject.toml. + 0.10.0 ====== diff --git a/MANIFEST.in b/MANIFEST.in index a4b5348..5669354 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -4,6 +4,7 @@ recursive-include docs * recursive-exclude docs/build * include CHANGELOG.rst recursive-include tests/data * +recursive-include scripts * include run_tests include run_coverage include run_qa diff --git a/lesana/command.py b/lesana/command.py index 52e6dd1..2d61238 100644 --- a/lesana/command.py +++ b/lesana/command.py @@ -454,3 +454,7 @@ class Lesana(hazwaz.MainCommand): Init(), Remove(), ) + + +def main(): + Lesana().run() diff --git a/pyproject.toml b/pyproject.toml index a4e055e..81dab8d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,9 +42,7 @@ cli = [ ] [project.scripts] -lesana = "scripts.lesana:main" -openlibrary2lesana = "scripts.openlibrary2lesana:main" -tellico2lesana = "scripts.tellico2lesana:main" +lesana = "lesana.command:main" [project.urls] Homepage = "https://lesana.trueelena.org/" diff --git a/scripts/lesana b/scripts/lesana index 177ca9b..45c6703 100755 --- a/scripts/lesana +++ b/scripts/lesana @@ -8,17 +8,5 @@ import hazwaz import lesana.command - -def main(): - # setup logging for lesana cli - logger = logging.getLogger('lesana') - ch = logging.StreamHandler() - formatter = logging.Formatter('%(levelname)s:%(name)s: %(message)s') - ch.setFormatter(formatter) - logger.addHandler(ch) - logger.setLevel(logging.INFO) - - lesana.command.Lesana().run() - if __name__ == "__main__": - main() + lesana.command.Lesana().run() |