Skip to content

Commit

Permalink
Merge pull request #21 from plars/pyproject-conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
plars authored Feb 13, 2023
2 parents ef78488 + f2da85c commit e5b994a
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 21 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ To install it in a virtual environment:
$ virtualenv -p python3 env
$ . env/bin/activate
$ ./setup install
$ pip install .
Usage
Expand Down
24 changes: 23 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,24 @@
[build-system]
requires = [
"setuptools",
"setuptools-scm",
]
build-backend = "setuptools.build_meta"

[project]
name = "testflinger-cli"
description = "Testflinger CLI"
readme = "README.rst"
dependencies = [
"PyYAML",
"requests",
"xdg<5.2",
]
dynamic = ["version"]

[project.scripts]
testflinger-cli = "testflinger_cli:cli"
testflinger = "testflinger_cli:cli"

[tool.black]
line-length = 79
line-length = 79
21 changes: 3 additions & 18 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env python
# Copyright (C) 2017-2020 Canonical
#!/usr/bin/env python3
# Copyright (C) 2017-2023 Canonical
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
Expand All @@ -16,19 +16,4 @@
#
from setuptools import setup

INSTALL_REQUIRES = ["pyyaml", "requests", "xdg<5.2"]

setup(
name="testflinger-cli",
version="0.1",
description="CLI tool for working with testflinger",
packages=["testflinger_cli"],
zip_safe=False,
install_requires=INSTALL_REQUIRES,
test_suite="testflinger_cli.tests",
entry_points="""
[console_scripts]
testflinger-cli=testflinger_cli:cli
testflinger=testflinger_cli:cli
""",
)
setup()
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ deps =
pytest-cov
requests-mock
commands =
{envbindir}/python setup.py develop
{envbindir}/pip install .
{envbindir}/python -m black --check setup.py testflinger-cli testflinger_cli
{envbindir}/python -m flake8 setup.py testflinger_cli
{envbindir}/python -m pylint testflinger_cli
Expand Down

0 comments on commit e5b994a

Please sign in to comment.