| 1 | From 84ebbd6001d7cde552dd5b9da5c0528e476ab53d Mon Sep 17 00:00:00 2001
|
| 2 | From: AwesomeAdam54321 <[email protected]>
|
| 3 | Date: Fri, 30 Jun 2023 22:08:46 +0800
|
| 4 | Subject: [PATCH] mc2mt: Add packaging support.
|
| 5 |
|
| 6 | * MANIFEST.in: Add it.
|
| 7 | * mc2mt.py -> mc2mtlib/mc2mt.py: Move mc2mt.py functionality here.
|
| 8 | * mc2mtlib/__init__.py: Import mc2mt.
|
| 9 | * pyproject.toml: Add project specification.
|
| 10 | ---
|
| 11 | MANIFEST.in | 1 +
|
| 12 | mc2mtlib/__init__.py | 1 +
|
| 13 | mc2mt.py => mc2mtlib/mc2mt.py | 11 +++++++++--
|
| 14 | pyproject.toml | 11 +++++++++++
|
| 15 | 4 files changed, 22 insertions(+), 2 deletions(-)
|
| 16 | create mode 100644 MANIFEST.in
|
| 17 | rename mc2mt.py => mc2mtlib/mc2mt.py (90%)
|
| 18 | mode change 100755 => 100644
|
| 19 | create mode 100644 pyproject.toml
|
| 20 |
|
| 21 | diff --git a/MANIFEST.in b/MANIFEST.in
|
| 22 | new file mode 100644
|
| 23 | index 0000000..d5914df
|
| 24 | |
| 25 | |
| 26 | @@ -0,0 +1 @@
|
| 27 | +include mc2mtlib/mods/*.json
|
| 28 | diff --git a/mc2mtlib/__init__.py b/mc2mtlib/__init__.py
|
| 29 | index 047fcf2..315b5dc 100644
|
| 30 | |
| 31 | |
| 32 | @@ -1,4 +1,5 @@
|
| 33 | from . import argument_parser
|
| 34 | +from . import mc2mt
|
| 35 | from . import minetest_world
|
| 36 | from . import blob_writer
|
| 37 | from . import block_functions
|
| 38 | diff --git a/mc2mt.py b/mc2mtlib/mc2mt.py
|
| 39 | old mode 100755
|
| 40 | new mode 100644
|
| 41 | similarity index 90%
|
| 42 | rename from mc2mt.py
|
| 43 | rename to mc2mtlib/mc2mt.py
|
| 44 | index 938600b..67affff
|
| 45 | |
| 46 | |
| 47 | @@ -4,10 +4,17 @@ import time
|
| 48 |
|
| 49 | import anvil
|
| 50 |
|
| 51 | -from mc2mtlib import *
|
| 52 | +from mc2mtlib import argument_parser
|
| 53 | +from mc2mtlib import minetest_world
|
| 54 | +from mc2mtlib import blob_writer
|
| 55 | +from mc2mtlib import block_functions
|
| 56 | +from mc2mtlib import block_conversion
|
| 57 | +from mc2mtlib import section_conversion
|
| 58 | +
|
| 59 | +parse_args = argument_parser.parser.parse_args
|
| 60 |
|
| 61 | # Main
|
| 62 | -if __name__ == '__main__':
|
| 63 | +def mc2mt():
|
| 64 |
|
| 65 | # Args
|
| 66 | args = parse_args()
|
| 67 | diff --git a/pyproject.toml b/pyproject.toml
|
| 68 | new file mode 100644
|
| 69 | index 0000000..cf9a70d
|
| 70 | |
| 71 | |
| 72 | @@ -0,0 +1,11 @@
|
| 73 | +[build-system]
|
| 74 | +requires = ['setuptools']
|
| 75 | +build-backend = 'setuptools.build_meta'
|
| 76 | +
|
| 77 | +[project]
|
| 78 | +name = 'mc2mt'
|
| 79 | +version = '0.1'
|
| 80 | +dependencies = ['anvil-parser2']
|
| 81 | +
|
| 82 | +[project.scripts]
|
| 83 | +mc2mt = 'mc2mtlib:mc2mt.mc2mt'
|
| 84 | --
|
| 85 | 2.40.1
|
| 86 |
|