Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pypi package #20

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion libkirk/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


# Kirk version
VERSION = '1.1'
__version__ = '1.1'


class KirkException(Exception):
Expand Down
10 changes: 3 additions & 7 deletions libkirk/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import libkirk.data
import libkirk.events
import libkirk.plugin
from libkirk import KirkException
from libkirk import KirkException, __version__
from libkirk.sut import SUT
from libkirk.sut import SUTError
from libkirk.framework import Framework
Expand Down Expand Up @@ -350,8 +350,8 @@ def run(cmd_args: list = None) -> None:
parser.add_argument(
"--version",
"-V",
action="store_true",
help="Print current version")
action="version",
version=f"%(prog)s, {__version__}")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good idea, we can integrate it in a separate patch.

Copy link
Member

@pevik pevik Jul 8, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@roxell maybe just remove the last commit which adds pyproject.toml and force push? We could merge it already.

And for pypi, I'm not sure how much time it takes. If it's something long term, maybe add an issue for it? It would be followed by doc update pointing to pypi.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I pushed a new PR for the the patches @pevik
#23


# user interface arguments
parser.add_argument(
Expand Down Expand Up @@ -453,10 +453,6 @@ def run(cmd_args: list = None) -> None:
# parse comand line
args = parser.parse_args(cmd_args)

if args.version:
print(f"kirk {libkirk.VERSION}")
parser.exit(RC_OK)

if args.sut and "help" in args.sut:
print(args.sut["help"])
parser.exit(RC_OK)
Expand Down
27 changes: 27 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[build-system]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method is not needed since we already use setuptools.
We don't really want to maintain two packaging systems.

requires = ["flit_core >=3.2,<4"]
build-backend = "flit_core.buildapi"

[project]
name = "kirk"
authors = [{name = "Andrea Cervesato", email = "[email protected]"}]
readme = "README.md"
license = {file = "LICENSE"}
classifiers = ["License :: OSI Approved :: GNU Lesser General Public License v2 (GPLv2)"]
requires-python = ">=3.6"
dynamic = ["version", "description"]

[project.optional-dependencies]
all = [
"asyncssh",
"msgpack",
]

[tool.flit.module]
name = "libkirk"

[project.scripts]
kirk = "libkirk.main:run"

[project.urls]
Source = "https://github.com/linux-test-project/kirk.git"
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

setup(
name='kirk',
version=libkirk.VERSION,
version=libkirk.__version__,
description='All-in-one Linux Testing Framework',
author='Andrea Cervesato',
author_email='[email protected]',
Expand Down
Loading