Skip to content

Commit

Permalink
Switch setup.py to pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
Sispheor committed Nov 30, 2022
1 parent 343bc43 commit d01dcd2
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 61 deletions.
21 changes: 13 additions & 8 deletions docs/build.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,27 +19,32 @@ ansible-galaxy collection publish hpe-monkeyble-1.0.3.tar.gz

## Python package

The build package need to be present
```
pip3 install build
```

Build the CLI:
```
python -m build
poetry build
```

This command creates a file in `dist/`

Configure poetry

```
# dev
poetry config repositories.test-pypi https://test.pypi.org/legacy/
poetry config pypi-token.test-pypi $TEST_PYPI_TOKEN
# prod
poetry config pypi-token.pypi $PYPI_TOKEN
```

Publish to test env Pypi:
```
python3 -m twine upload --repository testpypi -u sispheor -p $PYPI_PASSWORD dist/*
poetry publish --repository test-pypi
```

Publish to prod env Pypi:
```
python3 -m twine upload --repository pypi dist/*
poetry publish
```

Test installing with pipx
Expand Down
29 changes: 28 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,33 @@
[tool.poetry]
name = "monkeyble"
version = "1.1.1.dev0"
version = "1.1.1"
description = "End-to-end testing framework for Ansible"
authors = ["Nicolas Marcq <[email protected]>"]
license = "GNU General Public License v3 (GPLv3)"
readme = "README.md"
homepage = "https://hewlettpackard.github.io/monkeyble/"
repository = "https://github.com/HewlettPackard/monkeyble"
keywords = ["test", "ansible", "end2end"]
classifiers = [
'Development Status :: 5 - Production/Stable',
'Environment :: Console',
'Intended Audience :: Information Technology',
'Intended Audience :: Developers',
'Intended Audience :: System Administrators',
'License :: OSI Approved :: GNU General Public License v3 (GPLv3)',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Topic :: Utilities',
]
include = [
'LICENSE.md'
]

[tool.poetry.dependencies]
python = "^3.10"
Expand All @@ -21,3 +45,6 @@ twine = "^4.0.1"
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"

[tool.poetry.scripts]
monkeyble = 'monkeyble.cli.monkeyble_cli:main'
52 changes: 0 additions & 52 deletions setup.py

This file was deleted.

0 comments on commit d01dcd2

Please sign in to comment.