From b2d7c5b4b678dc4c17c1a0c3ef4e974836a832d3 Mon Sep 17 00:00:00 2001 From: Joeri Exelmans Date: Wed, 1 Mar 2023 19:03:15 +0100 Subject: [PATCH] Add pyproject.toml --- README.md | 4 ++++ default.nix | 9 +++++++++ pyproject.toml | 21 +++++++++++++++++++++ src/xopp2py/main.py | 2 +- 4 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 default.nix create mode 100644 pyproject.toml diff --git a/README.md b/README.md index 317d322..97a0614 100644 --- a/README.md +++ b/README.md @@ -1 +1,5 @@ +#xopp2py + Python interface to .xopp (Xournal++) files. + +The only dependency is Python 3. (developed with Python 3.10) \ No newline at end of file diff --git a/default.nix b/default.nix new file mode 100644 index 0000000..172b408 --- /dev/null +++ b/default.nix @@ -0,0 +1,9 @@ +with import {}; +with pkgs.python3Packages; + +buildPythonPackage { + name = "xopp2py"; + src = ./.; + format = "pyproject"; # tell Nix to use pyproject.toml + propagatedBuildInputs = [ hatchling ]; +} \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..5d1f426 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,21 @@ +[project] +name = "xopp2py" +description = "A Python interface to the Xournal++ file format" +version = "1.0.0" +authors = [ + { name="Joeri Exelmans", email="joeri.exelmans@uantwerpen.be" }, +] +readme = "README.md" +requires-python = ">=3.10" +classifiers = [ + "Programming Language :: Python :: 3", + "Operating System :: OS Independent", +] + +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project.urls] +"Homepage" = "https://msdl.uantwerpen.be/git/jexelmans/xopp2py" +"Bug Tracker" = "https://msdl.uantwerpen.be/git/jexelmans/xopp2py/issues" diff --git a/src/xopp2py/main.py b/src/xopp2py/main.py index 2fb8b3f..2a44cae 100644 --- a/src/xopp2py/main.py +++ b/src/xopp2py/main.py @@ -8,5 +8,5 @@ if __name__ == "__main__": argparser.add_argument('filename') args = argparser.parse_args() # exits on error - from .parser import parseFile + from parser import parseFile print(parseFile(args.filename))