From 2a1a4cf40afd981a4750504413405b114260457f Mon Sep 17 00:00:00 2001 From: gryf Date: Sat, 30 Mar 2024 20:33:58 +0100 Subject: [PATCH] Use pyproject.toml for installing box module. --- README.rst | 37 ++++++++++++++++++++++++++++++++----- pyproject.toml | 47 +++++++++++++++++++++++++++++++++++++++++++++++ requirements.txt | 2 -- 3 files changed, 79 insertions(+), 7 deletions(-) create mode 100644 pyproject.toml delete mode 100644 requirements.txt diff --git a/README.rst b/README.rst index 73c194a..23b7e49 100644 --- a/README.rst +++ b/README.rst @@ -29,25 +29,52 @@ Requirements formats +Tested distros +-------------- + +- Ubuntu + - 18.04 + - 20.04 + - 22.04 +- Fedora + - 37 + - 38 + - 39 +- Centos Stream + - 8 + - 9 +- Debian + - 10 (buster) + - 11 (bullseye) + - 12 (bookworm) + +There is possibility to use whatever OS image which supports cloud-init. Use +the ``--image`` param for ``create`` command to pass image filename, although +it's wise to at least discover (or not, but it may be easier in certain +distributions) what username is supposed to be used as a default user and pass +it with ``--username`` param. + + How to run it ------------- First, make sure you fulfill the requirements; either by using packages from -your operating system, or by using virtualenv for Python requirements, i.e.: +your operating system, or by using virtualenv, i.e.: .. code:: shell-session $ python -m virtualenv .venv $ . .venv/bin/activate - (.venv) $ pip install -r requirements.txt + (.venv) $ pip install . -then you can issue: +You'll have ``boxpy`` command created for you as well. .. code:: shell-session - $ alias boxpy='python /path/to/box.py' + $ boxpy -V + boxpy 1.9.2 -or simply link it somewhere in the path: +Other option is simply link it somewhere in the path: .. code:: shell-session diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..2d5fec8 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,47 @@ +[build-system] +requires = ["setuptools >= 61.0"] +build-backend = "setuptools.build_meta" + +[project] +name = "boxpy" +dynamic = ["version"] +authors = [ + {name = "Roman Dobosz", email = "gryf73@gmail.com"} +] +license = {text = "GPLv3"} +description = "Run Linux cloud image on top of VirtualBox using commandline tool" +readme = "README.rst" +requires-python = ">=3.8" +keywords = ["vboxmanage", "virtualbox", "vm", "virtual machine", "automation"] +classifiers = [ + "Development Status :: 4 - Beta", + "Intended Audience :: End Users/Desktop", + "Topic :: Terminals", + "Topic :: Utilities", + "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3 :: Only" +] +dependencies = [ + "pyyaml>=5.4.1", + "requests>=2.26.0" +] + +[project.urls] +Homepage = "https://github.com/gryf/boxpy" + +[project.scripts] +boxpy = "box:main" + +[tool.setuptools] +py-modules = ["box"] + +[tool.setuptools.dynamic] +version = {attr = "box.__version__"} + +[tool.distutils.bdist_wheel] +universal = true diff --git a/requirements.txt b/requirements.txt deleted file mode 100644 index c687994..0000000 --- a/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -pyyaml>=5.4.1 -requests>=2.26.0