Skip to content

Commit

Permalink
Switch to pyproject.toml
Browse files Browse the repository at this point in the history
setup.py is marked obsolete for a long time and with this commit
pyproject.toml is introduced and used for the development environment
setup. On the packaging side the spec file still calls setup.py
  • Loading branch information
schaefi committed Dec 20, 2023
1 parent 80a2f3b commit 81e8e97
Show file tree
Hide file tree
Showing 6 changed files with 70 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ tag = True
[bumpversion:file:kiwi/version.py]

[bumpversion:file:doc/source/conf.py]

[bumpversion:file:kiwi/pyproject.toml]
2 changes: 2 additions & 0 deletions .virtualenv.dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

# setuptools for pypi upload
setuptools
build
installer

# virtualenv-based automation of test activities
tox
Expand Down
4 changes: 1 addition & 3 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,10 @@ include tox.ini
include kiwi.yml

recursive-include doc/build/man *
recursive-include *.gz *.iso *.kiwi *.pf2 *.py *.txt *.xml *.xz

include .bumpversion.cfg
include .coverage*

include .virtualenv.requirements.txt
include .virtualenv.dev-requirements.txt

global-exclude *.py[cod] __pycache__
global-exclude */__pycache__/*
27 changes: 27 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
[project]
name = "kiwi"
version = "9.25.5"
authors = [
{ name="Marcus Schäfer", email="[email protected]" },
]
description = "KIWI - Appliance Builder"
readme = "README.rst"
requires-python = ">=3.7"
classifiers = [
# classifier: http://pypi.python.org/pypi?%3Aaction=list_classifiers
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: ',
'GNU General Public License v3 or later (GPLv3+)',
'Operating System :: POSIX :: Linux',
'Programming Language :: Python :: 3',
'Topic :: System :: Operating System',
]
dynamic = [
"license",
"entry-points",
"dependencies"
]
[project.urls]
"Homepage" = "https://osinside.github.io/kiwi"
"Bug Tracker" = "https://github.com/OSInside/kiwi/issues"
36 changes: 35 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,41 @@ def run(self):
'simplejson',
'typing_extensions; python_version < "3.8"',
],
'packages': ['kiwi'],
'packages': [
'kiwi',
'kiwi.boot',
'kiwi.utils',
'kiwi.container.setup',
'kiwi.markup',
'kiwi.archive',
'kiwi.bootloader',
'kiwi.boot.image',
'kiwi.bootloader.template',
'kiwi.bootloader.install',
'kiwi.bootloader.config',
'kiwi.builder',
'kiwi.container',
'kiwi.filesystem',
'kiwi.package_manager',
'kiwi.partitioner',
'kiwi.repository',
'kiwi.repository.template',
'kiwi.schema',
'kiwi.storage',
'kiwi.storage.subformat',
'kiwi.storage.subformat.template',
'kiwi.system',
'kiwi.system.root_import',
'kiwi.volume_manager',
'kiwi.xsl',
'kiwi.schema',
'kiwi.config',
'kiwi.tasks',
'kiwi.solver',
'kiwi.solver.repository',
'kiwi.iso_tools',
'kiwi.oci_tools'
],
'cmdclass': {
'sdist': sdist
},
Expand Down
5 changes: 3 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,8 @@ passenv =
deps = {[testenv]deps}
changedir=test/unit
commands =
bash -c 'cd ../../ && ./setup.py develop'
bash -c 'cd ../../ && test -e dist/*.whl || python -m build'
bash -c 'cd ../../ && test -e $VIRTUAL_ENV/bin/kiwi-ng || python -m installer dist/*.whl'
bash -c 'cd ../../ && mypy kiwi'
pytest --doctest-modules --no-cov-on-fail --cov=kiwi \
--cov-report=term-missing --cov-fail-under=100 \
Expand Down Expand Up @@ -214,7 +215,7 @@ deps = {[testenv]deps}
skip_install = True
usedevelop = True
commands =
python setup.py sdist
python -m build


[testenv:scripts]
Expand Down

0 comments on commit 81e8e97

Please sign in to comment.