Python packaging
This commit is contained in:
parent
7487eb94bd
commit
85df574d3c
22 changed files with 48 additions and 10 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -2,3 +2,4 @@
|
||||||
/tests/
|
/tests/
|
||||||
/build/
|
/build/
|
||||||
/VNTools.egg-info/
|
/VNTools.egg-info/
|
||||||
|
/dist/
|
||||||
|
|
6
RenDroidUnpack/__main__.py
Executable file
6
RenDroidUnpack/__main__.py
Executable file
|
@ -0,0 +1,6 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
from . import application
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
application.launch()
|
|
@ -3,7 +3,7 @@ from PIL import Image
|
||||||
import shutil
|
import shutil
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from printer import Printer
|
from .printer import Printer
|
||||||
|
|
||||||
|
|
||||||
class Extract:
|
class Extract:
|
7
RenPy-Android-Unpack/__main__.py → RenDroidUnpack/application.py
Executable file → Normal file
7
RenPy-Android-Unpack/__main__.py → RenDroidUnpack/application.py
Executable file → Normal file
|
@ -4,8 +4,8 @@ import argparse
|
||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
|
|
||||||
from printer import Printer
|
from .printer import Printer
|
||||||
from actions import Actions
|
from .actions import Actions
|
||||||
|
|
||||||
|
|
||||||
def args_init():
|
def args_init():
|
||||||
|
@ -17,8 +17,7 @@ def args_init():
|
||||||
parser.add_argument('-o', '--output')
|
parser.add_argument('-o', '--output')
|
||||||
return parser.parse_args()
|
return parser.parse_args()
|
||||||
|
|
||||||
|
def launch():
|
||||||
if __name__ == '__main__':
|
|
||||||
if sys.platform == "win32":
|
if sys.platform == "win32":
|
||||||
colorama.init()
|
colorama.init()
|
||||||
args = args_init()
|
args = args_init()
|
|
@ -1,9 +1,9 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
from application import Application
|
from .application import Application
|
||||||
from compress import Compress
|
from .compress import Compress
|
||||||
from printer import Printer
|
from .printer import Printer
|
||||||
from config import Config
|
from .config import Config
|
||||||
from utils import Utils
|
from .utils import Utils
|
||||||
|
|
||||||
|
|
||||||
def init():
|
def init():
|
|
@ -24,4 +24,5 @@ class Config:
|
||||||
config = tomllib.load(cfile)
|
config = tomllib.load(cfile)
|
||||||
else:
|
else:
|
||||||
print("Failed to find config. Check `ffmpeg-comp -h` to more info")
|
print("Failed to find config. Check `ffmpeg-comp -h` to more info")
|
||||||
|
exit(255)
|
||||||
return cls(config=config, args=args)
|
return cls(config=config, args=args)
|
31
pyproject.toml
Normal file
31
pyproject.toml
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
[build-system]
|
||||||
|
requires = [
|
||||||
|
"setuptools >= 61.0"
|
||||||
|
]
|
||||||
|
build-backend = "setuptools.build_meta"
|
||||||
|
|
||||||
|
[tool.setuptools]
|
||||||
|
packages = ["VNRecode", "RenDroidUnpack", "VNDS2RenPy"]
|
||||||
|
include-package-data = true
|
||||||
|
|
||||||
|
[tool.setuptools.package-data]
|
||||||
|
'VNRecode' = ['*.py']
|
||||||
|
'VNDS2RenPy' = ['*.py']
|
||||||
|
'RenDroidUnpack' = ['*.py']
|
||||||
|
|
||||||
|
[project.scripts]
|
||||||
|
vnrecode = "VNRecode.__main__:init"
|
||||||
|
vnds2renpy = "VNDS2RenPy.__main__:main"
|
||||||
|
rendroid-unpack = "RenDroidUnpack.application:launch"
|
||||||
|
|
||||||
|
[project]
|
||||||
|
name = "vntools"
|
||||||
|
version = "2.0-dev"
|
||||||
|
requires-python = ">= 3.11"
|
||||||
|
dependencies = [
|
||||||
|
"Pillow==10.3.0",
|
||||||
|
"pillow-avif-plugin==1.4.3",
|
||||||
|
"python-ffmpeg==2.0.12",
|
||||||
|
"progress==1.6",
|
||||||
|
"colorama==0.4.6"
|
||||||
|
]
|
Loading…
Add table
Add a link
Reference in a new issue