diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 98b1b65..306fe14 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -46,7 +46,7 @@ jobs: with: python-version: '3.x' - - run: pip install meson ninja jsonschema jinja2 + - run: pip install meson ninja - run: meson setup build @@ -97,7 +97,6 @@ jobs: - run: | sudo apt install -y libgcrypt-dev - pip install -U setuptools if: matrix.os == 'ubuntu-latest' - - run: python setup.py build + - run: python -m pip install . diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..2a023a5 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,32 @@ +[build-system] +requires = ["setuptools>=74.1"] +build-backend = "setuptools.build_meta" + +[project] +name = "fnx" +version = "1.1.2" +authors = [ + { name = "averne" }, +] +description = "Library for parsing and reading Nintendo Switch file formats" +readme = {file = "README.txt", content-type = "text/markdown"} +requires-python = ">=3.10" +license = {file = "LICENSE"} + +[[tool.setuptools.ext-modules]] +name = "fnxbinds" +sources = [ + "bindings/bindings.cpp", + "lib/io.cpp", + "lib/keyset.cpp", + "lib/crypto.cpp", + "lib/pfs.cpp", + "lib/hfs.cpp", + "lib/romfs.cpp", + "lib/nca.cpp", + "lib/xci.cpp", +] +include-dirs = ["include"] +define-macros = [["USE_GCRYPT"]] +extra-compile-args = ["-std=gnu++20"] +libraries = ["gcrypt"] diff --git a/setup.py b/setup.py deleted file mode 100755 index 7451474..0000000 --- a/setup.py +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/env python3 - -from glob import glob -from setuptools import setup, Extension - -setup( - name = "fnx", - version = "1.1.1", - packages = ["fnx"], - package_dir = {"": "bindings"}, - ext_modules = [ - Extension("fnxbinds", ["bindings/bindings.cpp"] + glob("lib/*.cpp"), - depends = glob("include/**/*.hpp", recursive=True), - define_macros = [ - ("USE_GCRYPT", None), - ], - extra_compile_args = [ - "-std=gnu++20", - ], - include_dirs = ["include"], - libraries = ["gcrypt"] - ) - ] -)